Skip to content

Commit 9e1c345

Browse files
authored
refactor(contracts): re-export gateway and router messages (#627)
1 parent 9f3d33f commit 9e1c345

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

contracts/gateway/src/contract.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ use axelar_wasm_std::{address, FnExt};
55
use cosmwasm_std::entry_point;
66
use cosmwasm_std::{Binary, Deps, DepsMut, Empty, Env, MessageInfo, Response};
77
use error_stack::ResultExt;
8-
use gateway_api::msg::{ExecuteMsg, QueryMsg};
98
use router_api::client::Router;
109

11-
use crate::msg::InstantiateMsg;
10+
use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
1211
use crate::state;
1312
use crate::state::Config;
1413

contracts/gateway/src/msg.rs

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ pub struct InstantiateMsg {
77
/// Address of the router contract on axelar.
88
pub router_address: String,
99
}
10+
11+
// these messages are extracted into a separate package to avoid circular dependencies
12+
pub use gateway_api::msg::{ExecuteMsg, QueryMsg};

contracts/router/src/contract.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ use cosmwasm_std::{
55
to_json_binary, Addr, Binary, Deps, DepsMut, Empty, Env, MessageInfo, Response, Storage,
66
};
77
use router_api::error::Error;
8-
use router_api::msg::{ExecuteMsg, QueryMsg};
98

109
use crate::contract::migrations::v0_3_3;
1110
use crate::events::RouterInstantiated;
12-
use crate::msg::InstantiateMsg;
11+
use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
1312
use crate::state;
1413
use crate::state::{load_chain_by_gateway, load_config, Config};
1514

contracts/router/src/msg.rs

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ pub struct InstantiateMsg {
99
// the address of the nexus gateway
1010
pub nexus_gateway: String,
1111
}
12+
13+
// these messages are extracted into a separate package to avoid circular dependencies
14+
pub use router_api::msg::{ExecuteMsg, QueryMsg};

0 commit comments

Comments
 (0)