diff --git a/contracts/entry-point/src/contract.rs b/contracts/entry-point/src/contract.rs index 85248d24..4428be95 100644 --- a/contracts/entry-point/src/contract.rs +++ b/contracts/entry-point/src/contract.rs @@ -1,10 +1,11 @@ -use crate::error::ContractError::ReplyIdError; -use crate::execute::execute_axelar_swap_and_action; -use crate::reply::{handle_swap_and_action_request, SWAP_AND_ACTION_REQUEST_REPLY_ID}; use crate::{ error::{ContractError, ContractResult}, - execute::{execute_post_swap_action, execute_swap_and_action, execute_user_swap}, + execute::{ + execute_axelar_swap_and_action, execute_post_swap_action, execute_swap_and_action, + execute_user_swap, + }, query::{query_ibc_transfer_adapter_contract, query_swap_venue_adapter_contract}, + reply::{handle_swap_and_action_request, SWAP_AND_ACTION_REQUEST_REPLY_ID}, state::{BLOCKED_CONTRACT_ADDRESSES, IBC_TRANSFER_CONTRACT_ADDRESS, SWAP_VENUE_MAP}, }; use cosmwasm_std::{ @@ -149,7 +150,7 @@ pub fn execute( pub fn reply(deps: DepsMut, _env: Env, msg: Reply) -> Result { match msg.id { SWAP_AND_ACTION_REQUEST_REPLY_ID => handle_swap_and_action_request(deps, _env, msg), - _ => Err(ReplyIdError(msg.id)), + _ => Err(ContractError::ReplyIdError(msg.id)), } } diff --git a/contracts/entry-point/src/execute.rs b/contracts/entry-point/src/execute.rs index 970e18e9..d6f25f60 100644 --- a/contracts/entry-point/src/execute.rs +++ b/contracts/entry-point/src/execute.rs @@ -1,8 +1,10 @@ -use crate::reply::{SwapActionTempStorage, SWAP_AND_ACTION_REQUEST_REPLY_ID}; -use crate::state::SWAP_AND_ACTION_REQUEST_TEMP_STORAGE; use crate::{ error::{ContractError, ContractResult}, - state::{BLOCKED_CONTRACT_ADDRESSES, IBC_TRANSFER_CONTRACT_ADDRESS, SWAP_VENUE_MAP}, + reply::{SwapActionTempStorage, SWAP_AND_ACTION_REQUEST_REPLY_ID}, + state::{ + BLOCKED_CONTRACT_ADDRESSES, IBC_TRANSFER_CONTRACT_ADDRESS, + SWAP_AND_ACTION_REQUEST_TEMP_STORAGE, SWAP_VENUE_MAP, + }, }; use cosmwasm_std::{ to_binary, Addr, BankMsg, Coin, CosmosMsg, DepsMut, Env, MessageInfo, Response, SubMsg, @@ -175,7 +177,7 @@ pub fn execute_axelar_swap_and_action( post_swap_action, affiliates, })?, - funds: info.funds.clone(), + funds: info.funds, }), SWAP_AND_ACTION_REQUEST_REPLY_ID, ); diff --git a/contracts/entry-point/tests/test_error_handling.rs b/contracts/entry-point/tests/test_error_handling.rs index 51dca571..4fb43531 100644 --- a/contracts/entry-point/tests/test_error_handling.rs +++ b/contracts/entry-point/tests/test_error_handling.rs @@ -73,7 +73,7 @@ pub fn test_execute_swap_and_action(params: Params) { let res = skip_api_entry_point::contract::execute( deps.as_mut(), env, - info.clone(), + info, ExecuteMsg::AxelarSwapAndAction { user_swap: params.user_swap, min_coin: params.min_coin,