Skip to main content

Start Date

info

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

Overview

The Start Date guard determines the start date of the mint. Before this date, minting is not allowed.

CandyMachinesV3-GuardsStartDate.png

Guard Settings

The Start Date guard contains the following settings:

  • Date: The date before which minting is not allowed.

JavaScript — Umi library (recommended)

Here’s how we can set up a Candy Machine using the Start Date guard.

import { dateTime } from "@metaplex-foundation/umi";

create(umi, {
// ...
guards: {
startDate: some({ date: dateTime("2022-10-24T15:30:00.000Z") }),
},
});

API References: create, StartDate

JavaScript — SDK

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

import { toDateTime } from "@metaplex-foundation/js";

const { candyMachine } = await metaplex.candyMachines().create({
// ...
guards: {
startDate: {
date: toDateTime("2022-10-24T15:30:00.000Z"),
},
},
});

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

Mint Settings

The Start Date guard does not need Mint Settings.

Route Instruction

The Start Date guard does not support the route instruction.