1

Solidity version 0.4.22 introduced error reasons for require and revert (https://github.com/ethereum/solidity/releases/tag/v0.4.22).

I tried using them, but it looks like they only work when I'm using the javascript VM on remix. When calling a function using web3 the error is a good old "Error: VM Exception while processing transaction: revert" without any extra info.

Am I missing something?

  • 1
    To my knowledge, those reason strings aren't persisted anywhere. They can be seen by debug trace, and I imagine tools like Etherscan will make them visible to end users. – user19510 Jul 9 '18 at 18:22
  • I expected it to show up in the transaction receipt, but it's not, and since they are not persisted anywhere as you say, I'm not sure what they actually do – Makaronodentro Jul 10 '18 at 15:54
  • They're used for debugging purposes, and as I said, I would expect tools like Etherscan to display them to end users in the future. – user19510 Jul 10 '18 at 15:55

Browse other questions tagged or ask your own question.