setManager static method

TransactionInstruction setManager({
  1. required Pubkey stakePoolAddress,
  2. required Pubkey manager,
  3. required Pubkey newManager,
  4. required Pubkey newManagerFeeAccount,
})

(Manager only) Update manager.

Keys:

  • [w] stakePoolAddress - StakePool.
  • [s] manager - Manager.
  • [s] newManager - New manager.
  • [] newManagerFeeAccount - New manager fee account.

Implementation

static TransactionInstruction setManager({
  required final Pubkey stakePoolAddress,
  required final Pubkey manager,
  required final Pubkey newManager,
  required final Pubkey newManagerFeeAccount,
}) {
  /// 0. `[w]` StakePool
  /// 1. `[s]` Manager
  /// 2. `[s]` New manager
  /// 3. `[]` New manager fee account
  final List<AccountMeta> keys = [
    AccountMeta.writable(stakePoolAddress),
    AccountMeta.signer(manager),
    AccountMeta.signer(newManager),
    AccountMeta(newManagerFeeAccount),
  ];

  return _instance.createTransactionIntruction(
    StakePoolInstruction.setManager,
    keys: keys,
  );
}