MetaplexTokenMetaDataProgram.delegate constructor
MetaplexTokenMetaDataProgram.delegate({
- required SolAddress delegate,
- required SolAddress metadata,
- required SolAddress mint,
- required SolAddress authority,
- required SolAddress payer,
- required SolAddress sysvarInstructions,
- required MetaplexTokenMetaDataDelegateProgramLayout layout,
- SolAddress? delegateRecord,
- SolAddress? masterEdition,
- SolAddress? tokenRecord,
- SolAddress? token,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress? splTokenProgram,
- SolAddress? authorizationRulesProgram,
- SolAddress? authorizationRules,
Implementation
factory MetaplexTokenMetaDataProgram.delegate({
required SolAddress delegate,
required SolAddress metadata,
required SolAddress mint,
required SolAddress authority,
required SolAddress payer,
required SolAddress sysvarInstructions,
required MetaplexTokenMetaDataDelegateProgramLayout layout,
SolAddress? delegateRecord,
SolAddress? masterEdition,
SolAddress? tokenRecord,
SolAddress? token,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress? splTokenProgram,
SolAddress? authorizationRulesProgram,
SolAddress? authorizationRules,
}) {
return MetaplexTokenMetaDataProgram(keys: [
delegateRecord?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
delegate.toReadOnly(),
metadata.toWritable(),
masterEdition?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
(tokenRecord?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly())
.copyWith(isWritable: tokenRecord != null),
mint.toReadOnly(),
(token?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly())
.copyWith(isWritable: token != null),
authority.toSigner(),
payer.toSignerAndWritable(),
systemProgram.toReadOnly(),
sysvarInstructions.toReadOnly(),
splTokenProgram?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
authorizationRulesProgram?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
authorizationRules?.toReadOnly() ??
MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
], programId: MetaplexTokenMetaDataProgramConst.programId, layout: layout);
}