Skip to content
Open
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
27 changes: 21 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ solana-signature = "3.0.0"
solana-signer = "3.0.0"
solana-system-interface = "3"
solana-transaction = "3.0.0"
spl-tlv-account-resolution = { version = "0.11.0", features = ["serde-traits"] }
spl-tlv-account-resolution = { version = "0.11.3", features = ["serde-traits"] }
spl-transfer-hook-interface = { version = "2.0.0", path = "../../interface" }
strum = "0.28"
strum_macros = "0.28"
Expand Down
4 changes: 2 additions & 2 deletions interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ solana-pubkey = { version = "4.2.0", features = ["curve25519"] }
solana-sdk-ids = "3.0.0"
solana-system-interface = "3.0.0"
spl-discriminator = "0.5.1"
spl-list-view = "0.1.1"
spl-program-error = "0.8.0"
spl-tlv-account-resolution = "0.11.0"
spl-tlv-account-resolution = "0.11.3"
spl-type-length-value = "0.9.1"
spl-pod = "0.7.3"
thiserror = "2.0"

[lib]
Expand Down
12 changes: 5 additions & 7 deletions interface/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use {
solana_program_error::ProgramError,
solana_pubkey::Pubkey,
spl_discriminator::{ArrayDiscriminator, SplDiscriminate},
spl_pod::{bytemuck::pod_slice_to_bytes, list::ListView},
spl_list_view::ListView,
spl_tlv_account_resolution::account::ExtraAccountMeta,
std::convert::TryInto,
};
Expand Down Expand Up @@ -129,7 +129,7 @@ impl TransferHookInstruction {
InitializeExtraAccountMetaListInstruction::SPL_DISCRIMINATOR_SLICE,
);
buf.extend_from_slice(&(extra_account_metas.len() as u32).to_le_bytes());
buf.extend_from_slice(pod_slice_to_bytes(extra_account_metas));
buf.extend_from_slice(bytemuck::cast_slice(extra_account_metas));
}
Self::UpdateExtraAccountMetaList {
extra_account_metas,
Expand All @@ -138,7 +138,7 @@ impl TransferHookInstruction {
UpdateExtraAccountMetaListInstruction::SPL_DISCRIMINATOR_SLICE,
);
buf.extend_from_slice(&(extra_account_metas.len() as u32).to_le_bytes());
buf.extend_from_slice(pod_slice_to_bytes(extra_account_metas));
buf.extend_from_slice(bytemuck::cast_slice(extra_account_metas));
}
};
buf
Expand Down Expand Up @@ -252,9 +252,7 @@ pub fn update_extra_account_meta_list(

#[cfg(test)]
mod test {
use {
super::*, crate::NAMESPACE, solana_sha256_hasher::hashv, spl_pod::bytemuck::pod_from_bytes,
};
use {super::*, crate::NAMESPACE, solana_sha256_hasher::hashv};

#[test]
fn system_program_id() {
Expand Down Expand Up @@ -291,7 +289,7 @@ mod test {
0, // is_writable
];
let extra_account_metas =
vec![*pod_from_bytes::<ExtraAccountMeta>(extra_meta_bytes).unwrap()];
vec![*bytemuck::try_from_bytes::<ExtraAccountMeta>(extra_meta_bytes).unwrap()];
let check = TransferHookInstruction::InitializeExtraAccountMetaList {
extra_account_metas,
};
Expand Down
4 changes: 2 additions & 2 deletions interface/src/offchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ mod tests {
AccountMeta::new_readonly(mint, false),
AccountMeta::new(destination, false),
AccountMeta::new_readonly(authority, true),
AccountMeta::new_readonly(EXTRA_META_1, true),
AccountMeta::new_readonly(EXTRA_META_2, true),
AccountMeta::new_readonly(EXTRA_META_1, false),
AccountMeta::new_readonly(EXTRA_META_2, false),
AccountMeta::new(extra_meta_3_pubkey, false),
AccountMeta::new(extra_meta_4_pubkey, false),
AccountMeta::new_readonly(PROGRAM_ID, false),
Expand Down
4 changes: 2 additions & 2 deletions interface/src/onchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ mod tests {
AccountMeta::new_readonly(mint_pubkey, false),
AccountMeta::new(destination_pubkey, false),
AccountMeta::new_readonly(authority_pubkey, true),
AccountMeta::new_readonly(EXTRA_META_1, true),
AccountMeta::new_readonly(EXTRA_META_2, true),
AccountMeta::new_readonly(EXTRA_META_1, false),
AccountMeta::new_readonly(EXTRA_META_2, false),
AccountMeta::new(extra_meta_3_pubkey, false),
AccountMeta::new(extra_meta_4_pubkey, false),
AccountMeta::new_readonly(validate_state_pubkey, false),
Expand Down
2 changes: 1 addition & 1 deletion program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ solana-program-entrypoint = "3.0.0"
solana-program-error = "3.0.1"
solana-pubkey = "4.2.0"
solana-system-interface = { version = "3", features = ["bincode"] }
spl-tlv-account-resolution = "0.11.0"
spl-tlv-account-resolution = "0.11.3"
spl-token-2022-interface = "2.0.0"
spl-transfer-hook-interface = { version = "2.0.0", path = "../interface" }
spl-type-length-value = "0.9.1"
Expand Down
Loading