Skip to main content

Address Gate

info

A newer version of this page is available in the Developer Hub. Click here to read it.

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.

JavaScript — Umi library (recommended)

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

create(umi, {
// ...
guards: {
addressGate: some({ address: someWallet.publicKey }),
},
});

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

API References: create, AddressGate

JavaScript — SDK

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

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.

Was this page helpful?

Happy React is loading...