You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to handle an uncertain amount of PDA accounts on an instruction. so I passed them as remaining accounts. but, I need to initiate anyone if it hasn't been initiated. so I found two functions create_account and create_account_with_seeds on anchor-lang-0.30.1/src/system_program.rs, which may suit my requirements.
Question 1: what do the parameters mean on CreateAccount?
Question 2: seed: &str and pub base: AccountInfo<'info> on CreateAccountWithSeed, both of them still not made clear to me what I should correctly pass in, seed is str, but my PDA account was build by two string. the base is especially unknown what does means.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need to handle an uncertain amount of PDA accounts on an instruction. so I passed them as remaining accounts. but, I need to initiate anyone if it hasn't been initiated. so I found two functions
create_account
andcreate_account_with_seeds
onanchor-lang-0.30.1/src/system_program.rs
, which may suit my requirements.Question 1: what do the parameters mean on CreateAccount?
Question 2:
seed: &str
andpub base: AccountInfo<'info>
onCreateAccountWithSeed
, both of them still not made clear to me what I should correctly pass in, seed is str, but my PDA account was build by two string. the base is especially unknown what does means.and
Some code use cases on github cannot solve my doubts.
Beta Was this translation helpful? Give feedback.
All reactions