Struct abstract_sdk::apis::modules::Modules
source · pub struct Modules<'a, T: ModuleInterface> { /* private fields */ }
Implementations§
source§impl<'a, T: ModuleInterface> Modules<'a, T>
impl<'a, T: ModuleInterface> Modules<'a, T>
sourcepub fn module_address(&self, module_id: ModuleId<'_>) -> StdResult<Addr>
pub fn module_address(&self, module_id: ModuleId<'_>) -> StdResult<Addr>
Retrieve the address of an application in this OS.
This should not be used to execute messages on an Api
.
Use Modules::api_request(..)
instead.
sourcepub fn module_version(
&self,
module_id: ModuleId<'_>
) -> StdResult<ContractVersion>
pub fn module_version(
&self,
module_id: ModuleId<'_>
) -> StdResult<ContractVersion>
Retrieve the version of an application in this OS. Note: this method makes use of the Cw2 query and may not coincide with the version of the module listed in VersionControl.
sourcepub fn app_request<M: Serialize>(
&self,
app_id: ModuleId<'_>,
message: impl Into<ExecuteMsg<M, Empty>>
) -> StdResult<CosmosMsg>
pub fn app_request<M: Serialize>(
&self,
app_id: ModuleId<'_>,
message: impl Into<ExecuteMsg<M, Empty>>
) -> StdResult<CosmosMsg>
Construct an app request message.
sourcepub fn app_configure(
&self,
app_id: ModuleId<'_>,
message: BaseExecuteMsg
) -> StdResult<CosmosMsg>
pub fn app_configure(
&self,
app_id: ModuleId<'_>,
message: BaseExecuteMsg
) -> StdResult<CosmosMsg>
Construct an app configuation message
sourcepub fn query_app<Q: Serialize, R: DeserializeOwned>(
&self,
app_id: ModuleId<'_>,
message: impl Into<QueryMsg<Q>>
) -> StdResult<R>
pub fn query_app<Q: Serialize, R: DeserializeOwned>(
&self,
app_id: ModuleId<'_>,
message: impl Into<QueryMsg<Q>>
) -> StdResult<R>
Smart query an app
sourcepub fn api_request<M: Serialize + Into<ExecuteMsg<M, Empty>>>(
&self,
api_id: ModuleId<'_>,
message: M
) -> StdResult<CosmosMsg>
pub fn api_request<M: Serialize + Into<ExecuteMsg<M, Empty>>>(
&self,
api_id: ModuleId<'_>,
message: M
) -> StdResult<CosmosMsg>
Interactions with Abstract APIs Construct an api request message.