-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cNft Burn anchor example #65
Conversation
@beeman I have created the PR again here |
The tests fail with: |
Can you please add a readme that explains what the example does and how to run it? Does the tree need to be created? What should the burned asset id be? How to find it? Can you run it with local host? |
yes its because of this https://solana.stackexchange.com/questions/8800/cant-build-hello-world i will test at my end as well and see if it's working |
I have added the README let me know if i missed something and the program works i have added a sample tx sig link as well to the deployed program on devnet. the error you are getting is well known if you are using anchor 0.29.0 i have added the stackExchange link above on how to fix that. |
Thank you for updating this. Adding When running the tests im getting this error now: cnft-burn 0 passing (850ms)
Error: error Command failed with exit code 1. |
did you change the rpc url ? and you also need to make sure to create a tree and a cNFT before u run that |
Yes i replaced the rpc url. Im still getting the same error when i run the tests. Can you please add the code to create the tree and the asset in the setup of the test? Tests should run without any prior setup. Otherwise CI for testing the examples will not work. |
got it will do that |
@Woody4618 i have made the changes now the test should be running on |
Thank you for the changes. Test Output: Merkle tree created successfully! Creating the collection's mint... Collection successfully created! Minting a single compressed NFT to 5vJwnLeyjV8uNJSp1zn7VLW8GwiQbcsQbGaVSwRmkE4r... Successfully minted the compressed NFT! =============================== Collection mint: 9x4rQhXNHFdeecfdsvzdiuuWgNP7XKeLb1tvZ2AvQX2U ===============================================Getting all assets by the 'collection' group... =============================================== 1 passing (4s)
error Command failed with exit code 1. |
so 4100 means The declared program id does not match the actual program id. are you deploying the program before use ? |
I just replaced your hard coded keypair in createAndMint.ts with the anchor provider and try to run the test and the burn test fails with:
Error: error Command failed with exit code 1. |
I tried with a new keypair and its seams to be working fine cnft-burn Merkle tree created successfully! Creating the collection's mint... Collection successfully created! Minting a single compressed NFT to FwE55ngcQhYE4ciMtbqwDzQpZFTsFxA7vJPvGjjzygp1... Successfully minted the compressed NFT! =============================== Collection mint: 5cpdUg5VCULuBQCcCGVYB9FhAKLeCzFY5VCnQfEU63pu ===============================================Getting all assets by the 'collection' group... =============================================== 2 passing (10s) ✨ Done in 12.52s. |
Ok nice, now after rebuilding, deploying and running it again it also works for me. Can you please fix the keypair part. Then its ready to go :) |
oh nice i have removed my path and made it generic. I am not sure on how to get that path from anchor.toml do you know how can we get that ? |
You can not use ~ there. Please use: const program = anchor.workspace.CnftBurn as anchor.Program; // load it locally from the filesystem when available |
Thanks @Woody4618 I forgot on how we could get that finally got that fixed and pushed |
FYI merging this broke tests: https://github.com/solana-developers/program-examples/actions/runs/7545772604/job/20542140953 |
Oh thanks, true @0xPratik could you please fix the linting? 🙏 |
yes i will check that and a new PR for cnft update is coming soon as well |
Awesome!! 😍 |
No description provided.