StakePoolProgram.updateTokenMetadata constructor

StakePoolProgram.updateTokenMetadata({
  1. required SolAddress stakePool,
  2. required SolAddress manager,
  3. required SolAddress tokenMetadata,
  4. required SolAddress withdrawAuthority,
  5. required StakePoolUpdateTokenMetaDataLayout layout,
})

Update token metadata for the stake-pool token in the metaplex-token program

Implementation

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

    /// Manager
    required SolAddress manager,

    /// Token metadata account
    required SolAddress tokenMetadata,

    /// Stake pool withdraw authority
    required SolAddress withdrawAuthority,
    required StakePoolUpdateTokenMetaDataLayout layout}) {
  return StakePoolProgram(
      layout: layout,
      keys: [
        stakePool.toReadOnly(),
        manager.toSigner(),
        withdrawAuthority.toReadOnly(),
        tokenMetadata.toWritable(),
        SPLTokenProgramConst.metaDataProgramId.toReadOnly(),
      ],
      programId: StakePoolProgramConst.programId);
}