Last active
January 2, 2019 10:17
-
-
Save jamesmorgan/eacf00a1fde0f5d94e8a4e82511ace55 to your computer and use it in GitHub Desktop.
revert-reasons.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
await contract.methodCall(); | |
} catch (error) { | |
// error.reason now populated with an REVERT reason | |
console.log("Failure reason", error.reason); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment