StakePoolProgram.increaseValidatorStake constructor
StakePoolProgram.increaseValidatorStake({
- required SolAddress stakePool,
- required SolAddress staker,
- required SolAddress withdrawAuthority,
- required SolAddress validatorList,
- required SolAddress reserveStake,
- required SolAddress transientStake,
- required SolAddress validatorStake,
- required SolAddress validatorVote,
- required StakePoolIncreaseValidatorStakeLayout layout,
(Staker only) Increase stake on a validator from the reserve account
Internally, this instruction splits reserve stake into a transient stake
account and delegate to the appropriate validator.
UpdateValidatorListBalance
will do the work of merging once it's
ready.
Implementation
factory StakePoolProgram.increaseValidatorStake({
/// Stake pool
required SolAddress stakePool,
/// Stake pool staker
required SolAddress staker,
/// Stake pool withdraw authority
required SolAddress withdrawAuthority,
/// Validator list
required SolAddress validatorList,
/// Stake pool reserve stake
required SolAddress reserveStake,
/// Transient stake account
required SolAddress transientStake,
/// Validator stake account
required SolAddress validatorStake,
/// Validator vote account to delegate to
required SolAddress validatorVote,
required StakePoolIncreaseValidatorStakeLayout layout,
}) {
return StakePoolProgram(
layout: layout,
keys: [
stakePool.toReadOnly(),
staker.toSigner(),
withdrawAuthority.toReadOnly(),
validatorList.toWritable(),
reserveStake.toWritable(),
transientStake.toWritable(),
validatorStake.toReadOnly(),
validatorVote.toReadOnly(),
SystemProgramConst.sysvarClockPubkey.toReadOnly(),
SystemProgramConst.sysvarRentPubkey.toReadOnly(),
SystemProgramConst.sysvarStakeHistoryPubkey.toReadOnly(),
StakeProgramConst.stakeConfigId.toReadOnly(),
SystemProgramConst.programId.toReadOnly(),
StakeProgramConst.programId.toReadOnly()
],
programId: StakePoolProgramConst.programId);
}