Available Guards
Redeemed Amount Guard
Overview
The Redeemed Amount guard forbids minting when the number of minted NFTs for the entire Candy Machine reaches the configured maximum amount.
This guard becomes more interesting when used with Guard Groups since it allows us to add global minting thresholds to our groups.
Guard Settings
The Redeemed Amount guard contains the following settings:
- Maximum: The maximum amount of NFTs that can be minted.
Set up a Candy Machine using the Redeemed Amount Guard
create(umi, {
// ...
itemsAvailable: 500,
guards: {
redeemedAmount: some({ maximum: 300 }),
},
});
Notice that, even if the Candy Machine contains 500 items, only 300 of these items will be mintable because of this guard.
Thus, this guard becomes more useful when using Guard Groups. Here’s another example using two groups such that the first 300 NFTs can be minted for 1 SOL but the last 200 will need 2 SOL to mint.
Using the Redeemed Amount Guard with groups example
create(umi, {
// ...
itemsAvailable: 500,
groups: [
{
label: "early",
guards: {
redeemedAmount: some({ maximum: 300 }),
solPayment: some({ lamports: sol(1), destination: treasury }),
},
},
{
label: "late",
guards: {
solPayment: some({ lamports: sol(2), destination: treasury }),
},
},
],
});
Mint Settings
The Redeemed Amount guard does not need Mint Settings.
Route Instruction
The Redeemed Amount guard does not support the route instruction.