I would like to write an external view function that throws when being executed on-chain, but does not throw when executing client-side. (for example when it is called through web3.js)

Is there a way to do this?

  • 2
    I very much doubt there's a way to do this. (If there is, it's likely to be considered a bug and fixed in the future.) I'm curious why you would want this. – user19510 Jul 9 '18 at 19:20

∀ transactions: msg.gas > 0

Check for the gas amount !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.