StakePoolProgram.createTokenMetadata constructor
StakePoolProgram.createTokenMetadata({
- required SolAddress stakePool,
- required SolAddress manager,
- required SolAddress tokenMetadata,
- required SolAddress withdrawAuthority,
- required SolAddress poolMint,
- required SolAddress payer,
- required StakePoolCreateTokenMetaDataLayout layout,
Create token metadata for the stake-pool token in the metaplex-token program
Implementation
factory StakePoolProgram.createTokenMetadata({
/// Stake pool
required SolAddress stakePool,
/// Manager
required SolAddress manager,
/// Token metadata account
required SolAddress tokenMetadata,
/// Stake pool withdraw authority
required SolAddress withdrawAuthority,
/// Pool token mint account
required SolAddress poolMint,
/// Payer for creation of token metadata account
required SolAddress payer,
required StakePoolCreateTokenMetaDataLayout layout,
}) {
return StakePoolProgram(
layout: layout,
keys: [
stakePool.toReadOnly(),
manager.toSigner(),
withdrawAuthority.toReadOnly(),
poolMint.toReadOnly(),
payer.toSignerAndWritable(),
tokenMetadata.toWritable(),
SPLTokenProgramConst.metaDataProgramId.toReadOnly(),
SystemProgramConst.programId.toReadOnly(),
SystemProgramConst.sysvarRentPubkey.toReadOnly(),
],
programId: StakePoolProgramConst.programId);
}