Support Solidity panic codes in the RuntimeError class
See original GitHub issueHere revert reasons are processed. This currently only understands the revert strings (which have a signature of Error(string)
). It would be nice to also support panic codes (with a signature of Panic(uint256)
).
See https://docs.soliditylang.org/en/v0.8.0/control-structures.html#panic-via-assert-and-error-via-require for more information.
I think ganache should return panic codes as a numeric value for the moment.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Error: VM Exception while processing transaction: revert.
This error happens when a function call jumps out of bounds (e.g array out of bounds). This is done to punish the caller...
Read more >Truffle Error- VM Exception while processing transaction: revert
I am new in this field.What is this error mean and why this error comes??Any one tell me What I mistake in code??....
Read more >Getting VM Exception while processing transaction: revert error
Unlike web3, Truffle doesn't use the methods keyword. The call fails because it's trying to access (non-existing) methods property of the ...
Read more >Expressions and Control Structures - Solidity
Solidity also supports exception handling in the form of try / catch ... The error code supplied with the error data indicates the...
Read more >How to Build a Full Stack NFT Marketplace - V2 (2022)
Building an NFT marketplace with Polygon, Next.js, Tailwind, Solidity, Hardhat, Ethers.js, and IPFS. To view the video course for this tutorial, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW, here’s the Solidity documentation of the panic codes, and here’s the table of panic codes that the debugger uses for interpreting them. 😃 (And which Truffle Contract would presumably also use if we added support for that there…)
Just realized this may be related to some changes plan to make to our eth_call error message strings that would provide additional information over what we give now. @MicaiahReid, I couldn’t find an issue for the new error strings we were talking about adding; they might all map to these specific panic codes.