From 23f70082fcb37b56512ad9e892397a94a21ebf24 Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 26 Jun 2024 22:30:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8C=20unify=20exports=20from=20trident?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +- crates/cli/src/command/build.rs | 2 +- crates/cli/src/command/clean.rs | 2 +- crates/cli/src/command/fuzz.rs | 2 +- crates/cli/src/command/init.rs | 2 +- crates/cli/src/command/keypair.rs | 2 +- crates/cli/src/command/localnet.rs | 2 +- crates/cli/src/command/test.rs | 2 +- crates/client/src/client.rs | 4 +- crates/client/src/commander.rs | 8 +- crates/client/src/fuzzer/accounts_storage.rs | 3 +- crates/client/src/fuzzer/data_builder.rs | 4 +- crates/client/src/fuzzer/error.rs | 2 + crates/client/src/fuzzer/fuzzing_stats.rs | 2 + .../fuzzer/program_test_client_blocking.rs | 11 +- crates/client/src/fuzzer/snapshot.rs | 4 +- .../client/src/fuzzer/snapshot_generator.rs | 4 +- crates/client/src/lib.rs | 172 ++++++++++-------- crates/client/src/temp_clone.rs | 3 +- .../src/templates/trident-tests/test.rs | 3 +- .../src/templates/trident-tests/test_fuzz.rs | 2 +- crates/client/src/test_generator.rs | 7 +- crates/client/src/tester.rs | 2 +- .../expected_accounts_snapshots.rs | 4 +- crates/client/tests/test_fuzz.rs | 17 +- crates/client/tests/test_program_client.rs | 8 +- crates/test/src/lib.rs | 14 +- crates/test/tests/expand/basic.expanded.rs | 14 +- .../test/tests/expand/with_root.expanded.rs | 14 +- .../arbitrary-custom-types-4/Cargo.lock | 3 +- .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 4 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 4 +- .../arbitrary-limit-inputs-5/Cargo.lock | 66 ++++++- .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 4 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 4 +- examples/fuzz-tests/hello_world/Cargo.lock | 66 ++++++- .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 5 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 4 +- .../incorrect-integer-arithmetic-3/Cargo.lock | 66 ++++++- .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 4 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 4 +- .../incorrect-ix-sequence-1/Cargo.lock | 66 ++++++- .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 4 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 4 +- .../unauthorized-access-2/Cargo.lock | 66 ++++++- .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 4 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 4 +- .../unchecked-arithmetic-0/Cargo.lock | 66 ++++++- .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 4 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 4 +- .../escrow/.program_client/src/lib.rs | 3 +- examples/integration-tests/escrow/Cargo.lock | 66 ++++++- .../trident-tests/poc_tests/tests/test.rs | 8 +- .../turnstile/.program_client/src/lib.rs | 3 +- .../integration-tests/turnstile/Cargo.lock | 66 ++++++- .../trident-tests/poc_tests/tests/test.rs | 7 +- 56 files changed, 745 insertions(+), 183 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d525ceb5..8b8e42dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 incremented upon a breaking change and the patch version will be incremented for features. ## [dev] - Unreleased -- fix/in case of fuzzing failure throw error instead of only printing message([#167](https://github.com/Ackee-Blockchain/trident/pull/167)) +- feat/unify dependencies provided by the Trident ([#172](https://github.com/Ackee-Blockchain/trident/pull/172)) +- fix/in case of fuzzing failure throw error instead of only printing message ([#167](https://github.com/Ackee-Blockchain/trident/pull/167)) - del/remove Trident explorer ([#171](https://github.com/Ackee-Blockchain/trident/pull/171)) - fix/snapshot's zeroed account as optional ([#170](https://github.com/Ackee-Blockchain/trident/pull/170)) - feat/fuzzer-stats-logging, an optional statistics output for fuzzing session ([#144](https://github.com/Ackee-Blockchain/trident/pull/144)) diff --git a/crates/cli/src/command/build.rs b/crates/cli/src/command/build.rs index c71d4e43..11a3ab4c 100644 --- a/crates/cli/src/command/build.rs +++ b/crates/cli/src/command/build.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Error}; use fehler::throws; -use trident_client::*; +use trident_client::___private::TestGenerator; use crate::_discover; diff --git a/crates/cli/src/command/clean.rs b/crates/cli/src/command/clean.rs index f66ebb86..27597878 100644 --- a/crates/cli/src/command/clean.rs +++ b/crates/cli/src/command/clean.rs @@ -1,6 +1,6 @@ use anyhow::Error; use fehler::throws; -use trident_client::Cleaner; +use trident_client::___private::Cleaner; #[throws] pub async fn clean() { diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index 87b74507..e398882f 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -2,7 +2,7 @@ use anyhow::{bail, Error}; use clap::Subcommand; use fehler::throws; -use trident_client::{Commander, TestGenerator}; +use trident_client::___private::{Commander, TestGenerator}; use crate::_discover; diff --git a/crates/cli/src/command/init.rs b/crates/cli/src/command/init.rs index bf4c4c88..182f081d 100644 --- a/crates/cli/src/command/init.rs +++ b/crates/cli/src/command/init.rs @@ -1,7 +1,7 @@ use anyhow::{bail, Error}; use clap::ValueEnum; use fehler::throws; -use trident_client::TestGenerator; +use trident_client::___private::TestGenerator; use crate::_discover; diff --git a/crates/cli/src/command/keypair.rs b/crates/cli/src/command/keypair.rs index 69100132..44a32fb7 100644 --- a/crates/cli/src/command/keypair.rs +++ b/crates/cli/src/command/keypair.rs @@ -2,7 +2,7 @@ use anyhow::Error; use clap::Subcommand; use fehler::throws; use solana_sdk::signer::Signer; -use trident_client::{keypair as other_keypair, program_keypair, system_keypair}; +use trident_client::___private::{keypair as other_keypair, program_keypair, system_keypair}; #[derive(Subcommand)] pub enum KeyPairCommand { diff --git a/crates/cli/src/command/localnet.rs b/crates/cli/src/command/localnet.rs index 9cb4973d..cae67c5a 100644 --- a/crates/cli/src/command/localnet.rs +++ b/crates/cli/src/command/localnet.rs @@ -1,7 +1,7 @@ use anyhow::Error; use fehler::throws; use tokio::signal; -use trident_client::*; +use trident_client::___private::Commander; #[throws] pub async fn localnet() { diff --git a/crates/cli/src/command/test.rs b/crates/cli/src/command/test.rs index 0655db1d..0420e3fe 100644 --- a/crates/cli/src/command/test.rs +++ b/crates/cli/src/command/test.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Error}; use fehler::throws; -use trident_client::*; +use trident_client::___private::Commander; use crate::_discover; diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 4af6c586..59ec46b1 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -1,4 +1,6 @@ -use crate::{config::Config, Reader, TempClone}; +use crate::___private::Reader; +use crate::___private::TempClone; +use crate::config::Config; use anchor_client::{ anchor_lang::{ prelude::System, solana_program::program_pack::Pack, AccountDeserialize, Id, diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index dd8d2418..70b12c62 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -1,9 +1,7 @@ +use crate::___private::Client; use crate::config::Config; +use crate::idl::{self}; use crate::test_generator::ProgramData; -use crate::{ - idl::{self}, - Client, -}; use fehler::{throw, throws}; use log::debug; use solana_sdk::signer::keypair::Keypair; @@ -19,7 +17,7 @@ use tokio::{ }; use crate::constants::*; -use crate::fuzzing_stats::FuzzingStatistics; +use crate::fuzzer::fuzzing_stats::FuzzingStatistics; use tokio::io::AsyncBufReadExt; #[derive(Error, Debug)] diff --git a/crates/client/src/fuzzer/accounts_storage.rs b/crates/client/src/fuzzer/accounts_storage.rs index 01e2ef11..226623dc 100644 --- a/crates/client/src/fuzzer/accounts_storage.rs +++ b/crates/client/src/fuzzer/accounts_storage.rs @@ -1,8 +1,9 @@ +#![allow(dead_code)] use std::collections::HashMap; use solana_sdk::{pubkey::Pubkey, signature::Keypair}; -use crate::{data_builder::FuzzClient, AccountId}; +use crate::fuzzer::{data_builder::FuzzClient, AccountId}; pub struct PdaStore { pub pubkey: Pubkey, diff --git a/crates/client/src/fuzzer/data_builder.rs b/crates/client/src/fuzzer/data_builder.rs index 174611dc..b9d1238a 100644 --- a/crates/client/src/fuzzer/data_builder.rs +++ b/crates/client/src/fuzzer/data_builder.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use anchor_client::anchor_lang::solana_program::account_info::{Account as Acc, AccountInfo}; use anchor_client::anchor_lang::solana_program::hash::Hash; use anchor_lang::prelude::Rent; @@ -13,7 +15,7 @@ use std::collections::HashMap; use std::error::Error; use std::fmt::Display; -use crate::error::*; +use crate::fuzzer::error::*; pub struct FuzzData { pub pre_ixs: Vec, diff --git a/crates/client/src/fuzzer/error.rs b/crates/client/src/fuzzer/error.rs index cc488669..4058519c 100644 --- a/crates/client/src/fuzzer/error.rs +++ b/crates/client/src/fuzzer/error.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use solana_banks_client::BanksClientError; use solana_sdk::pubkey::Pubkey; use std::fmt::{Debug, Display}; diff --git a/crates/client/src/fuzzer/fuzzing_stats.rs b/crates/client/src/fuzzer/fuzzing_stats.rs index f49403de..d1ac5c62 100644 --- a/crates/client/src/fuzzer/fuzzing_stats.rs +++ b/crates/client/src/fuzzer/fuzzing_stats.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use prettytable::{row, Table}; use std::collections::HashMap; diff --git a/crates/client/src/fuzzer/program_test_client_blocking.rs b/crates/client/src/fuzzer/program_test_client_blocking.rs index f31858a2..3ba74105 100644 --- a/crates/client/src/fuzzer/program_test_client_blocking.rs +++ b/crates/client/src/fuzzer/program_test_client_blocking.rs @@ -1,9 +1,10 @@ -use crate::fuzzing::ProgramTest; -use crate::fuzzing::{ProgramTestContext, SYSTEM_PROGRAM_ID}; -use crate::solana_sdk::account::Account; use solana_program_runtime::invoke_context::BuiltinFunctionWithContext; +use solana_program_test::ProgramTest; +use solana_program_test::ProgramTestContext; +use solana_sdk::account::Account; use solana_sdk::account_info::AccountInfo; use solana_sdk::entrypoint::ProgramResult; +use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use solana_sdk::{ account::AccountSharedData, hash::Hash, instruction::AccountMeta, program_option::COption, program_pack::Pack, pubkey::Pubkey, rent::Rent, signature::Keypair, signature::Signer, @@ -12,8 +13,8 @@ use solana_sdk::{ use spl_token::state::Mint; use tokio::runtime::Builder; -use crate::data_builder::FuzzClient; -use crate::error::*; +use crate::fuzzer::data_builder::FuzzClient; +use crate::fuzzer::error::*; pub type ProgramEntry = for<'info> fn( program_id: &Pubkey, diff --git a/crates/client/src/fuzzer/snapshot.rs b/crates/client/src/fuzzer/snapshot.rs index 69cdfe73..46d6c0a6 100644 --- a/crates/client/src/fuzzer/snapshot.rs +++ b/crates/client/src/fuzzer/snapshot.rs @@ -4,8 +4,8 @@ use anchor_client::anchor_lang::solana_program::account_info::Account as Acc; use anchor_client::anchor_lang::solana_program::account_info::AccountInfo; use solana_sdk::{account::Account, instruction::AccountMeta}; -use crate::data_builder::{FuzzClient, FuzzDeserialize}; -use crate::error::*; +use crate::fuzzer::data_builder::{FuzzClient, FuzzDeserialize}; +use crate::fuzzer::error::*; pub struct Snapshot<'info, T> { before: Vec>, before_acc_inf: Vec>>, diff --git a/crates/client/src/fuzzer/snapshot_generator.rs b/crates/client/src/fuzzer/snapshot_generator.rs index 78c2ba52..21e9a44a 100644 --- a/crates/client/src/fuzzer/snapshot_generator.rs +++ b/crates/client/src/fuzzer/snapshot_generator.rs @@ -66,8 +66,8 @@ pub fn generate_snapshots_code(programs_data: &[ProgramData]) -> Result { pub sender: Signer<'info>, pub sender_token_account: Account<'info, TokenAccount>, diff --git a/crates/client/tests/test_fuzz.rs b/crates/client/tests/test_fuzz.rs index fc278399..4cf4f534 100644 --- a/crates/client/tests/test_fuzz.rs +++ b/crates/client/tests/test_fuzz.rs @@ -2,7 +2,7 @@ use anyhow::Error; use cargo_metadata::camino::Utf8PathBuf; use fehler::throws; use pretty_assertions::assert_str_eq; -use trident_client::test_generator::ProgramData; +use trident_client::___private::ProgramData; const PROGRAM_NAME: &str = "fuzz_example3"; @@ -33,8 +33,10 @@ async fn test_snapshots_and_instructions() { let path = Utf8PathBuf::from(program_path); - let program_idl = - trident_client::idl::parse_to_idl_program(PROGRAM_NAME.to_owned(), expanded_fuzz_example3)?; + let program_idl = trident_client::___private::parse_to_idl_program( + PROGRAM_NAME.to_owned(), + expanded_fuzz_example3, + )?; let code = expanded_fuzz_example3.to_string(); @@ -47,14 +49,15 @@ async fn test_snapshots_and_instructions() { let program_data = vec![program_data]; let fuzzer_snapshots = - trident_client::snapshot_generator::generate_snapshots_code(&program_data).unwrap(); + trident_client::___private::snapshot_generator::generate_snapshots_code(&program_data) + .unwrap(); let fuzzer_snapshots = - trident_client::Commander::format_program_code(&fuzzer_snapshots).await?; + trident_client::___private::Commander::format_program_code(&fuzzer_snapshots).await?; let fuzz_instructions_code = - trident_client::fuzzer_generator::generate_source_code(&program_data); + trident_client::___private::fuzzer_generator::generate_source_code(&program_data); let fuzz_instructions_code = - trident_client::Commander::format_program_code(&fuzz_instructions_code).await?; + trident_client::___private::Commander::format_program_code(&fuzz_instructions_code).await?; assert_str_eq!(fuzzer_snapshots, expected_accounts_snapshots); assert_str_eq!(fuzz_instructions_code, expected_fuzz_instructions_code); diff --git a/crates/client/tests/test_program_client.rs b/crates/client/tests/test_program_client.rs index 3b082355..c9d8cc71 100644 --- a/crates/client/tests/test_program_client.rs +++ b/crates/client/tests/test_program_client.rs @@ -1,7 +1,7 @@ use anyhow::Error; use fehler::throws; use pretty_assertions::assert_str_eq; -use trident_client::test_generator::ProgramData; +use trident_client::___private::ProgramData; #[throws] #[tokio::test] @@ -24,7 +24,7 @@ pub async fn generate_program_client() { "/tests/test_data/expected_source_codes/expected_program_client_code.rs" )); - let program_idl = trident_client::idl::parse_to_idl_program("escrow".to_owned(), code)?; + let program_idl = trident_client::___private::parse_to_idl_program("escrow".to_owned(), code)?; let program_data = ProgramData { code: code.to_string(), @@ -34,9 +34,9 @@ pub async fn generate_program_client() { let program_data = vec![program_data]; let use_modules: Vec = vec![syn::parse_quote! { use trident_client::*; }]; + let client_code = trident_client::___private::generate_source_code(&program_data, &use_modules); let client_code = - trident_client::program_client_generator::generate_source_code(&program_data, &use_modules); - let client_code = trident_client::Commander::format_program_code(&client_code).await?; + trident_client::___private::Commander::format_program_code(&client_code).await?; assert_str_eq!(client_code, expected_client_code); } diff --git a/crates/test/src/lib.rs b/crates/test/src/lib.rs index f10b929d..1d8587fc 100644 --- a/crates/test/src/lib.rs +++ b/crates/test/src/lib.rs @@ -65,22 +65,22 @@ pub fn trident_test(args: TokenStream, input: TokenStream) -> TokenStream { // Note: The line `#(#input_fn_attrs)*` has to be above the line with the code // `#[trident_client::tokio::test...` to make macros like `#[rstest]` work - // see https://github.com/la10736/rstest#inject-test-attribute - #[trident_client::rstest] - #[trident_client::tokio::test(flavor = "multi_thread")] - #[trident_client::serial_test::serial] - async fn #input_fn_name(#input_fn_inputs) -> trident_client::anyhow::Result<()> { - let mut tester = trident_client::Tester::with_root(#root); + #[trident_client::test::rstest] + #[trident_client::test::tokio::test(flavor = "multi_thread")] + #[trident_client::test::serial_test::serial] + async fn #input_fn_name(#input_fn_inputs) -> trident_client::test::anyhow::Result<()> { + let mut tester = trident_client::test::Tester::with_root(#root); let localnet_handle = tester.before().await?; let test = async { #input_fn_body - Ok::<(), trident_client::anyhow::Error>(()) + Ok::<(), trident_client::test::anyhow::Error>(()) }; let result = std::panic::AssertUnwindSafe(test).catch_unwind().await; tester.after(localnet_handle).await?; assert!(result.is_ok()); let final_result = result.unwrap(); if let Err(error) = final_result { - trident_client::error_reporter::report_error(&error); + trident_client::test::report_error(&error); return Err(error); } Ok(()) diff --git a/crates/test/tests/expand/basic.expanded.rs b/crates/test/tests/expand/basic.expanded.rs index 72d8a1a1..1468e639 100644 --- a/crates/test/tests/expand/basic.expanded.rs +++ b/crates/test/tests/expand/basic.expanded.rs @@ -1,8 +1,8 @@ -#[trident_client::rstest] -#[trident_client::tokio::test(flavor = "multi_thread")] -#[trident_client::serial_test::serial] -async fn test_turnstile() -> trident_client::anyhow::Result<()> { - let mut tester = trident_client::Tester::with_root("../../"); +#[trident_client::test::rstest] +#[trident_client::test::tokio::test(flavor = "multi_thread")] +#[trident_client::test::serial_test::serial] +async fn test_turnstile() -> trident_client::test::anyhow::Result<()> { + let mut tester = trident_client::test::Tester::with_root("../../"); let localnet_handle = tester.before().await?; let test = async { { @@ -14,7 +14,7 @@ async fn test_turnstile() -> trident_client::anyhow::Result<()> { turnstile.push_unlocked().await?; turnstile.push_locked().await?; } - Ok::<(), trident_client::anyhow::Error>(()) + Ok::<(), trident_client::test::anyhow::Error>(()) }; let result = std::panic::AssertUnwindSafe(test).catch_unwind().await; tester.after(localnet_handle).await?; @@ -23,7 +23,7 @@ async fn test_turnstile() -> trident_client::anyhow::Result<()> { } let final_result = result.unwrap(); if let Err(error) = final_result { - trident_client::error_reporter::report_error(&error); + trident_client::test::report_error(&error); return Err(error); } Ok(()) diff --git a/crates/test/tests/expand/with_root.expanded.rs b/crates/test/tests/expand/with_root.expanded.rs index c829e4ad..b3d1dde2 100644 --- a/crates/test/tests/expand/with_root.expanded.rs +++ b/crates/test/tests/expand/with_root.expanded.rs @@ -1,12 +1,12 @@ -#[trident_client::rstest] -#[trident_client::tokio::test(flavor = "multi_thread")] -#[trident_client::serial_test::serial] -async fn test_with_defined_root() -> trident_client::anyhow::Result<()> { - let mut tester = trident_client::Tester::with_root("i_am_root"); +#[trident_client::test::rstest] +#[trident_client::test::tokio::test(flavor = "multi_thread")] +#[trident_client::test::serial_test::serial] +async fn test_with_defined_root() -> trident_client::test::anyhow::Result<()> { + let mut tester = trident_client::test::Tester::with_root("i_am_root"); let localnet_handle = tester.before().await?; let test = async { {} - Ok::<(), trident_client::anyhow::Error>(()) + Ok::<(), trident_client::test::anyhow::Error>(()) }; let result = std::panic::AssertUnwindSafe(test).catch_unwind().await; tester.after(localnet_handle).await?; @@ -15,7 +15,7 @@ async fn test_with_defined_root() -> trident_client::anyhow::Result<()> { } let final_result = result.unwrap(); if let Err(error) = final_result { - trident_client::error_reporter::report_error(&error); + trident_client::test::report_error(&error); return Err(error); } Ok(()) diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock b/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock index 42ab1daa..ed4099fa 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock +++ b/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock @@ -2311,7 +2311,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.6", + "hermit-abi 0.3.9", "libc", "windows-sys 0.52.0", ] @@ -6078,7 +6078,6 @@ dependencies = [ "solana-bpf-loader-program", "solana-cli-output", "solana-program", - "solana-logger", "solana-program-runtime", "solana-program-test", "solana-sdk", diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs index 8d3acb40..509c99d4 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -1,6 +1,6 @@ +use anchor_lang::prelude::*; use arbitrary_custom_types_4::ID as PROGRAM_ID; -use trident_client::anchor_lang::{self, prelude::*}; -use trident_client::fuzzing::FuzzingError; +use trident_client::fuzzing::{anchor_lang, FuzzingError}; pub struct InitializeSnapshot<'info> { pub counter: Option>, pub user: Signer<'info>, diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 266525d7..55f253da 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,6 +1,8 @@ pub mod arbitrary_custom_types_4_fuzz_instructions { use crate::accounts_snapshots::*; - use trident_client::{fuzzing::*, solana_sdk::native_token::LAMPORTS_PER_SOL}; + use solana_sdk::native_token::LAMPORTS_PER_SOL; + use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; + use trident_client::fuzzing::*; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock b/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock index 3eec7e31..905b4c1f 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock @@ -1097,7 +1097,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1230,6 +1230,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1597,6 +1618,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2280,6 +2307,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3085,6 +3123,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -5609,6 +5661,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -6001,6 +6064,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quinn-proto", "quote", diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs index 1aa9daaf..129df822 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -1,7 +1,7 @@ +use anchor_lang::prelude::*; use anchor_spl::token::{Mint, Token, TokenAccount}; use arbitrary_limit_inputs_5::ID as PROGRAM_ID; -use trident_client::anchor_lang::{self, prelude::*}; -use trident_client::fuzzing::FuzzingError; +use trident_client::fuzzing::{anchor_lang, FuzzingError}; pub struct InitVestingSnapshot<'info> { pub sender: Signer<'info>, pub sender_token_account: Account<'info, TokenAccount>, diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index be0226bf..e233562a 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,6 +1,8 @@ pub mod arbitrary_limit_inputs_5_fuzz_instructions { use crate::accounts_snapshots::*; - use trident_client::{fuzzing::*, solana_sdk::native_token::LAMPORTS_PER_SOL}; + use solana_sdk::native_token::LAMPORTS_PER_SOL; + use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; + use trident_client::fuzzing::*; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { InitVesting(InitVesting), diff --git a/examples/fuzz-tests/hello_world/Cargo.lock b/examples/fuzz-tests/hello_world/Cargo.lock index 6deb6646..0a36493a 100644 --- a/examples/fuzz-tests/hello_world/Cargo.lock +++ b/examples/fuzz-tests/hello_world/Cargo.lock @@ -1089,7 +1089,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1222,6 +1222,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1589,6 +1610,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2278,6 +2305,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3083,6 +3121,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -5607,6 +5659,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5999,6 +6062,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quinn-proto", "quote", diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs index 6c6df989..86e3ecb2 100644 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -1,6 +1,7 @@ +use anchor_lang::prelude::*; use hello_world::ID as PROGRAM_ID; -use trident_client::anchor_lang::{self, prelude::*}; -use trident_client::fuzzing::FuzzingError; +use trident_client::fuzzing::{anchor_lang, FuzzingError}; + pub struct InitializeSnapshot<'info> { pub author: Signer<'info>, pub hello_world_account: Option>, diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 8259542b..c60e5aa1 100644 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,6 +1,8 @@ pub mod hello_world_fuzz_instructions { use crate::accounts_snapshots::*; - use trident_client::{fuzzing::*, solana_sdk::native_token::LAMPORTS_PER_SOL}; + use solana_sdk::native_token::LAMPORTS_PER_SOL; + use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; + use trident_client::fuzzing::*; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock index 187583d8..babc39bb 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock @@ -1089,7 +1089,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1222,6 +1222,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1589,6 +1610,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2280,6 +2307,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3085,6 +3123,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -5609,6 +5661,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -6001,6 +6064,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quinn-proto", "quote", diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs index bf54bf95..c95cb226 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -1,7 +1,7 @@ use anchor_spl::token::{Mint, Token, TokenAccount}; use incorrect_integer_arithmetic_3::ID as PROGRAM_ID; -use trident_client::anchor_lang::{self, prelude::*}; -use trident_client::fuzzing::FuzzingError; +use trident_client::fuzzing::{anchor_lang, FuzzingError}; +use anchor_lang::prelude::*; pub struct InitVestingSnapshot<'info> { pub sender: Signer<'info>, pub sender_token_account: Account<'info, TokenAccount>, diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index a01aaaca..c67fa64d 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,6 +1,8 @@ pub mod incorrect_integer_arithmetic_3_fuzz_instructions { use crate::accounts_snapshots::*; - use trident_client::{fuzzing::*, solana_sdk::native_token::LAMPORTS_PER_SOL}; + use solana_sdk::native_token::LAMPORTS_PER_SOL; + use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; + use trident_client::fuzzing::*; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { InitVesting(InitVesting), diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock b/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock index bfd6cc05..b8f170c6 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock @@ -1089,7 +1089,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1222,6 +1222,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1589,6 +1610,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2278,6 +2305,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3083,6 +3121,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -5607,6 +5659,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5999,6 +6062,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quinn-proto", "quote", diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs index 2d49bd62..cf102ee4 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -1,6 +1,6 @@ +use anchor_lang::prelude::*; use incorrect_ix_sequence_1::ID as PROGRAM_ID; -use trident_client::anchor_lang::{self, prelude::*}; -use trident_client::fuzzing::FuzzingError; +use trident_client::fuzzing::{anchor_lang, FuzzingError}; pub struct InitializeSnapshot<'info> { pub author: Signer<'info>, pub state: Option>, diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 1c409e46..8d568e13 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,7 +1,9 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { use crate::accounts_snapshots::*; use incorrect_ix_sequence_1::{PROJECT_SEED, STATE_SEED}; - use trident_client::{fuzzing::*, solana_sdk::native_token::LAMPORTS_PER_SOL}; + use solana_sdk::native_token::LAMPORTS_PER_SOL; + use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; + use trident_client::fuzzing::*; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), diff --git a/examples/fuzz-tests/unauthorized-access-2/Cargo.lock b/examples/fuzz-tests/unauthorized-access-2/Cargo.lock index be9f2937..28bb7ba5 100644 --- a/examples/fuzz-tests/unauthorized-access-2/Cargo.lock +++ b/examples/fuzz-tests/unauthorized-access-2/Cargo.lock @@ -1089,7 +1089,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1222,6 +1222,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1589,6 +1610,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2271,6 +2298,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3076,6 +3114,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -5600,6 +5652,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5992,6 +6055,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quinn-proto", "quote", diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs index fe4c5d1e..89c6e088 100644 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -1,6 +1,6 @@ -use trident_client::anchor_lang::{self, prelude::*}; -use trident_client::fuzzing::FuzzingError; use unauthorized_access_2::ID as PROGRAM_ID; +use trident_client::fuzzing::{anchor_lang, FuzzingError}; +use anchor_lang::prelude::*; pub struct InitializeSnapshot<'info> { pub author: Signer<'info>, pub escrow: Option>, diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 3ef7fdac..b1c3bbea 100644 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,6 +1,8 @@ pub mod unauthorized_access_2_fuzz_instructions { use crate::accounts_snapshots::*; - use trident_client::{fuzzing::*, solana_sdk::native_token::LAMPORTS_PER_SOL}; + use solana_sdk::native_token::LAMPORTS_PER_SOL; + use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; + use trident_client::fuzzing::*; use unauthorized_access_2::ESCROW_SEED; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock b/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock index 45fac246..15e2a586 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock +++ b/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock @@ -1089,7 +1089,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1222,6 +1222,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1589,6 +1610,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2271,6 +2298,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3076,6 +3114,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -5600,6 +5652,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5992,6 +6055,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quinn-proto", "quote", diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs index 65448991..ea5d9721 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -1,5 +1,5 @@ -use trident_client::anchor_lang::{self, prelude::*}; -use trident_client::fuzzing::FuzzingError; +use anchor_lang::prelude::*; +use trident_client::fuzzing::{anchor_lang, FuzzingError}; use unchecked_arithmetic_0::ID as PROGRAM_ID; pub struct InitializeSnapshot<'info> { pub counter: Option>, diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 09d5583e..b4aa2c23 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,6 +1,8 @@ pub mod unchecked_arithmetic_0_fuzz_instructions { use crate::accounts_snapshots::*; - use trident_client::{fuzzing::*, solana_sdk::native_token::LAMPORTS_PER_SOL}; + use solana_sdk::native_token::LAMPORTS_PER_SOL; + use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; + use trident_client::fuzzing::*; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), diff --git a/examples/integration-tests/escrow/.program_client/src/lib.rs b/examples/integration-tests/escrow/.program_client/src/lib.rs index a3eac045..4e1defe5 100644 --- a/examples/integration-tests/escrow/.program_client/src/lib.rs +++ b/examples/integration-tests/escrow/.program_client/src/lib.rs @@ -1,6 +1,7 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod escrow_instruction { - use trident_client::*; + use trident_client::prelude::*; + use trident_client::test::*; pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, diff --git a/examples/integration-tests/escrow/Cargo.lock b/examples/integration-tests/escrow/Cargo.lock index d141ccde..d4f78ab3 100644 --- a/examples/integration-tests/escrow/Cargo.lock +++ b/examples/integration-tests/escrow/Cargo.lock @@ -1039,7 +1039,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1172,6 +1172,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1517,6 +1538,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2129,6 +2156,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -2809,6 +2847,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -4929,6 +4981,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5281,6 +5344,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quote", "rand 0.8.5", diff --git a/examples/integration-tests/escrow/trident-tests/poc_tests/tests/test.rs b/examples/integration-tests/escrow/trident-tests/poc_tests/tests/test.rs index af382cb6..f98a6593 100644 --- a/examples/integration-tests/escrow/trident-tests/poc_tests/tests/test.rs +++ b/examples/integration-tests/escrow/trident-tests/poc_tests/tests/test.rs @@ -1,9 +1,9 @@ use anchor_spl::token; use fehler::throws; use program_client::*; -// use program_client::escrow_instruction; -use trident_client::{anyhow::Result, *}; +use trident_client::prelude::*; +use trident_client::test::*; #[throws] #[fixture] async fn init_fixture() -> Fixture { @@ -77,7 +77,7 @@ async fn test_happy_path1(#[future] init_fixture: Result) { fixture.alice_token_a_account, fixture.alice_token_b_account, fixture.escrow_account.pubkey(), - System::id(), + solana_sdk::system_program::ID, token::ID, [fixture.alice_wallet.clone(), fixture.escrow_account.clone()], ) @@ -150,7 +150,7 @@ async fn test_happy_path2(#[future] init_fixture: Result) { fixture.alice_token_a_account, fixture.alice_token_b_account, fixture.escrow_account.pubkey(), - System::id(), + solana_sdk::system_program::ID, token::ID, [fixture.alice_wallet.clone(), fixture.escrow_account.clone()], ) diff --git a/examples/integration-tests/turnstile/.program_client/src/lib.rs b/examples/integration-tests/turnstile/.program_client/src/lib.rs index cbad6c02..db57dde3 100644 --- a/examples/integration-tests/turnstile/.program_client/src/lib.rs +++ b/examples/integration-tests/turnstile/.program_client/src/lib.rs @@ -1,6 +1,7 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod turnstile_instruction { - use trident_client::*; + use trident_client::prelude::*; + use trident_client::test::*; pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, diff --git a/examples/integration-tests/turnstile/Cargo.lock b/examples/integration-tests/turnstile/Cargo.lock index aa7e1b51..765c78be 100644 --- a/examples/integration-tests/turnstile/Cargo.lock +++ b/examples/integration-tests/turnstile/Cargo.lock @@ -1039,7 +1039,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", "unicode-width", @@ -1172,6 +1172,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.8.0" @@ -1517,6 +1538,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.34" @@ -2121,6 +2148,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -2800,6 +2838,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettytable" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +dependencies = [ + "csv", + "encode_unicode 1.0.0", + "is-terminal", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -4920,6 +4972,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5272,6 +5335,7 @@ dependencies = [ "lazy_static", "log", "pathdiff", + "prettytable", "proc-macro2", "quote", "rand 0.8.5", diff --git a/examples/integration-tests/turnstile/trident-tests/poc_tests/tests/test.rs b/examples/integration-tests/turnstile/trident-tests/poc_tests/tests/test.rs index 599e8b32..09dd87a8 100644 --- a/examples/integration-tests/turnstile/trident-tests/poc_tests/tests/test.rs +++ b/examples/integration-tests/turnstile/trident-tests/poc_tests/tests/test.rs @@ -1,6 +1,7 @@ use fehler::throws; -use program_client::turnstile_instruction; -use trident_client::{anyhow::Result, *}; +use program_client::*; +use trident_client::prelude::*; +use trident_client::test::*; #[throws] #[fixture] @@ -35,7 +36,7 @@ async fn init_fixture() -> Fixture { &fixture.client, fixture.state.pubkey(), fixture.user_initializer.pubkey(), - System::id(), + solana_sdk::system_program::ID, [fixture.state.clone(), fixture.user_initializer.clone()], ) .await?;