Open sohrab- opened 1 year ago
Here is the manifest if anyone needs the work-around:
import {
CandyGuardManifest,
createSerializerFromBeet,
} from "@metaplex-foundation/js";
import {
Allocation,
allocationBeet,
} from "@metaplex-foundation/mpl-candy-guard";
export const allocationGuardManifest: CandyGuardManifest<Allocation> = {
name: "allocation",
settingsBytes: 5,
settingsSerializer: createSerializerFromBeet(allocationBeet),
};
Btw this ☝️ is not enough if you are planning to use the allocation
guard. That's just enough to skip it to get to our custom guards
Hi there, thanks for that. Would you be able to PR this into the SDK?
Lemme see if I can understand what it does. The manifest is easy enough but need to know what it does to write the proper unit tests 😅
There is a 20th guard, called
allocation
, in the on-chain program but it is not registered in the SDK.Let's say I add a 21st custom guard, below
allocation
, to the on-chain program and register it with the SDK, when trying to create the Candy Machine, the SDK seems to serialise the settings for this new custom guard into theallocation
guard settings, i.e. off-by-one.allocation
be registered by default?allocation
?allocation
and register it myself?allocation
?