SystemInstruction.allocate constructor
SystemInstruction.allocate({
- required Ed25519HDPublicKey account,
- required int space,
Allocate space in a (possibly new) account without funding.
Implementation
factory SystemInstruction.allocate({
required Ed25519HDPublicKey account,
required int space,
}) =>
SystemInstruction._(
accounts: [AccountMeta.writeable(pubKey: account, isSigner: true)],
data: ByteArray.merge([
SystemProgram.allocateInstructionIndex,
ByteArray.u64(space),
]),
);