I have a function in my smart contract that has several require clauses. I'm using etheres.js to call it from React. When it fails, all I get in the JS Error object is the message "the execution failed due to an exception" and "Internal JSON-RPC error".

How can i get the text of the actual requirement that failed?

enter image description here

  • I don't know how to get the specific error statement but this happens when the network rpc is not correctly entered or the account you are using has insufficient balance.
    – vampireAb
    Jan 7, 2023 at 19:59


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.