diff --git a/contracts/swap/src/queries.rs b/contracts/swap/src/queries.rs index 1d81edf..fa1ce87 100644 --- a/contracts/swap/src/queries.rs +++ b/contracts/swap/src/queries.rs @@ -72,9 +72,6 @@ pub fn estimate_swap_result( current_swap.amount = swap_estimate.result_quantity; current_swap.denom = swap_estimate.result_denom; - deps.api.debug(&format!("step: {:?}", step)); - deps.api.debug(&format!("current_swap: {:?}", current_swap)); - let step_fee = swap_estimate.fee_estimate.expect("fee estimate should be available"); fees.push(step_fee); @@ -185,9 +182,6 @@ fn estimate_execution_buy_from_source( ))); } - deps.api.debug(&format!("average_price: {average_price}")); - deps.api.debug(&format!("result_quantity: {result_quantity}")); - Ok(StepExecutionEstimate { worst_price, result_quantity, @@ -305,15 +299,10 @@ fn estimate_execution_sell_from_source( let average_price = get_average_price_from_orders(&top_orders, market.min_price_tick_size, false); let worst_price = get_worst_price_from_orders(&top_orders); - deps.api.debug(&format!("average_price: {average_price}")); - deps.api.debug(&format!("input_base_quantity: {input_base_quantity}")); - let expected_exchange_quantity = input_base_quantity * average_price; let fee_estimate = expected_exchange_quantity * fee_percent; let expected_quantity = expected_exchange_quantity - fee_estimate; - deps.api.debug(&format!("input_base_quantity: {expected_exchange_quantity}")); - Ok(StepExecutionEstimate { worst_price, result_quantity: expected_quantity, diff --git a/contracts/swap/src/testing/migration_test.rs b/contracts/swap/src/testing/migration_test.rs index 746e906..bf9370d 100644 --- a/contracts/swap/src/testing/migration_test.rs +++ b/contracts/swap/src/testing/migration_test.rs @@ -11,7 +11,7 @@ use injective_std::types::cosmwasm::wasm::v1::{MsgMigrateContract, MsgMigrateCon use injective_test_tube::{Account, ExecuteResponse, InjectiveTestApp, Module, Runner, Wasm}; use injective_testing::test_tube::utils::store_code; -type V100InstantiateMsg = InstantiateMsg; +type V101InstantiateMsg = InstantiateMsg; #[test] #[cfg_attr(not(feature = "integration"), ignore)] @@ -31,12 +31,12 @@ fn test_migration() { ], ); - let swap_v100_code_id = wasm.store_code(&wasm_byte_code, None, &owner).unwrap().data.code_id; + let swap_v101_code_id = wasm.store_code(&wasm_byte_code, None, &owner).unwrap().data.code_id; - let swap_v100_address: String = wasm + let swap_v101_address: String = wasm .instantiate( - swap_v100_code_id, - &V100InstantiateMsg { + swap_v101_code_id, + &V101InstantiateMsg { admin: Addr::unchecked(owner.address()), fee_recipient: FeeRecipient::SwapContract, }, @@ -53,14 +53,14 @@ fn test_migration() { .query( "/cosmwasm.wasm.v1.Query/ContractInfo", &QueryContractInfoRequest { - address: swap_v100_address.clone(), + address: swap_v101_address.clone(), }, ) .unwrap(); let contract_info = res.contract_info.unwrap(); - assert_eq!(res.address, swap_v100_address); - assert_eq!(contract_info.code_id, swap_v100_code_id); + assert_eq!(res.address, swap_v101_address); + assert_eq!(contract_info.code_id, swap_v101_code_id); assert_eq!(contract_info.creator, owner.address()); assert_eq!(contract_info.label, "swap-contract"); @@ -70,7 +70,7 @@ fn test_migration() { .execute( MsgMigrateContract { sender: owner.address(), - contract: swap_v100_address.clone(), + contract: swap_v101_address.clone(), code_id: swap_v110_code_id, msg: serde_json_wasm::to_vec(&MigrateMsg {}).unwrap(), }, @@ -83,17 +83,17 @@ fn test_migration() { .query( "/cosmwasm.wasm.v1.Query/ContractInfo", &QueryContractInfoRequest { - address: swap_v100_address.clone(), + address: swap_v101_address.clone(), }, ) .unwrap(); let contract_info = res.contract_info.unwrap(); - assert_eq!(res.address, swap_v100_address); + assert_eq!(res.address, swap_v101_address); assert_eq!(contract_info.code_id, swap_v110_code_id); assert_eq!(contract_info.creator, owner.address()); assert_eq!(contract_info.label, "swap-contract"); - happy_path_two_hops_test(app, owner, swap_v100_address); + happy_path_two_hops_test(app, owner, swap_v101_address); } diff --git a/contracts/swap/src/testing/test_artifacts/swap-contract-v100.wasm b/contracts/swap/src/testing/test_artifacts/swap-contract-v100.wasm deleted file mode 100644 index 4bdd560..0000000 Binary files a/contracts/swap/src/testing/test_artifacts/swap-contract-v100.wasm and /dev/null differ diff --git a/contracts/swap/src/testing/test_artifacts/swap_contract-v101.wasm b/contracts/swap/src/testing/test_artifacts/swap_contract-v101.wasm new file mode 100644 index 0000000..59d7e8a Binary files /dev/null and b/contracts/swap/src/testing/test_artifacts/swap_contract-v101.wasm differ