0

Getting the error Error processing Instruction 0: custom program error: 0x1d. when trying to mint a Metaplex Core asset from a collection using anchor.

Message: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1d. 
Logs: 
[
  "Program 6VVXJ3hHsXn8kFqCWRPT6VeigbGkcHkUZhhopritHdMi invoke [1]",
  "Program log: Instruction: MintAsset",
  "Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d invoke [2]",
  "Program log: Instruction: Create",
  "Program log: Cannot specify both an update authority and collection on an asset",
  "Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d consumed 4499 of 191248 compute units",
  "Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d failed: custom program error: 0x1d",
  "Program 6VVXJ3hHsXn8kFqCWRPT6VeigbGkcHkUZhhopritHdMi consumed 13251 of 200000 compute units",
  "Program 6VVXJ3hHsXn8kFqCWRPT6VeigbGkcHkUZhhopritHdMi failed: custom program error: 0x1d"
]. 
Catch the `SendTransactionError` and call `getLogs()` on it for full details.

1 Answer 1

1

Using the Metaplex single token(NFT) account layout, the update_authority field is a Rust Enum that can represent either of three things,

  1. None - no update authority set making the asset a soulbound asset
  2. Address(Pubkey) - single asset with the update authority public key Pubkey
  3. Collection(Pubkey) - this marks the asset as a collection asset with the public key of the collection in Pubkey

In my code I have both the update authority and collection present.


        CreateV1CpiBuilder::new(&ctx.accounts.core_program)
            .asset(&ctx.accounts.asset)
            .collection(Some(&ctx.accounts.collection))
            .authority(Some(&ctx.accounts.payer))
            .payer(&ctx.accounts.payer)
            .owner(Some(&ctx.accounts.payer))
            .update_authority(Some(&ctx.accounts.payer))
            .system_program(&ctx.accounts.system_program)
            .name(params.name)
            .uri(params.uri)
            .invoke()?;

You can't have both of these fields present and you have to chose either one or the other in the CPI instruction above. Getting rid of the .update_authority(Some(&ctx.accounts.payer)) method made the error go away.

ref: https://developers.metaplex.com/core/what-is-an-asset

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.