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

Forking off of mainnet for local dev #5

Closed
adrianmcli opened this issue Mar 8, 2020 · 0 comments
Closed

Forking off of mainnet for local dev #5

adrianmcli opened this issue Mar 8, 2020 · 0 comments
Labels
blog post idea Topic idea for a future blog post

Comments

@adrianmcli
Copy link
Member

Relevant to #1 and #3 specifically (but maybe other ones too). This may also be a blog post in and of itself.

Ganache

As a test blockchain for local development, Ganache supports forking off another chain so you can interact with already deployed contracts.

  • Ganache-CLI has a --fork option that allows forking off the main chain.
  • Ganache-core also has a similar interface.

Ganache-core can be used as a JS library (imported and run in-memory) while Ganache-CLI is to be used as a typical CLI binary.

The current issue is that you need to supply a provider that allows archival block access (i.e. really old blocks) and Infura (the most popular option) does not support this unless you pay. So you can either pay for the premium plan or run your own node.

Alternatively, we might be able to use Etherscan's API but we'll have to test it out to see if it works.

@adrianmcli adrianmcli added the blog post idea Topic idea for a future blog post label Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog post idea Topic idea for a future blog post
Projects
None yet
Development

No branches or pull requests

2 participants