StakePoolProgram.updateStakePoolBalance constructor

StakePoolProgram.updateStakePoolBalance({
  1. required SolAddress stakePool,
  2. required SolAddress withdrawAuthority,
  3. required SolAddress validatorList,
  4. required SolAddress reserveStake,
  5. required SolAddress managerFeeAccount,
  6. required SolAddress poolMint,
})

Updates total pool balance based on balances in the reserve and validator list

Implementation

factory StakePoolProgram.updateStakePoolBalance({
  /// Stake pool
  required SolAddress stakePool,

  /// Stake pool withdraw authority
  required SolAddress withdrawAuthority,

  /// Validator stake list storage account
  required SolAddress validatorList,

  /// Reserve stake account
  required SolAddress reserveStake,

  /// Account to receive pool fee tokens
  required SolAddress managerFeeAccount,

  /// Pool mint account
  required SolAddress poolMint,
}) {
  return StakePoolProgram(
      layout: const StakePoolUpdateStakePoolBalanceLayout(),
      keys: [
        stakePool.toWritable(),
        withdrawAuthority.toReadOnly(),
        validatorList.toWritable(),
        reserveStake.toReadOnly(),
        managerFeeAccount.toWritable(),
        poolMint.toWritable(),
        SPLTokenProgramConst.tokenProgramId.toReadOnly()
      ],
      programId: StakePoolProgramConst.programId);
}