Skip to main content

Address Gate

Overview

The Address Gate guard restricts the mint to a single address which must match the address of the minting wallet.

CandyMachinesV3-GuardsAddressGate.png

Guard Settings

The Address Gate guard contains the following settings:

  • Address: The only address that is allowed to mint from the Candy Machine.

JS SDK

Here’s how we can set up a Candy Machine using the Address Gate guard via the JS SDK.

import { TODO } from '@metaplex-foundation/js';
import { TODO } from '@solana/web3.js';

const { candyMachine } = await metaplex.candyMachines().create({
// ...
guards: {
addressGate: {
address: someWallet.publicKey,
},
},
});

Now, only someWallet will be able to mint from this Candy Machine.

API References: Operation, Input, Output, Transaction Builder, Guard Settings.

Mint Settings

The Address Gate guard does not need Mint Settings.

Route Instruction

The Address Gate guard does not support the route instruction.