Skip to content

Instantly share code, notes, and snippets.

@yosriady
Last active October 21, 2022 11:02
Show Gist options
  • Save yosriady/80ef80128ba4353d5cc4306a0c54ed6f to your computer and use it in GitHub Desktop.
Save yosriady/80ef80128ba4353d5cc4306a0c54ed6f to your computer and use it in GitHub Desktop.
[
{
"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"
}
]
// 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);
}
}
@yosriady
Copy link
Author

yosriady commented Oct 21, 2022

Gauntlet should be able display Foo(0x123, 123) when it encounters this revert in test()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment