From 150daa13c76b7251d62cc39b731a9d6a1a1a99d7 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Wed, 11 Dec 2024 18:43:59 +0400 Subject: [PATCH] remove solana-sdk from zk-token-proof-tests (#4056) --- Cargo.lock | 10 ++++++++- programs/zk-token-proof-tests/Cargo.toml | 10 ++++++++- .../tests/process_transaction.rs | 21 +++++++++---------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1be6d14325e9c4..72f237aa42c522 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10039,9 +10039,17 @@ version = "2.2.0" dependencies = [ "bytemuck", "curve25519-dalek 4.1.3", + "solana-account", "solana-compute-budget", + "solana-compute-budget-interface", + "solana-instruction", + "solana-keypair", "solana-program-test", - "solana-sdk", + "solana-pubkey", + "solana-signer", + "solana-system-interface", + "solana-transaction", + "solana-transaction-error", "solana-zk-token-sdk", ] diff --git a/programs/zk-token-proof-tests/Cargo.toml b/programs/zk-token-proof-tests/Cargo.toml index a00c98b20e4d2b..27a8192caa845c 100644 --- a/programs/zk-token-proof-tests/Cargo.toml +++ b/programs/zk-token-proof-tests/Cargo.toml @@ -10,7 +10,15 @@ edition = { workspace = true } [dev-dependencies] bytemuck = { workspace = true } curve25519-dalek = { workspace = true } +solana-account = { workspace = true } solana-compute-budget = { workspace = true } +solana-compute-budget-interface = { workspace = true } +solana-instruction = { workspace = true } +solana-keypair = { workspace = true } solana-program-test = { workspace = true } -solana-sdk = { workspace = true } +solana-pubkey = { workspace = true } +solana-signer = { workspace = true } +solana-system-interface = { workspace = true } +solana-transaction = { workspace = true } +solana-transaction-error = { workspace = true } solana-zk-token-sdk = { workspace = true } diff --git a/programs/zk-token-proof-tests/tests/process_transaction.rs b/programs/zk-token-proof-tests/tests/process_transaction.rs index 71d1761d2222e0..8e22f9fa339e75 100644 --- a/programs/zk-token-proof-tests/tests/process_transaction.rs +++ b/programs/zk-token-proof-tests/tests/process_transaction.rs @@ -1,16 +1,15 @@ use { bytemuck::{bytes_of, Pod}, curve25519_dalek::scalar::Scalar, + solana_account::Account, + solana_instruction::error::InstructionError, + solana_keypair::Keypair, solana_program_test::*, - solana_sdk::{ - account::Account, - instruction::InstructionError, - pubkey::Pubkey, - signature::Signer, - signer::keypair::Keypair, - system_instruction, - transaction::{Transaction, TransactionError}, - }, + solana_pubkey::Pubkey, + solana_signer::Signer, + solana_system_interface::instruction as system_instruction, + solana_transaction::Transaction, + solana_transaction_error::TransactionError, solana_zk_token_sdk::{ encryption::{ elgamal::{ElGamalKeypair, ElGamalSecretKey}, @@ -1713,10 +1712,10 @@ trait WithMaxComputeUnitLimit { fn with_max_compute_unit_limit(self) -> Self; } -impl WithMaxComputeUnitLimit for Vec { +impl WithMaxComputeUnitLimit for Vec { fn with_max_compute_unit_limit(mut self) -> Self { self.push( - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( solana_compute_budget::compute_budget_limits::MAX_COMPUTE_UNIT_LIMIT, ), );