findMintCounterPda static method
ProgramDerivedAddress
findMintCounterPda({
- required int id,
- required SolAddress user,
- required SolAddress candyGuard,
- required SolAddress candyMachine,
- SolAddress programId = MetaplexCandyMachineCoreProgramConst.candyGuardProgramId,
Implementation
static ProgramDerivedAddress findMintCounterPda(
// A unique identifier in the context of a Candy Machine/Candy Guard combo
{required int id,
/// The address of the wallet trying to mint
required SolAddress user,
/// 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: [
"mint_limit".codeUnits,
LayoutConst.u8().serialize(id),
user.toBytes(),
candyGuard.toBytes(),
candyMachine.toBytes()
], programId: programId);
}