0

I have Created following candy machine, fetching and adding items, everything works as expected:


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,

Mint Failed

Here is the mint code:


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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.