88 - Assert
The assert
function creates an error of type Panic(uint256)
.
Assert should only be used to test for internal errors, and to check invariants.
Properly functioning code should never create a Panic, not even on invalid external input.
assert()
->Panic(uint256)
- Internal Errors
- Check Invariants
- Normal Code -> No Panic
assert()
vs.require()