Closed eli6 closed 1 year ago
Hi there,
Are you sure that the candy guard account has been created? If so, it may be that it wasn't derived from the address of the candy machine and therefore you need to pass its address explicitly like so:
const nftMint = generateSigner(umi);
await transactionBuilder()
.add(setComputeUnitLimit(umi, { units: 800_000 }))
.add(
mintV2(umi, {
candyMachine: candyMachine.publicKey,
candyGuard: candyMachine.mintAuthority, // <- If a candy machine is associated with a candy guard,
// it will always be saved as its mint authority.
nftMint,
collectionMint: candyMachine.collectionMint,
collectionUpdateAuthority: candyMachine.authority,
mintArgs: {
mintLimit: some({ id: 1 }),
solPayment: some({ destination }),
},
})
)
.sendAndConfirm(umi);
That did the trick, thank you! 😄 I needed to pass the candy guard address explicitly for it to work
Umi version
0.8.2
Code
Error