SystemProgram.allocate constructor

SystemProgram.allocate({
  1. required SolAddress accountPubkey,
  2. required SystemAllocateLayout layout,
})

Allocate account system transaction

Implementation

factory SystemProgram.allocate({
  /// Account to allocate
  required SolAddress accountPubkey,
  required SystemAllocateLayout layout,
}) {
  return SystemProgram(
      layout: layout,
      keys: [accountPubkey.toSignerAndWritable()],
      programId: SystemProgramConst.programId);
}