-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
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
Execution reverted (coult not decode custom error) #3785
Comments
Thanks for the concise repro steps. I’ll look into this asap. :) |
Found the issue. I make the properties on an error immutable and then try to update the I don't think it makes sense to make the error properties immutable (especially since that isn't included in return type). Trying a few things out. Should be able to have a new version up soon. :) |
Awesome @ricmoo 🚀 |
This should be tied in v6.0.4. Try it out and let me know. :) |
Working great for |
Exactly. There is no way to generically generate a string representation of a custom error. For custom errors, the |
😄 true, noted, thanks @ricmoo |
Thanks to you too! :) |
Ethers Version
6.0.3
Search Terms
decode error
Describe the Problem
Ethers V6 is unable to decode
custom errors
declared in solidity e.gerror RevertWithCode(uint8 code);
and errors msgs from function reverts in solidity e.grequire(a > b, "a is not greater than b");
Reverts with
Cannot assign to read only property 'invocation' of object 'Error: execution reverted (coult not decode custom error)
orError: execution reverted (unknown custom error)
Here is a link to verified contract on bsc testnet that you can use to reproduce the issue
https://testnet.bscscan.com/address/0xb8e82dd09afa2e5a16fb1f62e38b03edc20163e3#code
Code Snippet
Contract ABI
Errors
Environment
node.js (v12 or newer)
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: