zemse / hardhat-tracer

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

Running hardhat trace --hash on arbitrum nova fails "block has a different hardfork than the vm" #46

Open kasumi-1 opened 1 year ago

kasumi-1 commented 1 year ago

I believe the fix is to add skipHardForkValidation: true, to the following two lines:

https://github.com/zemse/hardhat-tracer/blob/21c2b2d1f26c2e63ebe526bb26d7bbc1ca252007/src/tasks/trace.ts#L245

https://github.com/zemse/hardhat-tracer/blob/21c2b2d1f26c2e63ebe526bb26d7bbc1ca252007/src/tasks/trace.ts#L248

It looks like hardhat also skips this validation in some spots, but I am unfamiliar enough with codebase to not know if this could cause issues without some other check in place. The above change worked for me locally.

zemse commented 1 year ago

Thanks for reporting, I've added the fix and published in 2.3.1. Do let me know if there are any issues with it.