Skip to content

Commit 5b929bc

Browse files
mikemaccanaclaude
andcommitted
Fix anchor CI: DecodeError (five8_core version) and cross-program-invocation test
- Remove committed Cargo.lock files for nft-operations and token-fundraiser: the old locks pinned five8_core 0.1.2 which lacks std::error::Error for DecodeError; fresh cargo resolution picks five8_core 1.0.0 which has it, fixing the solana-keypair 3.1.2 build failure - Fix cross-program-invocation test: use lever::id() instead of hand::lever::ID so the lever program ID stays in sync with the compiled lever.so after anchor keys sync generates a new keypair on fresh CI runs; add lever as a dev-dependency of hand with no-entrypoint feature Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3ee5f60 commit 5b929bc

4 files changed

Lines changed: 5 additions & 9263 deletions

File tree

basics/cross-program-invocation/anchor/programs/hand/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ litesvm = "0.11.0"
2727
solana-signer = "3.0.0"
2828
solana-keypair = "3.0.1"
2929
solana-kite = "0.3.0"
30+
lever = { path = "../../lever", features = ["no-entrypoint"] }
3031

3132
[lints.rust]
3233
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

basics/cross-program-invocation/anchor/programs/hand/tests/test_hand.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use {
66
},
77
InstructionData, ToAccountMetas,
88
},
9+
lever,
910
litesvm::LiteSVM,
1011
solana_keypair::Keypair,
1112
solana_kite::{create_wallet, send_transaction_from_instructions},
@@ -43,8 +44,9 @@ fn build_lever_initialize_ix(
4344
#[test]
4445
fn test_pull_lever_cpi() {
4546
let hand_program_id = hand::id();
46-
// The lever program ID from declare_program!(lever) inside hand crate
47-
let lever_program_id = hand::lever::ID;
47+
// Use lever::id() (not hand::lever::ID) so the ID stays in sync with the compiled lever.so
48+
// after anchor keys sync changes the program ID on fresh CI runs.
49+
let lever_program_id = lever::id();
4850

4951
let mut svm = LiteSVM::new();
5052

0 commit comments

Comments
 (0)