Support error type
cburgdorf opened this issue · comments
There doesn't seem to exist support for the new error
type that is defined in the latest ABI spec.
Consider the followign solidity code:
pragma solidity ^0.8.5;
error DummyError(uint256 reason);
contract Foo {
function bar() public pure {
revert DummyError({reason: 4});
}
}
The ABI that solc
generates from this is:
[
{
"inputs":[
{
"internalType":"uint256",
"name":"reason",
"type":"uint256"
}
],
"name":"DummyError",
"type":"error"
},
{
"inputs":[
],
"name":"bar",
"outputs":[
],
"stateMutability":"pure",
"type":"function"
}
]
Feeding that to ethabi
results in the following error:
"Invalid operation type error."
So, I guess error
is just not yet supported as a type
.
We are also seeing this issue on graphprotocol/graph-node graphprotocol/graph-node#2577
Hey! Any update on this?
Unfortunately we don't have resources for this at the moment. Fortunately, someone has a draft PR already started here: #251
I'll be happy to review and merge as soon it's ready.