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

Enable The Ability To Create Mock Localnet Environments Which Mirror Production Deployments #533

Closed
bonedaddy opened this issue Jul 18, 2021 · 1 comment · Fixed by #834
Labels
cli help wanted Extra attention is needed

Comments

@bonedaddy
Copy link
Contributor

Overview

In certain situations you may be developing a program which uses another program. The program which you are integrating does not have information about how to construct its initial state. For example with Raydium there is no information about how to create their lp pools, fusion farms, etc.. In my experience this has meant mocking as much of said program as possible, but this is never perfect and when deploying the program into production the first, there is usually something incorrect due to assumptions made with the mocking process.

Proposed Solution

The solana-test-validator lets you sepcify BPF programs to load, and accounts to clone from mainnet. These two features combined allow you to effectively mirror any production deployment on the localnet.

For example you could have Anchor.toml look like

[[test.genesis]]
address = "abc123"
program = "./foo/bar.so"
[[test.account]]
address = "abc123"
source = "https://some-mainnet-api.com"
@armaniferrante armaniferrante added help wanted Extra attention is needed hacktoberfest labels Sep 27, 2021
@KillerGiraffe
Copy link

Would love to tackle this if anyone has ideas on how they would implement this internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants