You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Occurs when estimating gas (to see if the request will revert) or calling the function without gas estimation first.
The info about which error was thrown is not available from the RPC, when reverting using custom errors. (https://soliditylang.org/blog/2021/04/21/custom-errors/).
When reverting with just a string like this.
require(amount > 0, "Amount must be greater than 0");
It works as expected and the RPC displays the string.
But if you use custom errors, there is no revert reason.
If you deploy this on ShimmerEVM and watch the rpc result, it doesn't have any data about which error was thrown, if you do the same on another chain it would include a hex value to be parsed.
Expected behavior
I expect to get a hex value which can be parsed by the contract abi to interpret the error with any parameters it might have.
Screenshots
Example of expected RPC output:
Notice that the "result" property has a hex value, which corrosponds to a custom error in the ABI.
Actual output from RPC:
It just includes a generic message saying that the request might require more gas than allowed.
Network and versioning
ShimmerEVM testnet
The text was updated successfully, but these errors were encountered:
Describe the bug
Occurs when estimating gas (to see if the request will revert) or calling the function without gas estimation first.
The info about which error was thrown is not available from the RPC, when reverting using custom errors. (https://soliditylang.org/blog/2021/04/21/custom-errors/).
When reverting with just a string like this.
require(amount > 0, "Amount must be greater than 0");
It works as expected and the RPC displays the string.
But if you use custom errors, there is no revert reason.
To Reproduce
This is an article about custom errors, which includes a code sample. https://gist.github.com/fassko/b22c722f1d488528791f8c99e42c6a73
If you deploy this on ShimmerEVM and watch the rpc result, it doesn't have any data about which error was thrown, if you do the same on another chain it would include a hex value to be parsed.
Expected behavior
I expect to get a hex value which can be parsed by the contract abi to interpret the error with any parameters it might have.
Screenshots
Example of expected RPC output:
Notice that the "result" property has a hex value, which corrosponds to a custom error in the ABI.
Actual output from RPC:
It just includes a generic message saying that the request might require more gas than allowed.
Network and versioning
ShimmerEVM testnet
The text was updated successfully, but these errors were encountered: