findAllocationTrackerPda static method

ProgramDerivedAddress findAllocationTrackerPda({
  1. required int id,
  2. required SolAddress candyGuard,
  3. required SolAddress candyMachine,
  4. SolAddress programId = MetaplexCandyMachineCoreProgramConst.candyGuardProgramId,
})

Implementation

static ProgramDerivedAddress findAllocationTrackerPda(

    /// Unique identifier of the allocation
    {required int id,

    /// The address of the Candy Guard account
    required SolAddress candyGuard,

    /// The address of the Candy Machine account
    required SolAddress candyMachine,
    SolAddress programId =
        MetaplexCandyMachineCoreProgramConst.candyGuardProgramId}) {
  return ProgramDerivedAddress.find(seedBytes: [
    "allocation".codeUnits,
    LayoutConst.u8().serialize(id),
    candyGuard.toBytes(),
    candyMachine.toBytes()
  ], programId: programId);
}