createAccount static method

TransactionInstruction createAccount({
  1. required Pubkey fromPubkey,
  2. required Pubkey newAccountPubkey,
  3. required bu64 lamports,
})

Creates a SystemProgram instruction that generates a stake account.

Implementation

static TransactionInstruction createAccount({
  required final Pubkey fromPubkey,
  required final Pubkey newAccountPubkey,
  required final bu64 lamports,
}) {
  return SystemProgram.createAccount(
    fromPubkey: fromPubkey,
    newAccountPubkey: newAccountPubkey,
    lamports: lamports,
    space: space.toBigInt(),
    programId: programId,
  );
}