Created following candy machine, fetching and adding items, everything works as expected ` async function create_cm() { const collectionUpdateAuthority = generateSigner(umi); const collectionMint = generateSigner(umi);
let collection = await createNft(umi, {
mint: collectionMint,
authority: collectionUpdateAuthority,
name: 'My Collection NFT 1',
uri: '',
sellerFeeBasisPoints: percentAmount(9.99, 2), // 9.99%
isCollection: true,
}).sendAndConfirm(umi);
const candyMachine = generateSigner(umi);
console.log("Accounts")
console.log(collectionMint.publicKey);
console.log(collectionUpdateAuthority.publicKey);
console.log(candyMachine.publicKey);
let nft = await create(umi, {
candyMachine,
collectionMint: collectionMint.publicKey,
collectionUpdateAuthority,
tokenStandard: TokenStandard.NonFungible,
sellerFeeBasisPoints: percentAmount(9.99, 2), // 9.99%
itemsAvailable: 10,
creators: [
{
address: umi.identity.publicKey,
verified: true,
percentageShare: 100,
},
],
configLineSettings: some({
prefixName: "",
nameLength: 32,
prefixUri: "",
uriLength: 90,
isSequential: true,
}),
});
let tx = await nft.buildWithLatestBlockhash(umi, {
commitment: "finalized",
});
console.log(tx.message);
console.log(await nft.sendAndConfirm(umi));
}`
While minting it throws error,
const testMint=async()=>{
const candyMachine = await fetchCandyMachine(umi, #created candy machine address#)
const candyGuard = await fetchCandyGuard(umi, candyMachine.mintAuthority)
console.log(candyMachine,"candyMachine");
console.log(candyGuard,"Candy Guard");
const nftMint = generateSigner(umi)
const transaction = await transactionBuilder()
.add(setComputeUnitLimit(umi, { units: 800_000 }))
.add(
mintV2(umi, {
candyMachine: candyMachine.publicKey,
candyGuard:candyMachine.mintAuthority,
nftMint,
collectionMint: candyMachine.collectionMint,
collectionUpdateAuthority: candyMachine.authority,
tokenStandard: TokenStandard.NonFungible,
})
)
const resTransaction = await transaction.sendAndConfirm(umi, {
confirm: { commitment: "finalized" },
});
console.log(resTransaction,"resTransaction");
} Tried with candy guards as well, facing the same issue, used same wallet from which collection and candy machine were created, still could not mint.