Updating The Core Candy Machine
JavaScript
Args
Update Core Candy Machine Args
JavaScript
Available arguments that can be passed into the updateCandyMachine function.
name | type |
---|---|
candyMachine | publicKey |
data | data |
Some settings are unabled to be changed/updated once minting has started.
data
Candy Machine Data Object
JavaScript
Assigning a new Authority to the Candy Machine
There may be scenarios where you may wish to transfer the Candy Machine authority across to a new address. This can be achieved with the setMintAuthority
function.
export declare type SetMintAuthorityInstructionAccounts = { /** Candy Machine account. */ candyMachine: PublicKey | Pda; /** Candy Machine authority _/ authority?: Signer; /** New candy machine authority _/ mintAuthority: Signer; };
Assign New Authority to Core Candy Machine
JavaScript
When assigning a new Authority to a Core Candy Machine you will also have to update the Collection Asset to the same update Authority.
Updating guards
Did you set something wrong in your guards? Did you change your mind about the mint price? Do you need to delay the start of the mint of a little? No worries, guards can easily be updated following the same settings used when creating them.
You can enable new guards by providing their settings or disable current ones by giving them empty settings.
Update guards
JavaScript
You may update the guards of a Core Candy Machine the same way you created them. That is, by providing their settings inside the guards
object of the updateCandyGuard
function. Any guard set to none()
or not provided will be disabled.
Note that the entire guards
object will be updated meaning it will override all existing guards!
Therefore, make sure to provide the settings for all guards you want to enable, even if their settings are not changing. You may want to fetch the candy guard account first to fallback to its current guards.
API References: updateCandyGuard, CandyGuard, DefaultGuardSetArgs
Wrapping and unwrapping Candy Guard accounts manually
So far we’ve managed both Core Candy Machine and Core Candy Guard accounts together because that makes the most sense for most projects.
However, it is important to note that Core Candy Machines and Core Candy Guards can be created and associated in different steps, even using our SDKs.
You will first need to create the two accounts separately and associate/dissociate them manually.
Associate and dissociate guards from a Candy Machine
JavaScript
The create
function of the Umi library already takes care of creating and associating a brand new Candy Guard account for every Candy Machine account created.
However, if you wanted to create them separately and manually associate/dissociate them, this is how you’d do it.
API References: createCandyMachine, createCandyGuard, wrap, unwrap
Last updated