SystemProgram.transfer constructor
SystemProgram.transfer({
- required SystemTransferLayout layout,
- required SolAddress from,
- required SolAddress to,
Transfer system transaction
Implementation
factory SystemProgram.transfer({
required SystemTransferLayout layout,
/// Account that will transfer lamports
required SolAddress from,
/// Account that will receive transferred lamports
required SolAddress to,
}) {
return SystemProgram(
layout: layout,
keys: [
AccountMeta(publicKey: from, isSigner: true, isWritable: true),
AccountMeta(publicKey: to, isSigner: false, isWritable: true)
],
programId: SystemProgramConst.programId);
}