Struct abstract_sdk::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<'_>) -> AbstractSdkResult<Addr>
pub fn module_address(&self, module_id: ModuleId<'_>) -> AbstractSdkResult<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<'_>
) -> AbstractSdkResult<ContractVersion>
pub fn module_version( &self, module_id: ModuleId<'_> ) -> AbstractSdkResult<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>>
) -> AbstractSdkResult<CosmosMsg>
pub fn app_request<M: Serialize>( &self, app_id: ModuleId<'_>, message: impl Into<ExecuteMsg<M, Empty>> ) -> AbstractSdkResult<CosmosMsg>
Construct an app request message.
sourcepub fn app_configure(
&self,
app_id: ModuleId<'_>,
message: BaseExecuteMsg
) -> AbstractSdkResult<CosmosMsg>
pub fn app_configure( &self, app_id: ModuleId<'_>, message: BaseExecuteMsg ) -> AbstractSdkResult<CosmosMsg>
Construct an app configuation message
sourcepub fn query_app<Q: Serialize, R: DeserializeOwned>(
&self,
app_id: ModuleId<'_>,
message: impl Into<QueryMsg<Q>>
) -> AbstractSdkResult<R>
pub fn query_app<Q: Serialize, R: DeserializeOwned>( &self, app_id: ModuleId<'_>, message: impl Into<QueryMsg<Q>> ) -> AbstractSdkResult<R>
Smart query an app
sourcepub fn api_request<M: Serialize + Into<ExecuteMsg<M, Empty>>>(
&self,
api_id: ModuleId<'_>,
message: M
) -> AbstractSdkResult<CosmosMsg>
pub fn api_request<M: Serialize + Into<ExecuteMsg<M, Empty>>>( &self, api_id: ModuleId<'_>, message: M ) -> AbstractSdkResult<CosmosMsg>
Interactions with Abstract APIs Construct an api request message.
sourcepub fn query_api<Q: Serialize, R: DeserializeOwned>(
&self,
api_id: ModuleId<'_>,
message: impl Into<QueryMsg<Q>>
) -> AbstractSdkResult<R>
pub fn query_api<Q: Serialize, R: DeserializeOwned>( &self, api_id: ModuleId<'_>, message: impl Into<QueryMsg<Q>> ) -> AbstractSdkResult<R>
Smart query an API