SystemProgram.createAccountWithSeed constructor
SystemProgram.createAccountWithSeed({
- required SolAddress from,
- required SolAddress newAccount,
- required SolAddress baseAccount,
- required SystemCreateWithSeedLayout layout,
Create account with seed system transaction
Implementation
factory SystemProgram.createAccountWithSeed({
/// The account that will transfer lamports to the created account
required SolAddress from,
/// address of the created account.
required SolAddress newAccount,
/// Base address to use to derive the address of the created account
required SolAddress baseAccount,
required SystemCreateWithSeedLayout layout,
}) {
return SystemProgram(
layout: layout,
keys: [
AccountMeta(publicKey: from, isSigner: true, isWritable: true),
AccountMeta(publicKey: newAccount, isSigner: false, isWritable: true)
],
programId: SystemProgramConst.programId);
}