Skip to content

Commit 75f1ce3

Browse files
committed
added the README
1 parent 0409202 commit 75f1ce3

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

compression/cnft-burn/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# cnft-burn
2+
3+
This repository contains the cnft-burn program, a Solana Anchor program that allows you to burn compressed NFTs (cNFTs) in your collection. The program interacts with the Metaplex Bubblegum program through CPI to burn cNFTs.
4+
5+
## Components
6+
7+
- programs: Contains the anchor program
8+
- tests: Contains the tests for the anchor program
9+
10+
## Deployment
11+
12+
The program is deployed on devnet at `FbeHkUEevbhKmdk5FE5orcTaJkCYn5drwZoZXaxQXXNn`. You can deploy it yourself by changing the respective values in lib.rs and Anchor.toml.
13+
14+
## How to run
15+
16+
1. Configure RPC path in utils/readAPI.ts. Personal preference: Helius RPCs.
17+
2. run `anchor build` at the root of the project i.e cnft-burn in this case.
18+
3. run `anchor deploy` to deploy and test the program on your own cluster.
19+
4. to run the tests you need to have the tree address and the assetId of the cNFT you want to burn. You need to make sure the signer of the instruction is also the owner of that cNFT. if you don't have the tree and assetId you can create the tree and mint the cNFT using [compressed-nfts](https://github.com/solana-developers/compressed-nfts) and use the scripts `createAndMint.ts` to create the tree and get the tree address and `fetchNFTsByCollection.ts` to get the assetId based on the collection mint address which will be provided in the createAndMint script.
20+
5. run `anchor test` to run the tests.
21+
22+
## Acknowledgements
23+
24+
This Example program would not have been possible without the work of:
25+
26+
- [Metaplex](https://github.com/metaplex-foundation/) for providing the Bubblegum program with ix builders.
27+
- [@nickfrosty](https://twitter.com/nickfrosty) for providing the same code for fetching and creating cNFTs.

compression/cnft-burn/tests/readApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import axios from "axios";
66

7-
// you might want to change that to your custom RPC
7+
// you might want to change that to your custom RPC endpoint as this endpoint is not going to work as it does not support DAS
88
const RPC_PATH = "https://api.devnet.solana.com";
99

1010
export async function getAsset(assetId: any, rpcUrl = RPC_PATH): Promise<any> {

0 commit comments

Comments
 (0)