SystemProgram.assign constructor

SystemProgram.assign({
  1. required SolAddress account,
  2. required SystemAssignLayout layout,
})

Assign system transaction

Implementation

factory SystemProgram.assign({
  /// address of the account which will be assigned a new owner
  required SolAddress account,
  required SystemAssignLayout layout,
}) {
  return SystemProgram(
      layout: layout,
      keys: [
        AccountMeta(publicKey: account, isSigner: true, isWritable: true)
      ],
      programId: SystemProgramConst.programId);
}