Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(advanced): foundry-fork-db #145

Merged
merged 10 commits into from
Oct 1, 2024
Merged

feat(advanced): foundry-fork-db #145

merged 10 commits into from
Oct 1, 2024

Conversation

yash-atreya
Copy link
Member

Motivation

The fork-db functionality was extracted from foundry as foundry-fork-db. This is a generic tool to create and manage forks.

foundry's current forking mechanism and management of multiple forks is based on this.

Solution

Demonstrate a minimal example of how this works using SharedBackend and BlockchainDb.

PR Checklist

  • Added Documentation
  • Breaking changes

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, this should also demonstrate how to use it with revm, like using the Database API and transacting a transfer for example

examples/advanced/examples/foundry_fork_db.rs Outdated Show resolved Hide resolved
@yash-atreya yash-atreya marked this pull request as ready for review September 27, 2024 07:41
Copy link
Member

@klkvr klkvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, lgtm!

I think we should also eventually demonstrate how foundry-fork-db can be plugged into Provider's call and estimate_gas fns to leverage local EVM simulation and caching of individual storage slots

@yash-atreya
Copy link
Member Author

yash-atreya commented Sep 27, 2024

@mattsse needs fork-db release

@zerosnacks zerosnacks mentioned this pull request Oct 1, 2024
@zerosnacks zerosnacks self-requested a review October 1, 2024 15:31
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

@mattsse mattsse merged commit f901a4f into main Oct 1, 2024
4 checks passed
@onbjerg onbjerg deleted the yash/fork-db branch October 28, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants