|
1 år sedan | |
---|---|---|
.. | ||
programs | 1 år sedan | |
tests | 1 år sedan | |
.gitignore | 1 år sedan | |
Anchor.toml | 1 år sedan | |
Cargo.toml | 1 år sedan | |
README.md | 1 år sedan | |
package.json | 1 år sedan | |
pnpm-lock.yaml | 1 år sedan | |
tsconfig.json | 1 år sedan |
This repo contains example code of how you can work with Metaplex compressed NFTs inside of Solana Anchor programs.
The basic idea is to allow for custom logic in your own Solana program by doing a CPI to the bubblegum minting instruction. Two instructions:
This program can be used as an inspiration on how to work with cNFTs in Solana programs.
programs: the Solana program
access_control
macro. This might be useful to use in conjunction with the cNFT verification logic.tests:
setup.ts
which is to be executed first if you don't already have a collection with merkle tree(s).tests.ts
for running individual minting and verification testsThe program is deployed on devnet at burZc1SfqbrAP35XG63YZZ82C9Zd22QUwhCXoEUZWNF
.
You can deploy it yourself by changing the respective values in lib.rs and Anchor.toml.
This is just an example implementation. Use at your own discretion
This only works on anchor 0.26.0 for now due to mpl-bubblegum dependencies
A video about the creation of this code which also contains further explanations has been publised on Burger Bob's YouTube channel: COMING SOON
yarn
npx ts-node tests/setup.ts
to setup a NFT collection and its underlying merkle tree.tests/tests.ts
anchor test --skip-build --skip-deploy --skip-local-validator
Anchor.toml
This repo would not have been possible without the work of: