titanoboa icon indicating copy to clipboard operation
titanoboa copied to clipboard

Use EVMole to improve error messages

Open DanielSchiavini opened this issue 7 months ago • 0 comments

The EVMole library extracts function selectors and arguments from bytecode, even for unverified contracts.

We could use EVMole together with Etherscan to provide more detailed errors, traces and stack traces.

Suggested UX

  1. We add evmole as a forking-recommended optional dependency
  2. When an error occurs or a trace is requested, we first check whether the contract is registered in the environment
  3. If the contract isn't registered, we look for an Etherscan API key (see #249)
  4. If there's no Etherscan API key or the contract isn't verified, we try to import evmole
  5. If we can import evmole, use it for generating more detailed errors. Otherwise we can add a tip for the user to install it

DanielSchiavini avatar Jun 26 '24 07:06 DanielSchiavini