Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

resolved-conflict in spl-noop and spl-account-compression #7246

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.29.0"
anchor-lang = "0.30.1"
bytemuck = "1.13"
solana-program = ">=1.18.11,<=2"
spl-concurrent-merkle-tree = { version = "0.3.0", path = "../../../libraries/concurrent-merkle-tree" }
Expand Down
10 changes: 7 additions & 3 deletions account-compression/programs/account-compression/src/noop/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
//! deserializing the CPI instruction data.

use crate::events::{AccountCompressionEvent, ApplicationDataEvent, ApplicationDataEventV1};
use anchor_lang::solana_program::instruction::Instruction;
use anchor_lang::{prelude::*, solana_program::program::invoke};

#[derive(Clone)]
pub struct Noop;

impl anchor_lang::Id for Noop {
fn id() -> Pubkey {
spl_noop::id()
crate::id()
}
}

Expand All @@ -24,7 +24,11 @@ pub fn wrap_event<'info>(
noop_program: &Program<'info, Noop>,
) -> Result<()> {
invoke(
&spl_noop::instruction(event.try_to_vec()?),
&Instruction {
program_id: crate::id(),
accounts: vec![],
data: event.try_to_vec()?,
},
&[noop_program.to_account_info()],
)?;
Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::error::AccountCompressionError;

pub const CONCURRENT_MERKLE_TREE_HEADER_SIZE_V1: usize = 2 + 54;

#[derive(Debug, Copy, Clone, PartialEq, BorshDeserialize, BorshSerialize)]
#[derive(Debug, Copy, Clone, PartialEq, AnchorDeserialize, AnchorSerialize)]
#[repr(u8)]
pub enum CompressionAccountType {
/// Uninitialized
Expand Down Expand Up @@ -166,10 +166,10 @@ pub fn merkle_tree_get_size(header: &ConcurrentMerkleTreeHeader) -> Result<usize
(7, 16) => Ok(size_of::<ConcurrentMerkleTree<7, 16>>()),
(8, 16) => Ok(size_of::<ConcurrentMerkleTree<8, 16>>()),
(9, 16) => Ok(size_of::<ConcurrentMerkleTree<9, 16>>()),
(10, 32)=> Ok(size_of::<ConcurrentMerkleTree<10, 32>>()),
(11, 32)=> Ok(size_of::<ConcurrentMerkleTree<11, 32>>()),
(12, 32)=> Ok(size_of::<ConcurrentMerkleTree<12, 32>>()),
(13, 32)=> Ok(size_of::<ConcurrentMerkleTree<13, 32>>()),
(10, 32) => Ok(size_of::<ConcurrentMerkleTree<10, 32>>()),
(11, 32) => Ok(size_of::<ConcurrentMerkleTree<11, 32>>()),
(12, 32) => Ok(size_of::<ConcurrentMerkleTree<12, 32>>()),
(13, 32) => Ok(size_of::<ConcurrentMerkleTree<13, 32>>()),
(14, 64) => Ok(size_of::<ConcurrentMerkleTree<14, 64>>()),
(14, 256) => Ok(size_of::<ConcurrentMerkleTree<14, 256>>()),
(14, 1024) => Ok(size_of::<ConcurrentMerkleTree<14, 1024>>()),
Expand Down
Loading