-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cli: Generate accounts with funded lamports and SPL tokens #1261
Comments
some initial ideas: instead of defining test settings in the main
the test-one.toml file is where all the these would be defined exactly like they are in the rust code so if you have an account like this #[account]
pub struct Data {
pub val: u64,
pub str: String,
pub numbers: [u8; 10]
} u define an account of that type in the genesis config like accounts:
- owner: Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS
data:
val: 1337
str: "a cool string"
numbers: [1,2,3,4,5,6,7,8,9,10] the account in this config would then get processed and turned into a file that can be uploaded via the might make sense to allow filepaths to genesis files in the |
some open questions:
|
Some more ideas/open questions:
|
What is the motivation behind changing the configuration structure? At first glance it looks too complex to me, but I think there is some need to provide specific validator setups for different test suites (#339 is related). Is that the reasoning here? In general few things should need to change in the test validator settings between test suites. The loaded accounts, the genesis programs, and perhaps clone options, so I like keeping everything in the root |
This would be extremely helpful for me. Our program interacts with user mSol, but I'm a noob so it would probably take a few hours (or help) for me to figure out how to use existing clone options in
would be really convenient |
yes. independent test suites are one motivation. but also (and it would probably make sense to do this in a separate PR) more configuration options for local environments. Im not a fan of having all the test settings in the main and while I agree that we should support |
@asktree using this particular config you mentioned, what would you like to happen? |
the idea is that this would use the genesis block to airdrop to I suppose missing from my example is an amount to airdrop. my understanding is that this is already possible in userland, you just have to know how to make the ATAs and you can use [[test.validator.account]]? |
I think the ability to have |
yes that makes sense! just wanted to clarify because like you said the amount was missing.
yes, either you make the accounts and then use
why not? |
I dont remember because it's been a while since we made this choice. I think early on we realized we'd need the metaplex programs on our test validator but couldn't figure out how to do this within |
The list of test validator settings is here. I don't really see anything there that needs to change per test outside of
This issue is about providing prefunded accounts in the format that |
agreed lets get this done first #1658 |
this would be cool to have |
We should use #1260 to setup
solana-test-validator
for testing by automatically generating a bunch of accounts funded with lamports and SPL tokens--including all the most popular mints like USDC.The text was updated successfully, but these errors were encountered: