Closed fulldecent closed 1 year ago
Your usage is correct. The trace for the transaction is just the first two lines, the logic doesn't stop there which is a bug.
ALL UnknownContractAndFunction(to=0xREDACTED, input=0xREDACTED, ret=0x)
EVENT <UnknownContract 0xREDACTED>.UnknownEvent(0xREDACTED, [0xREDACTED, 0xREDACTED, 0xREDACTED, 0xREDACTED])
// You can ignore things after that.
The fix is just released in hardhat-tracer@1.1.1
. Sorry for the delay in response, if you get chance to try this out, do lmk if there are any further issues with this.
Perfect, thank you!
And I was able to use this (undocumented?) usage to get what I wanted:
npx hardhat trace --fulltrace --hash 0xxxxxxTXxIDxxxxxx --rpc http://127.0.0.1:8545/
I am trying to use hardhat-tracer in this way:
npx hardhat node --fork https://mainnet.infura.io/v3/xxxxAPIxKEYxxxxxx
open in one terminalnode aScript.js
in another terminal withethers.providers.JsonRpcProvider("http://127.0.0.1:8545/")
npx hardhat trace --hash 0xxxxxxTXxIDxxxxxx --rpc http://127.0.0.1:8545/
in a third terminalHardhat is configured to fork Ethereum Mainnet.
The contract being traced is not built using Hardhat, I'm doing a reverse engineering/blackbox inspection task.
This produces an error (the third terminal) with:
I can see from terminal 2, this is how the tracer is driving Hardhat (terminal 1):
Please advise if I am using hardhat-tracer in a supported way and how I could achieve this.