Skip to main content

End Date

info

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

Overview

The End Date guard specifies a date to end the mint. After this date, minting is no longer allowed.

CandyMachinesV3-GuardsEndDate.png

Guard Settings

The End Date guard contains the following settings:

  • Date: The date after which minting is no longer allowed.

JavaScript — Umi library (recommended)

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

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

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

API References: create, EndDate

JavaScript — SDK

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

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

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

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

Mint Settings

The End Date guard does not need Mint Settings.

Route Instruction

The End Date guard does not support the route instruction.