vyperlang / titanoboa

a vyper interpreter
https://titanoboa.readthedocs.io
Other
251 stars 49 forks source link

Use EVMole to improve error messages #250

Open DanielSchiavini opened 3 months ago

DanielSchiavini commented 3 months ago

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