That a project with tests example on how to mint a cNFT as part of a collection on Solana blockchain.
It's a project example with program/accounts deployed on the Devnet
Steps to reproduce:
- Configure you're Solana Dev ecosystem, keypair, etc.
- Add the variables on the
.env
file. - Install the dependencies with
npm i
. - Build the solana program (writed in Rust) with
anchor build
. - Deploy the program with:
anchor deploy
. - Now take the deployed programID, and replace the
declare_id!(******)
field on theprograms/solana-c-nft/src/lib.rs
and the program address onAnchor.toml
file by the program deployed. - Re-run anchor build.
- Run
anchor test
to execute.
Big shoutout to Discord Metaplex and Anchor community for good ressources 🤝
Program: 3raZxd2zrYgu3qQ8mwpKBK3wxoUBedHm6Lt5GPpMzSaB
Signer: 4ZNVvrgCqybh44j7iT8FsTzB7yHeKmyBJdxtrUk5JeDv
Collection PDA: 5vkQ69edm1denZvFpLotkBFHZoNsFusi4qidBvN1tJut
ATA Pubkey: 8XVxZ1npfRQg5EHqD2o61pYDZXHBbENxcCBEkwjrGxeM
Metadata account: 2Zf25hbseFtCTWJnPTX1NE9ZijGKsznYJf5SehB9Sv6h
Master Edition account: AfU53WjasqLy8ZLHRMgZM1NX7tXvrJJ7fNY11eMWfmfC
Merkle Tree: 6YBPFQ4T2oZDBRGRhRAnDmLAiXw5nMA2yCacQQqZGFf6
Merkle Tree Auth: 5scxHp6GtcN2kiWeYxXKJQ7LXEGvFZTTzuH8Ndszydxt
Init CNft Tx: v1RWmSYMbGRavg44wNBtuyixkBGNFcGDjfrtGeiH1uhu4SbipQe8HdXj8tVZgwfNsmYT3N2UcC1ydJiCqvRaJnf
✔ Initialize cNFT! (1310ms)
Max Depth computed: 14
Creation of the tree tx: FAanwdcQSFYTC42TiU89MC684VWfQfXtjHhL2ptGa5D5keDj1Lj5Ywp52fFDA156crwVovqa1erNtA2VhWu5kky
Tree Tx: 3z7e5RpJsCn3nH12XrdReRUJViufqmg4zYosDBnpsaBzKam6qKayTj8wN7aQZVhn8cc8B1L9TaKWPGpXjKT5Y9mS
✔ Initialize Tree (4924ms)
Mint tx: 5AwJVTRpJCxuKd8Lr4JPW4Rz7ABsCsoMXsiU4Et6CKj4YkvuPSxYNb8KxvVJHxAamSM3hwDymnMErLh9dec3ZtCP
✔ Mint a cNft token ! (3203ms)
2 passing (8s)