Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/.ghaignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ tools/shank-and-solita/native
# not building
compression/cutils/anchor
compression/cnft-vault/anchor
# builds but need to test on localhost
compression/cnft-burn/anchor



Expand Down
6 changes: 3 additions & 3 deletions compression/cnft-burn/anchor/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ solana_version = "3.1.8"
resolution = true
skip-lint = false

[programs.devnet]
[programs.localnet]
cnft_burn = "C6qxH8n6mZxrrbtMtYWYSp8JR8vkQ55X1o4EBg7twnMv"

# [registry] section removed — no longer used in Anchor 1.0

[provider]
cluster = "devnet"
cluster = "localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/cnft-burn.ts"
test = "cargo test"
13 changes: 12 additions & 1 deletion compression/cnft-burn/anchor/programs/cnft-burn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,18 @@ anchor-lang = "1.0.0"
# which is incompatible with Anchor 1.0's solana 3.x types. CPI calls are built manually
# using raw invoke() with hardcoded program IDs and discriminators.
borsh = "1"
ahash = "=0.8.7"

[dev-dependencies]
litesvm = "0.11.0"
solana-instruction = "3.0.0"
solana-keypair = "3.0.1"
solana-pubkey = "3.0.0"
solana-transaction = "3.0.0"
solana-account = "3.0.0"
solana-native-token = "3.0.0"
solana-signer = "3.0.0"
solana-message = "3.0.0"
solana-keccak-hasher = "3.0.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
15 changes: 9 additions & 6 deletions compression/cnft-burn/anchor/programs/cnft-burn/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// `diverging_sub_expression` is a false positive emitted from the Anchor
// `#[program]` macro expansion under this clippy/rustc version; the generated
// instruction-dispatch code is correct.
#![allow(clippy::diverging_sub_expression)]

use anchor_lang::prelude::*;
use anchor_lang::solana_program::{
instruction::{AccountMeta, Instruction},
Expand All @@ -9,16 +14,14 @@ declare_id!("C6qxH8n6mZxrrbtMtYWYSp8JR8vkQ55X1o4EBg7twnMv");

/// mpl-bubblegum program ID (BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY)
const MPL_BUBBLEGUM_ID: Pubkey = Pubkey::new_from_array([
0x98, 0x8b, 0x80, 0xeb, 0x79, 0x35, 0x28, 0x69, 0xb2, 0x24, 0x74, 0x5f, 0x59, 0xdd, 0xbf,
0x8a, 0x26, 0x58, 0xca, 0x13, 0xdc, 0x68, 0x81, 0x21, 0x26, 0x35, 0x1c, 0xae, 0x07, 0xc1,
0xa5, 0xa5,
0x98, 0x8b, 0x80, 0xeb, 0x79, 0x35, 0x28, 0x69, 0xb2, 0x24, 0x74, 0x5f, 0x59, 0xdd, 0xbf, 0x8a,
0x26, 0x58, 0xca, 0x13, 0xdc, 0x68, 0x81, 0x21, 0x26, 0x35, 0x1c, 0xae, 0x07, 0xc1, 0xa5, 0xa5,
]);

/// SPL Account Compression program ID (cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK)
const SPL_ACCOUNT_COMPRESSION_ID: Pubkey = Pubkey::new_from_array([
0x09, 0x2a, 0x13, 0xee, 0x95, 0xc4, 0x1c, 0xba, 0x08, 0xa6, 0x7f, 0x5a, 0xc6, 0x7e, 0x8d,
0xf7, 0xe1, 0xda, 0x11, 0x62, 0x5e, 0x1d, 0x64, 0x13, 0x7f, 0x8f, 0x4f, 0x23, 0x83, 0x03,
0x7f, 0x14,
0x09, 0x2a, 0x13, 0xee, 0x95, 0xc4, 0x1c, 0xba, 0x08, 0xa6, 0x7f, 0x5a, 0xc6, 0x7e, 0x8d, 0xf7,
0xe1, 0xda, 0x11, 0x62, 0x5e, 0x1d, 0x64, 0x13, 0x7f, 0x8f, 0x4f, 0x23, 0x83, 0x03, 0x7f, 0x14,
]);

/// Burn instruction discriminator from mpl-bubblegum
Expand Down
Loading
Loading