We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently there is the REQUIRE that lets you mimic solidity require(condition, "message")
REQUIRE
require(condition, "message")
I want to propose a REQUIRE_CUSTOM_ERROR:
REQUIRE_CUSTOM_ERROR
#define macro REQUIRE_CUSTOM_ERROR() = takes(2) returns(0) { // [condition, customErrorSig] do_not_throwErr jumpi 0x00 mstore 0x04 0x00 revert do_not_throwErr: pop }
The text was updated successfully, but these errors were encountered:
Perhaps this is even better, (ERROR_SIGNATURE = PUSH4 SIG):
ERROR_SIGNATURE = PUSH4 SIG
/// @notice Reverts with a Custom error #define macro ERR_CUSTOM() = takes (1) returns (0) { // ERROR SIGNATURE 0x00 mstore 0x04 0x1c revert } #define macro REQUIRE_CUSTOM_ERROR(ERROR_SIGNATURE) = takes(2) returns(0) { // [condition, customErrorSig] do_not_throwErr jumpi <ERROR_SIGNATURE> ERR_CUSTOM() do_not_throwErr: }
Sorry, something went wrong.
No branches or pull requests
Currently there is the
REQUIRE
that lets you mimic solidityrequire(condition, "message")
I want to propose a
REQUIRE_CUSTOM_ERROR
:The text was updated successfully, but these errors were encountered: