1

I'm going to write a solana program (rust, probably anchor) which mints NFTs to a collection using Bubblegum standard.

I noticed most guide use JS/TS to mint cNFTs with bubblegum, but I need to do this in Rust in this case.

Right now I'm looking at https://github.com/metaplex-foundation/mpl-bubblegum rust crate but not sure this is going to work for me.

Would appreciate any help or guide on this. Thanks

Update:

enter image description here

1 Answer 1

2

You can use reference these example programs:

https://github.com/solana-developers/program-examples/tree/main/compression/cnft-vault

https://github.com/solana-developers/program-examples/tree/main/compression/cnft-burn

6
  • I really appreciate your shared info, but I see it doesn't have the minting feature explained. I updated the post with my current progress referncing your link, kindly take a look. Commented Apr 10 at 18:14
  • here is another reference: github.com/ZYJLiu/anchor-compressed-nft/blob/master/programs/…
    – john
    Commented Apr 10 at 19:03
  • you will also need to use an rpc that suppports cnft indexing, helius free tier is a good option
    – john
    Commented Apr 10 at 19:05
  • thank you for the info, it looks like a good example. but it throws error when I try to run the test. I shared it in the post. some guides say it's related with stack space and tells to optimized instruction accouts, but I don't see much space to optimize accounts in this case. I also try to skip 'create tree' method call, by implementing it with web3 in test, but same thing happens with minting cNFT. one funny thing is, I succeeded to run first time when I executed, and starts failing since the second time, even I try with the fresh codebase from the link you shared Commented Apr 11 at 16:18
  • I discovered that the test goes through with the original program id, and fails if I replace it with another one after rebuilding the program. what a strange dependency Commented Apr 11 at 17:43

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.