MetaplexTokenEntanglerProgram.createEntangledPair constructor
MetaplexTokenEntanglerProgram.createEntangledPair({
- required SolAddress treasuryMint,
- required SolAddress payer,
- required SolAddress transferAuthority,
- required SolAddress authority,
- required SolAddress mintA,
- required SolAddress metadataA,
- required SolAddress editionA,
- required SolAddress mintB,
- required SolAddress metadataB,
- required SolAddress editionB,
- required SolAddress tokenB,
- required SolAddress tokenAEscrow,
- required SolAddress tokenBEscrow,
- required SolAddress entangledPair,
- required SolAddress reverseEntangledPair,
- required MetaplexTokenEntanglerCreateEntangledPairLayout layout,
- SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress rent = SystemProgramConst.sysvarRentPubkey,
Implementation
factory MetaplexTokenEntanglerProgram.createEntangledPair(
{required SolAddress treasuryMint,
required SolAddress payer,
required SolAddress transferAuthority,
required SolAddress authority,
required SolAddress mintA,
required SolAddress metadataA,
required SolAddress editionA,
required SolAddress mintB,
required SolAddress metadataB,
required SolAddress editionB,
required SolAddress tokenB,
required SolAddress tokenAEscrow,
required SolAddress tokenBEscrow,
required SolAddress entangledPair,
required SolAddress reverseEntangledPair,
required MetaplexTokenEntanglerCreateEntangledPairLayout layout,
SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress rent = SystemProgramConst.sysvarRentPubkey}) {
return MetaplexTokenEntanglerProgram(keys: [
treasuryMint.toReadOnly(),
payer.toSignerAndWritable(),
transferAuthority.toSigner(),
authority.toReadOnly(),
mintA.toReadOnly(),
metadataA.toReadOnly(),
editionA.toReadOnly(),
mintB.toReadOnly(),
metadataB.toReadOnly(),
editionB.toReadOnly(),
tokenB.toWritable(),
tokenAEscrow.toWritable(),
tokenBEscrow.toWritable(),
entangledPair.toWritable(),
reverseEntangledPair.toWritable(),
tokenProgram.toReadOnly(),
systemProgram.toReadOnly(),
rent.toReadOnly()
], programId: MetaplexTokenEntanglerProgramConst.programId, layout: layout);
}