-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
It is currently (as far as I can tell) impossible to trace a transaction that has happened in the future, as might happen in a development environment when using helpers.
Running npx hardhat node
in one console, in another inside a npx hardhat console
connected to the node:
<Command to do Transaction 1>
{ time } = await import("@nomicfoundation/hardhat-network-helpers")
time.increase(1000000000)
<Command to do Transaction 2>
If you now try and trace those transactions:
npx hardhat trace --hash <tx1 hash> --rpc http://127.0.0.1:8545
This command works
npx hardhat trace --hash <tx2 hash> --rpc http://127.0.0.1:8545
This does not work, and fails with:
Nothing to compile
Activating mainnet fork at block 4
thread 'tokio-runtime-worker' panicked at /build/crates/edr_provider/src/data.rs:2464:18:
current time must be after fork block: SystemTimeError(999999463.793941211s)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
An unexpected error occurred:
[Error: task 37 panicked] { code: 'GenericFailure' }
This error is being thrown here
I was unsure whether to make this here or in the EDR repository directly, but I see @fvictorio is active in this repository as well, so I am hopeful it will end up in the right place regardless!
I haven't tried with a pre-EDR version of hardhat, so do not know if this a regression.
Metadata
Metadata
Assignees
Labels
No labels