This Truffle plugin helps you troubleshoot problems during interaction with your smart contracts.
(1) Install the plugin with npm
npm install truffle-troubleshoot
(2) Add the plugin to your
moduleexports =/* ... rest of truffle-config */plugins:'truffle-troubleshoot'
The plugin consists of several commands, which are listed below:
This command prints the revert reason of a failed transaction. It requires the transaction hash as single argument.
truffle run troubleshoot revert-reason 0x1234....