Program Gate Guard

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.

if the mint transaction contains instructions

from additional programs

Minting will fail

Core Candy Machine

Owner: Core Candy Machine Core Program

Candy Guard

Owner: Core Candy Guard Program

GuardsProgramGate- additional...

Mint from

Core Candy Guard Program

Access Control

Mint from

Core Candy Machine Program

Mint Logic

Asset

React Flow

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

JavaScript

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.

Last updated