MetaplexTokenEntanglerProgram.createEntangledPair constructor

MetaplexTokenEntanglerProgram.createEntangledPair({
  1. required SolAddress treasuryMint,
  2. required SolAddress payer,
  3. required SolAddress transferAuthority,
  4. required SolAddress authority,
  5. required SolAddress mintA,
  6. required SolAddress metadataA,
  7. required SolAddress editionA,
  8. required SolAddress mintB,
  9. required SolAddress metadataB,
  10. required SolAddress editionB,
  11. required SolAddress tokenB,
  12. required SolAddress tokenAEscrow,
  13. required SolAddress tokenBEscrow,
  14. required SolAddress entangledPair,
  15. required SolAddress reverseEntangledPair,
  16. required MetaplexTokenEntanglerCreateEntangledPairLayout layout,
  17. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  18. SolAddress systemProgram = SystemProgramConst.programId,
  19. 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);
}