Last active
October 21, 2022 11:02
-
-
Save yosriady/80ef80128ba4353d5cc4306a0c54ed6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "count", | |
"type": "uint256" | |
} | |
], | |
"name": "Foo", | |
"type": "error" | |
}, | |
{ | |
"inputs": [], | |
"name": "test", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.6; | |
contract CustomErrorTest { | |
uint256 counter; | |
error Foo(address account, uint256 count); | |
function test() external { | |
counter++; | |
revert Foo(msg.sender, counter); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gauntlet should be able display
Foo(0x123, 123)
when it encounters this revert intest()