samuelvanderwaal / metaboss

The Metaplex NFT-standard Swiss Army Knife tool.
Apache License 2.0
689 stars 219 forks source link

Unable to verify collection when minting a single NFT in a collection #243

Closed shivekkhurana closed 1 year ago

shivekkhurana commented 1 year ago

Hello, I'm creating an open-ended mint system. I have a collection parent nft, and I want to be able to mint any number of nfts in this collection. My problem is that I'm not able to verify collection.

1. Mint parent nft

./mtb mint one 
--keypair k.json 
--nft-data-file test.json 
-r https://api.devnet.solana.com

The above command gave me an nft with token address: 9AJuH4pLYqY5viMYtfLEPkgBxmN5vYfTK6Q38t9d6NGp. My public key is: DADxEtVUGU3sXbMrtdBWPrZUPW9oT2YJN4WsWhmYfFSG

2. I created a metadata json with this parent nft as the collection: (coll.json)

    {
      "name": "Studious Crab #1",
      "symbol": "CRAB",
      "uri": "https://arweave.net/uVtABL4PYv0wVke3LL4DLMkqkSMcQl1qswRZNkJ0a0g",
      "seller_fee_basis_points": 100,
      "creators": [
        {
          "address": "DADxEtVUGU3sXbMrtdBWPrZUPW9oT2YJN4WsWhmYfFSG",
          "verified": true,
          "share": 100
        }
      ],
      "primary_sale_happened": false,
      "is_mutable": true,
      "token_standard": "ProgrammableNonFungible",
      "collection": {
        "verified": false,
        "key": "9AJuH4pLYqY5viMYtfLEPkgBxmN5vYfTK6Q38t9d6NGp" // <------ parent set here
      },
      "uses": null,
      "collection_details": null,
      "rule_set": null
    }

3. Mint a pNFT using the above metadata (collection verified false)

./mtb mint asset 
-d coll.json 
-k k.json 
-R BUPncE6KJi5Y8fdASPdND86FEQFCjdfsbRi9jgSF7u3A 
-s 0 
--rpc https://api.devnet.solana.com

This works fine. I get an NFT in the receiver wallet with token address: Cv1KQZw6YY9UKdGbP27qQRRUvZhJzViL1Df5k8CuNn4R

4: Fails when I try to verify collection

 ./mtb collections 
verify --collection-mint 9AJuH4pLYqY5viMYtfLEPkgBxmN5vYfTK6Q38t9d6NGp 
--nft-mint Cv1KQZw6YY9UKdGbP27qQRRUvZhJzViL1Df5k8CuNn4R 
-k k.json -r https://api.devnet.solana.com

out: Error: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x99 [4 log messages]


How can I verify this collection nft (Cv1KQZw6YY9UKdGbP27qQRRUvZhJzViL1Df5k8CuNn4R) ? It feels like I'm doing something wrong here. I read the docs but the verify feature was not documented.

shivekkhurana commented 1 year ago

Hey, I was able to fix this. The problem was the token_standard set to ProgramableNonFungible. I changed it to FungibleAsset, ran the same commands and it started working.

Meta Boss error finding tools were super helpful. Most errors were detailed properly and helped me find a fix:

metaboss find error 0x99
samuelvanderwaal commented 1 year ago

Thanks for the detailed issue, this is a model of creating a helpful issue. ProgrammableNonFungible assets currently can't be verified as the new Verify handler in Token Metadata is in process. Once it's complete I'll add it to Metaboss so you can verify pNFTs.

shivekkhurana commented 1 year ago

Thanks for building this robust tool.

bitmoji