abstract_interface/native/
module_factory.rs

1use abstract_std::module_factory::*;
2pub use abstract_std::module_factory::{
3    ExecuteMsgFns as MFactoryExecFns, QueryMsgFns as MFactoryQueryFns,
4};
5use cw_orch::{interface, prelude::*};
6
7#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, MigrateMsg)]
8pub struct ModuleFactory<Chain>;
9
10impl<Chain: CwEnv> cw_blob::interface::DeterministicInstantiation<Chain> for ModuleFactory<Chain> {}
11
12impl<Chain: CwEnv> Uploadable for ModuleFactory<Chain> {
13    fn wrapper() -> <Mock as TxHandler>::ContractSource {
14        Box::new(
15            ContractWrapper::new_with_empty(
16                ::module_factory::contract::execute,
17                ::module_factory::contract::instantiate,
18                ::module_factory::contract::query,
19            )
20            .with_migrate(::module_factory::contract::migrate),
21        )
22    }
23    fn wasm(_chain: &ChainInfoOwned) -> WasmPath {
24        artifacts_dir_from_workspace!()
25            .find_wasm_path("module_factory")
26            .unwrap()
27    }
28}