diff --git a/contracts/connection-router/tests/mock.rs b/contracts/connection-router/tests/mock.rs index 67bc0c1dd..22541610f 100644 --- a/contracts/connection-router/tests/mock.rs +++ b/contracts/connection-router/tests/mock.rs @@ -30,13 +30,13 @@ pub fn mock_gateway_execute( #[cw_serde] pub enum MockGatewayQueryMsg { - GetMessages { ids: Vec }, + GetOutgoingMessages { ids: Vec }, } pub fn mock_gateway_query(deps: Deps, _env: Env, msg: MockGatewayQueryMsg) -> StdResult { let mut msgs = vec![]; match msg { - MockGatewayQueryMsg::GetMessages { ids } => { + MockGatewayQueryMsg::GetOutgoingMessages { ids } => { for id in ids { match MOCK_GATEWAY_MESSAGES.may_load(deps.storage, id)? { Some(m) => msgs.push(m), @@ -56,7 +56,7 @@ pub fn get_gateway_messages( app.wrap() .query_wasm_smart( gateway_address, - &MockGatewayQueryMsg::GetMessages { + &MockGatewayQueryMsg::GetOutgoingMessages { ids: msgs.iter().map(|msg| msg.cc_id.clone()).collect(), }, ) diff --git a/contracts/gateway/src/contract.rs b/contracts/gateway/src/contract.rs index 7cb4518fa..90b178f6d 100644 --- a/contracts/gateway/src/contract.rs +++ b/contracts/gateway/src/contract.rs @@ -120,7 +120,7 @@ mod internal { pub(crate) fn query(deps: Deps, _env: Env, msg: QueryMsg) -> Result { match msg { - QueryMsg::GetMessages { message_ids } => { + QueryMsg::GetOutgoingMessages { message_ids } => { let msgs = contract::query::get_outgoing_messages(deps.storage, message_ids)?; to_binary(&msgs).change_context(Error::SerializeResponse) } diff --git a/contracts/gateway/tests/contract.rs b/contracts/gateway/tests/contract.rs index 790cabc53..069dd80ff 100644 --- a/contracts/gateway/tests/contract.rs +++ b/contracts/gateway/tests/contract.rs @@ -137,7 +137,7 @@ fn successful_route_outgoing() { let router = "router"; instantiate_contract(deps.as_mut(), "verifier", router); - let query_msg = QueryMsg::GetMessages { + let query_msg = QueryMsg::GetOutgoingMessages { message_ids: msgs.iter().map(|msg| msg.cc_id.clone()).collect(), }; diff --git a/contracts/multisig-prover/src/execute.rs b/contracts/multisig-prover/src/execute.rs index 0cb4fb13b..2c748ed64 100644 --- a/contracts/multisig-prover/src/execute.rs +++ b/contracts/multisig-prover/src/execute.rs @@ -85,7 +85,7 @@ fn get_messages( ) -> Result, ContractError> { let length = message_ids.len(); - let query = gateway_api::msg::QueryMsg::GetMessages { message_ids }; + let query = gateway_api::msg::QueryMsg::GetOutgoingMessages { message_ids }; let messages: Vec = querier.query(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: gateway.into(), msg: to_binary(&query)?, diff --git a/contracts/multisig-prover/src/test/mocks/gateway.rs b/contracts/multisig-prover/src/test/mocks/gateway.rs index 999a44937..9b6b1a64b 100644 --- a/contracts/multisig-prover/src/test/mocks/gateway.rs +++ b/contracts/multisig-prover/src/test/mocks/gateway.rs @@ -26,7 +26,7 @@ pub fn execute( pub fn query(_deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::GetMessages { message_ids: _ } => { + QueryMsg::GetOutgoingMessages { message_ids: _ } => { let res = test_data::messages(); to_binary(&res) } diff --git a/integration-tests/tests/test_utils/mod.rs b/integration-tests/tests/test_utils/mod.rs index 63a7df15a..207c3ee5c 100644 --- a/integration-tests/tests/test_utils/mod.rs +++ b/integration-tests/tests/test_utils/mod.rs @@ -221,7 +221,7 @@ pub fn get_messages_from_gateway( ) -> Vec { let query_response = app.wrap().query_wasm_smart( gateway_address, - &gateway_api::msg::QueryMsg::GetMessages { + &gateway_api::msg::QueryMsg::GetOutgoingMessages { message_ids: message_ids.to_owned(), }, ); diff --git a/packages/gateway-api/src/msg.rs b/packages/gateway-api/src/msg.rs index 37de48160..578a018eb 100644 --- a/packages/gateway-api/src/msg.rs +++ b/packages/gateway-api/src/msg.rs @@ -17,6 +17,7 @@ pub enum ExecuteMsg { #[cw_serde] #[derive(QueryResponses)] pub enum QueryMsg { + // messages that can be relayed to the chain corresponding to this gateway #[returns(Vec)] - GetMessages { message_ids: Vec }, + GetOutgoingMessages { message_ids: Vec }, }