StakePoolProgram.increaseAdditionalValidatorStake constructor
StakePoolProgram.increaseAdditionalValidatorStake({
- 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 StakePoolIncreaseAdditionalValidatorStakeLayout layout,
- required SolAddress ephemeralStake,
(Staker only) Increase stake on a validator again in an epoch.
Works regardless if the transient stake account exists.
Internally, this instruction splits reserve stake into an ephemeral
stake account, activates it, then merges or splits it into the
transient stake account delegated to the appropriate validator.
UpdateValidatorListBalance
will do the work of merging once it's
ready.
Implementation
factory StakePoolProgram.increaseAdditionalValidatorStake({
/// 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 StakePoolIncreaseAdditionalValidatorStakeLayout layout,
/// Uninitialized ephemeral stake account to receive stake
required SolAddress ephemeralStake,
}) {
return StakePoolProgram(
layout: layout,
keys: [
stakePool.toReadOnly(),
staker.toSigner(),
withdrawAuthority.toReadOnly(),
validatorList.toWritable(),
reserveStake.toWritable(),
ephemeralStake.toWritable(),
transientStake.toWritable(),
validatorStake.toReadOnly(),
validatorVote.toReadOnly(),
SystemProgramConst.sysvarClockPubkey.toReadOnly(),
SystemProgramConst.sysvarStakeHistoryPubkey.toReadOnly(),
StakeProgramConst.stakeConfigId.toReadOnly(),
SystemProgramConst.programId.toReadOnly(),
StakeProgramConst.programId.toReadOnly()
],
programId: StakePoolProgramConst.programId);
}