diff --git a/artifacts/program_methods/amm.bin b/artifacts/program_methods/amm.bin index ab0cbe5f..a8ca1f4e 100644 Binary files a/artifacts/program_methods/amm.bin and b/artifacts/program_methods/amm.bin differ diff --git a/artifacts/program_methods/authenticated_transfer.bin b/artifacts/program_methods/authenticated_transfer.bin index 91400866..0bc3de67 100644 Binary files a/artifacts/program_methods/authenticated_transfer.bin and b/artifacts/program_methods/authenticated_transfer.bin differ diff --git a/artifacts/program_methods/pinata.bin b/artifacts/program_methods/pinata.bin index f27b1061..64aaa346 100644 Binary files a/artifacts/program_methods/pinata.bin and b/artifacts/program_methods/pinata.bin differ diff --git a/artifacts/program_methods/pinata_token.bin b/artifacts/program_methods/pinata_token.bin index b02c564d..a47d90f4 100644 Binary files a/artifacts/program_methods/pinata_token.bin and b/artifacts/program_methods/pinata_token.bin differ diff --git a/artifacts/program_methods/privacy_preserving_circuit.bin b/artifacts/program_methods/privacy_preserving_circuit.bin index aee7c136..8e151aa7 100644 Binary files a/artifacts/program_methods/privacy_preserving_circuit.bin and b/artifacts/program_methods/privacy_preserving_circuit.bin differ diff --git a/artifacts/program_methods/token.bin b/artifacts/program_methods/token.bin index 5de3f363..9a1269c5 100644 Binary files a/artifacts/program_methods/token.bin and b/artifacts/program_methods/token.bin differ diff --git a/artifacts/test_program_methods/burner.bin b/artifacts/test_program_methods/burner.bin index 3af0656b..b055fbdb 100644 Binary files a/artifacts/test_program_methods/burner.bin and b/artifacts/test_program_methods/burner.bin differ diff --git a/artifacts/test_program_methods/chain_caller.bin b/artifacts/test_program_methods/chain_caller.bin index fdd29bd9..c650f1f9 100644 Binary files a/artifacts/test_program_methods/chain_caller.bin and b/artifacts/test_program_methods/chain_caller.bin differ diff --git a/artifacts/test_program_methods/changer_claimer.bin b/artifacts/test_program_methods/changer_claimer.bin index 139da2a4..2dea3a0d 100644 Binary files a/artifacts/test_program_methods/changer_claimer.bin and b/artifacts/test_program_methods/changer_claimer.bin differ diff --git a/artifacts/test_program_methods/claimer.bin b/artifacts/test_program_methods/claimer.bin index c92813a9..fb881bbc 100644 Binary files a/artifacts/test_program_methods/claimer.bin and b/artifacts/test_program_methods/claimer.bin differ diff --git a/artifacts/test_program_methods/data_changer.bin b/artifacts/test_program_methods/data_changer.bin index 8878b168..5a7a8600 100644 Binary files a/artifacts/test_program_methods/data_changer.bin and b/artifacts/test_program_methods/data_changer.bin differ diff --git a/artifacts/test_program_methods/extra_output.bin b/artifacts/test_program_methods/extra_output.bin index 4e57b792..fc8dc194 100644 Binary files a/artifacts/test_program_methods/extra_output.bin and b/artifacts/test_program_methods/extra_output.bin differ diff --git a/artifacts/test_program_methods/malicious_authorization_changer.bin b/artifacts/test_program_methods/malicious_authorization_changer.bin index b9c707f0..99dcd50f 100644 Binary files a/artifacts/test_program_methods/malicious_authorization_changer.bin and b/artifacts/test_program_methods/malicious_authorization_changer.bin differ diff --git a/artifacts/test_program_methods/minter.bin b/artifacts/test_program_methods/minter.bin index 1e464b89..7ea603a5 100644 Binary files a/artifacts/test_program_methods/minter.bin and b/artifacts/test_program_methods/minter.bin differ diff --git a/artifacts/test_program_methods/missing_output.bin b/artifacts/test_program_methods/missing_output.bin index 56547658..3b2379c7 100644 Binary files a/artifacts/test_program_methods/missing_output.bin and b/artifacts/test_program_methods/missing_output.bin differ diff --git a/artifacts/test_program_methods/modified_transfer.bin b/artifacts/test_program_methods/modified_transfer.bin index a6a66d1f..48900c0c 100644 Binary files a/artifacts/test_program_methods/modified_transfer.bin and b/artifacts/test_program_methods/modified_transfer.bin differ diff --git a/artifacts/test_program_methods/nonce_changer.bin b/artifacts/test_program_methods/nonce_changer.bin index 75f117e3..b5ef1b9a 100644 Binary files a/artifacts/test_program_methods/nonce_changer.bin and b/artifacts/test_program_methods/nonce_changer.bin differ diff --git a/artifacts/test_program_methods/noop.bin b/artifacts/test_program_methods/noop.bin index aa9c8e84..c3b1d1d6 100644 Binary files a/artifacts/test_program_methods/noop.bin and b/artifacts/test_program_methods/noop.bin differ diff --git a/artifacts/test_program_methods/program_owner_changer.bin b/artifacts/test_program_methods/program_owner_changer.bin index 12fb4a5a..b697cc70 100644 Binary files a/artifacts/test_program_methods/program_owner_changer.bin and b/artifacts/test_program_methods/program_owner_changer.bin differ diff --git a/artifacts/test_program_methods/simple_balance_transfer.bin b/artifacts/test_program_methods/simple_balance_transfer.bin index fa446158..b54383e2 100644 Binary files a/artifacts/test_program_methods/simple_balance_transfer.bin and b/artifacts/test_program_methods/simple_balance_transfer.bin differ diff --git a/programs/amm/Cargo.toml b/programs/amm/Cargo.toml index efefc422..449d5dcc 100644 --- a/programs/amm/Cargo.toml +++ b/programs/amm/Cargo.toml @@ -14,4 +14,4 @@ token_core.workspace = true amm_core.workspace = true [features] -with-nssa = ["nssa"] \ No newline at end of file +nssa = ["dep:nssa"] \ No newline at end of file diff --git a/programs/amm/src/tests.rs b/programs/amm/src/tests.rs index 3cff5d83..9aa4bce6 100644 --- a/programs/amm/src/tests.rs +++ b/programs/amm/src/tests.rs @@ -4,7 +4,7 @@ use amm_core::{ PoolDefinition, compute_liquidity_token_pda, compute_liquidity_token_pda_seed, compute_pool_pda, compute_vault_pda, compute_vault_pda_seed, }; -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] use nssa::{ PrivateKey, PublicKey, PublicTransaction, V02State, program::Program, public_transaction, }; @@ -25,16 +25,16 @@ struct BalanceForTests; struct ChainedCallForTests; struct IdForTests; struct AccountWithMetadataForTests; -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] struct PrivateKeysForTests; -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] struct IdForExeTests; -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] struct BalanceForExeTests; -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] struct AccountsForExeTests; -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] impl PrivateKeysForTests { fn user_token_a_key() -> PrivateKey { PrivateKey::try_new([31; 32]).expect("Keys constructor expects valid private key") @@ -1008,7 +1008,7 @@ impl AccountWithMetadataForTests { } } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] impl BalanceForExeTests { fn user_token_a_holding_init() -> u128 { 10_000 @@ -1173,7 +1173,7 @@ impl BalanceForExeTests { } } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] impl IdForExeTests { fn pool_definition_id() -> AccountId { amm_core::compute_pool_pda( @@ -1233,7 +1233,7 @@ impl IdForExeTests { } } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] impl AccountsForExeTests { fn user_token_a_holding() -> Account { Account { @@ -2645,7 +2645,7 @@ fn new_definition_lp_symmetric_amounts() { assert_eq!(chained_call_lp, expected_lp_call); } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] fn state_for_amm_tests() -> V02State { let initial_data = []; let mut state = V02State::new_with_genesis_accounts(&initial_data, &[]); @@ -2689,7 +2689,7 @@ fn state_for_amm_tests() -> V02State { state } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] fn state_for_amm_tests_with_new_def() -> V02State { let initial_data = []; let mut state = V02State::new_with_genesis_accounts(&initial_data, &[]); @@ -2712,7 +2712,7 @@ fn state_for_amm_tests_with_new_def() -> V02State { state } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] #[test] fn test_simple_amm_remove() { let mut state = state_for_amm_tests(); @@ -2772,7 +2772,7 @@ fn test_simple_amm_remove() { assert_eq!(user_token_lp_post, expected_user_token_lp); } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] #[test] fn test_simple_amm_new_definition_inactive_initialized_pool_and_uninit_user_lp() { let mut state = state_for_amm_tests_with_new_def(); @@ -2853,7 +2853,7 @@ fn test_simple_amm_new_definition_inactive_initialized_pool_and_uninit_user_lp() assert_eq!(user_token_lp_post, expected_user_token_lp); } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] #[test] fn test_simple_amm_new_definition_inactive_initialized_pool_init_user_lp() { let mut state = state_for_amm_tests_with_new_def(); @@ -2938,7 +2938,7 @@ fn test_simple_amm_new_definition_inactive_initialized_pool_init_user_lp() { assert_eq!(user_token_lp_post, expected_user_token_lp); } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] #[test] fn test_simple_amm_new_definition_uninitialized_pool() { let mut state = state_for_amm_tests_with_new_def(); @@ -3011,7 +3011,7 @@ fn test_simple_amm_new_definition_uninitialized_pool() { assert_eq!(user_token_lp_post, expected_user_token_lp); } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] #[test] fn test_simple_amm_add() { let mut state = state_for_amm_tests(); @@ -3074,7 +3074,7 @@ fn test_simple_amm_add() { assert_eq!(user_token_lp_post, expected_user_token_lp); } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] #[test] fn test_simple_amm_swap_1() { let mut state = state_for_amm_tests(); @@ -3126,7 +3126,7 @@ fn test_simple_amm_swap_1() { assert_eq!(user_token_b_post, expected_user_token_b); } -#[cfg(feature = "with-nssa")] +#[cfg(feature = "nssa")] #[test] fn test_simple_amm_swap_2() { let mut state = state_for_amm_tests();