# Program Gate Guard

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](https://reactflow.dev/)

### Guard Settings <a href="#guard-settings" id="guard-settings"></a>

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](https://mpl-core-candy-machine.typedoc.metaplex.com/functions/create.html), [ProgramGate](https://mpl-core-candy-machine.typedoc.metaplex.com/types/ProgramGate.html)

### Mint Settings <a href="#mint-settings" id="mint-settings"></a>

*The Program Gate guard does not need Mint Settings.*

### Route Instruction <a href="#route-instruction" id="route-instruction"></a>

*The Program Gate guard does not support the route instruction.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://8bit-1.gitbook.io/solibrary/program-gate-guard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
