Available Guards
Program Gate Guard
Last updated March 10, 2026
The Program Gate guard restricts which programs can appear in a mint transaction, preventing bots from injecting malicious instructions from unauthorized programs.
Overview
The Program Gate guard restricts the programs that can be in a mint transaction. This is useful to prevent bots adding malicious instructions from arbitrary programs in the same transaction as the mint.
The guard allows the necessary programs for the mint and any other program specified in the configuration.
Guard Settings
The Program Gate guard contains the following settings:
- Additional: List of additional programs addresses (up to 5 addresses) that are allowed to include instructions on the mint transaction.
Set up a Core Candy Machine using the Program Gate guard
create(umi, {
// ...
guards: {
programGate: some({ additional: [<PUBKEY 1>, <PUBKEY 2>, ..., <PUBKEY 5>] }),
},
});
API References: create, ProgramGate
Mint Settings
The Program Gate guard does not need Mint Settings.
Route Instruction
The Program Gate guard does not support the route instruction.
Notes
- The
additionallist supports a maximum of 5 program addresses. Programs required for the standard Candy Machine mint flow are automatically allowed and do not need to be included. - When this guard is enabled, any mint transaction that contains instructions from programs not in the allowlist will fail. This is an effective anti-bot measure but may block legitimate use cases if third-party programs are needed during the mint.
- This guard does not restrict CPI (cross-program invocation) calls made internally by allowed programs -- it only checks the top-level instructions in the transaction.
