It is dicouraged to use assert
in production code as it's meant to be mainly used for testing and debugging. Per solidity doumentation 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. If this happens, then there is a bug in your contract which you should fix.
.
The assert function creates an error of type Panic(uint256). The require function either creates an error without any data or an error of type Error(string).
Require should be used to ensure valid conditions that cannot be detected until execution time. This includes conditions on inputs or return values from calls to external contracts.
VScode, Manual Review
Replace assert
statements with require
or custom errors
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.