NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7k stars 1.35k forks source link

Clean up the VMTracer and trace events interface in TS #5429

Closed Xanewok closed 6 days ago

Xanewok commented 1 week ago

Rather than defining the callbacks at the provider instantiation time for the entire lifetime of the provider, this allows for a more granular control of injecting the trace event listener (VMTracer), thus simplifying how the information flows. In the test logic, we no longer tightly couple two classes but have to keep them side by side and we can stop observing the EVM if needed, without paying the runtime cost.

While technically it's a standalone improvement, the https://github.com/NomicFoundation/edr/pull/531 can nicely build on top if it as it will also allow us to conveniently observe the trace whenever needed all at once in Rust (with the Rust port of VmTracer in that PR); it also removes some dead code.

changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 2fe2cff7863bd69c22e2b7669fdf0a88f5c3d77c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 9:23pm
gitpoap-bot[bot] commented 6 days ago

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2024 Hardhat Contributor:

GitPOAP: 2024 Hardhat Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.