zemse / hardhat-tracer

🕵️ allows you to see internal calls, events and storage operations in the console
MIT License
355 stars 36 forks source link

Make gaslimit and gasprice usable in tracecall #75

Closed area closed 4 months ago

area commented 4 months ago

As it stands, the gasLimit and gasPrice parameters (albeit undocumented?) are not usable. This is because hardhat enforces command line parameters to be lowercase. When trying to use latest hardhat-tracer, and passing --gasLimit to tracecall:

Error HH310: Invalid param --gasLimit. Command line params must be lowercase.

But then when trying to make it lowercase:

Error HH305: Unrecognized param --gaslimit

This PR makes them lowercase. It also appears to work - when tracing a call with --gaslimit and providing much less gas than it needs, at the end of my call I get:

   [EXCEPTION] EvmError(reason: "OUT_OF_GAS")

as I would expect.

zemse commented 4 months ago

Thanks for the PR!