SystemProgram.assignWithSeed constructor

SystemProgram.assignWithSeed({
  1. required SolAddress account,
  2. required SystemAssignWithSeedLayout layout,
})

Assign account with seed system transaction

Implementation

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