Closed as not planned
Description
It would be nice to start introducing helper functions in assembly. This was previously discussed in #474 and #1319.
A lot of contracts/libraries deal with calling precompiles directly to avoid cost overheads. They do this with if iszero(staticcall(..)) { revert(0, 0) }
. It would be nice to support require
and/or assert
:
require(expr)
->if iszero(expr) { revert(0, 0) }
assert(expr)
->if iszero(expr) { invalid }