Announcing ICRC7/ICRC37: A Complete NFT Implementation for the Internet Computer

I did the decoding with Candid, using just a simple type definition:

pub type MetaType = Vec<Option<Vec<(String, ICRC3Value)>>>;

and using candid with it:

Ok(resp) => match resp.candid::<MetaType>()

….

It works for simple types (like the “https” value), but icrc97_metadata that is an Array of base64 characters I had no clue on how to do it. For now I’m using an ugly trick extracting the metadata payload and using the base64 decode.

I adapted the example scripts, I wanted to play locally on dfx, it seems to work, accepts the uploads, mints the token etc, but I stumbled on a problem with the uploaded images: it seems that the redirect to the storage canisters works on the mainnet only (I used curl -v to track it).

Am I wrong, or can I easily fix my problem?

Sorry, i was in holliday for 2weeks.
I’m back next week, you can contact me in DM please ? I’ll share Signal/Slack access with you so we can see together what’s the problem, and try to fix it together.
Thanks for your tests/work !

Hi Gwojda, no need to rush and enjoy your holidays!

Probably my trust level on the Dfinity forum does not allow me the DM capability. Too few posts, maybe? My identifier on Signal is RobertoPirrone.56
Anyway, I dig a little deeper in the core_nft code, It seems that raw.icp0.io is hardwired in core_nft/src/updates/management.rs. I will try to experiment on it in the next few days

I am trying to mint multiple nfts using this implementation but getting this error{"StorageCanisterError":"Icrc3Error(\"Transaction throttled\")"} in both cases of either batch minting or in sequential, looks like a rate limiting problem.

When I try to mint nfts in sequential order, nfts are being minted but getting the throttle error at mint 6.
When batch minting, when I upload the assets first, and then batch mint after, I am getting the error right away when I start the minting. The files and metadata json are uploading well, the error I am only getting it when minting.

I already have a frontend I am using for this, this is the flow of how I am doing the upload and minting.

Upload Flow:

1. uploadAssetWithMetadata()
   ├── 2. uploadFileToCollection() [Upload image file]
   │   ├── 3. nftActor.init_upload({ file_hash, file_path, file_size, chunk_size })
   │   ├── 4. nftActor.store_chunk({ chunk_id, file_path, chunk_data }) [For each chunk]
   │   └── 5. nftActor.finalize_upload({ file_path })  returns image URL
   │
   └── 6. uploadMetadataJSON() [Upload metadata JSON]
       ├── 7. nftActor.init_upload({ file_hash, file_path, file_size, chunk_size })
       ├── 8. nftActor.store_chunk({ chunk_id, file_path, chunk_data })
       └── 9. nftActor.finalize_upload({ file_path })  returns metadata URL

10. nftActor.mint({ mint_requests }) [Mint NFT with metadata URL]

For batch I am uploading assets and metadata json first, and the mint afterwards, it’s only failing on the mint, it’s not even minting a single nft, giving the error above.

What could I be doing wrong? I even tried to put some delays it’s still giving the error.

Also is this implementation really meant to support batch processes when minting? because even if it’s supporting batch minting (which is failing for now for me), the file upload is taking a lot of time. Maybe I need to create a custom implementation to speed that up?. Unless I am not using it in the correct way.

Thank you!