hardhat-tracer icon indicating copy to clipboard operation
hardhat-tracer copied to clipboard

New features wish list

Open zemse opened this issue 3 years ago • 1 comments

  • [x] Include panic error msg string
  • [x] Allow specifying extra opcodes via cli
  • [x] Implement opcode parsing for common opcodes initially (like add, mul and few more)
  • [x] Check if rpc supports debug_tt before doing a mainnet fork
  • [ ] Handle invalid opcode for old solidity contracts (ethereum/solidity#9824))
  • [ ] Allow decoding events as well in the decode task
  • [ ] Automatically detect network when input hash in trace task
  • [ ] Add ability to export the generated trace as json
  • [ ] Display storage diff
  • [ ] Display trace for failed estimate gas.
  • [ ] Precompiles
  • [ ] Handle Incorrect return data length

zemse avatar May 18 '22 05:05 zemse

Hi @zemse, awesome extension!

Would be nice to have an -o (--output) flag to export the trace in JSON as well. Also, perhaps a way to diff the storage (to track what changed, or have this as part of the output).

shahnami avatar Jun 14 '22 16:06 shahnami

Thanks for the great extension! One interesting idea would be to output a mermaid.js sequence diagram of some sort. (maybe reduce the function variables a bit so it's more readable).

It would give you a more visual overview of the components and stacktrace.

One other feature would be merging proxies and their implementation. Currently they basically print out duplicate traces.

tonisives avatar Feb 18 '23 01:02 tonisives

Thanks! I'll check it out.

zemse avatar Feb 20 '23 03:02 zemse

Thanks for the useful extension, it's really helped me get on-top of storage access patterns to reduce unnecessary loads & stores. Although Solidity still adds some unnecessary ones in there for good measure :shrug:

It would be really useful to know the source line numbers where SLOAD and SSTORE calls are being triggered from.

HarryR avatar Apr 26 '23 04:04 HarryR

I agree, source lines would be useful. Though I wonder how to fit that in the console display since it already prints a lot of stuff which makes it overwhelming sometimes. Maybe behind a flag/config option. I've created an issue for this.

Closing this issue since these pending ones in this issue are in my backlog for a long time and I don't think I can do these anytime soon. But feel free to open a new issue about any feature that can be useful.

zemse avatar Apr 26 '23 09:04 zemse