abstract_interface/native/
ibc_client.rs1use abstract_std::{
2 ibc_client::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg},
3 IBC_CLIENT,
4};
5
6use cw_orch::{contract::Contract, interface, prelude::*};
7
8use crate::RegisteredModule;
9
10#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, MigrateMsg)]
11pub struct IbcClient<Chain>;
12
13impl<Chain: CwEnv> cw_blob::interface::DeterministicInstantiation<Chain> for IbcClient<Chain> {}
14
15impl<Chain: CwEnv> Uploadable for IbcClient<Chain> {
16 fn wrapper() -> <Mock as TxHandler>::ContractSource {
17 Box::new(
18 ContractWrapper::new_with_empty(
19 ::ibc_client::contract::execute,
20 ::ibc_client::contract::instantiate,
21 ::ibc_client::contract::query,
22 )
23 .with_migrate(::ibc_client::contract::migrate)
24 .with_reply(::ibc_client::contract::reply)
25 .with_sudo(::ibc_client::contract::sudo),
26 )
27 }
28 fn wasm(_chain: &ChainInfoOwned) -> WasmPath {
29 artifacts_dir_from_workspace!()
30 .find_wasm_path("ibc_client")
31 .unwrap()
32 }
33}
34
35impl<Chain: CwEnv> RegisteredModule for IbcClient<Chain> {
36 type InitMsg = cosmwasm_std::Empty;
37
38 fn module_id<'a>() -> &'a str {
39 IBC_CLIENT
40 }
41 fn module_version<'a>() -> &'a str {
42 ibc_client::contract::CONTRACT_VERSION
43 }
44
45 fn dependencies<'a>() -> &'a [abstract_std::objects::dependency::StaticDependency] {
46 &[]
47 }
48}
49
50impl<Chain: CwEnv> From<Contract<Chain>> for IbcClient<Chain> {
51 fn from(value: Contract<Chain>) -> Self {
52 IbcClient(value)
53 }
54}