zemse / hardhat-tracer

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

Add support of Hardhat Toolbox 3 with Ethers 6, please #54

Closed Yurii921 closed 1 year ago

Yurii921 commented 1 year ago

When using @nomicfoundation/hardhat-toolbox@3.0.0 and importing hardhat-tracer in the Hardhat config hardhat.config.ts, the command npx hardhat test fails with the error:

Error HH21: You tried to access an uninitialized provider. To initialize the provider, make sure you first call `.init()` or any method that hits a node like request, send or sendAsync.

HardhatError: HH21: You tried to access an uninitialized provider. To initialize the provider, make sure you first call `.init()` or any method that hits a node like request, send or sendAsync.
    at LazyInitializationProviderAdapter.get _wrapped [as _wrapped] (/.../node_modules/hardhat/src/internal/core/providers/lazy-initializatio
n.ts:32:13)
    at isTracerAlreadyWrappedInHreProvider (/.../node_modules/hardhat-tracer/src/wrapper.ts:136:25)
    at wrapHardhatProvider (/.../node_modules/hardhat-tracer/src/wrapper.ts:108:7)
    at OverriddenTaskDefinition._action (/.../node_modules/hardhat-tracer/src/utils/task-helpers.ts:16:26)
    at Environment._runTaskDefinition (/.../node_modules/hardhat/src/internal/core/runtime-environment.ts:333:35)
    at Environment.run (/.../node_modules/hardhat/src/internal/core/runtime-environment.ts:166:25)
    at main (/.../node_modules/hardhat/src/internal/cli/cli.ts:280:17)

P. S. hardhat-tracer@2.4.0.

zemse commented 1 year ago

Thanks for reporting, I'm looking into this.

zemse commented 1 year ago

Can you try hardhat-tracer@2.5.0? Support for hardhat 2.16 is added.

Yurii921 commented 1 year ago

It works. Thank you.