StakePoolAccount.fromBuffer constructor
StakePoolAccount.fromBuffer({
- required List<
int> data, - required SolAddress address,
Implementation
factory StakePoolAccount.fromBuffer(
{required List<int> data, required SolAddress address}) {
final decode = _Utils.layout.deserialize(data).value;
return StakePoolAccount(
address: address,
accountType: StakePoolAccountType.fromValue(decode["accountType"]),
manager: decode["manager"],
staker: decode["staker"],
stakeDepositAuthority: decode["stakeDepositAuthority"],
stakeWithdrawBumpSeed: decode["stakeWithdrawBumpSeed"],
validatorList: decode["validatorList"],
reserveStake: decode["reserveStake"],
poolMint: decode["poolMint"],
managerFeeAccount: decode["managerFeeAccount"],
tokenProgramId: decode["tokenProgramId"],
totalLamports: decode["totalLamports"],
poolTokenSupply: decode["poolTokenSupply"],
lastUpdateEpoch: decode["lastUpdateEpoch"],
lockup: StakeLockup.fromJson(decode["lockup"]),
epochFee: StakePoolFee.fromJson(decode["epochFee"]),
nextEpochFee: decode["nextEpochFee"] == null
? null
: StakePoolFee.fromJson(decode["nextEpochFee"]),
preferredDepositValidatorVoteAddress:
decode["preferredDepositValidatorVoteAddress"],
preferredWithdrawValidatorVoteAddress:
decode["preferredWithdrawValidatorVoteAddress"],
stakeDepositFee: StakePoolFee.fromJson(decode["stakeDepositFee"]),
stakeWithdrawalFee: StakePoolFee.fromJson(decode["stakeWithdrawalFee"]),
nextStakeWithdrawalFee: decode["nextStakeWithdrawalFee"] == null
? null
: StakePoolFee.fromJson(decode["nextStakeWithdrawalFee"]),
nextSolWithdrawalFee: decode["nextSolWithdrawalFee"] == null
? null
: StakePoolFee.fromJson(decode["nextSolWithdrawalFee"]),
stakeReferralFee: decode["stakeReferralFee"],
solDepositAuthority: decode["solDepositAuthority"],
solDepositFee: StakePoolFee.fromJson(decode["solDepositFee"]),
solReferralFee: decode["solReferralFee"],
solWithdrawAuthority: decode["solWithdrawAuthority"],
solWithdrawalFee: StakePoolFee.fromJson(decode["solWithdrawalFee"]),
lastEpochPoolTokenSupply: decode["lastEpochPoolTokenSupply"],
lastEpochTotalLamports: decode["lastEpochTotalLamports"]);
}