pub struct IbcClient<'a, T>where
T: IbcInterface,{ /* private fields */ }
Expand description
API for interacting with the Abstract IBC client.
§Example
use abstract_sdk::prelude::*;
let ibc_client: IbcClient<MockModule> = module.ibc_client(deps.as_ref());
Implementations§
Source§impl<T> IbcClient<'_, T>where
T: IbcInterface,
impl<T> IbcClient<'_, T>where
T: IbcInterface,
Sourcepub fn module_address(&self) -> Result<Addr, AbstractSdkError>
pub fn module_address(&self) -> Result<Addr, AbstractSdkError>
Get address of this module
Sourcepub fn module_ibc_action<M>(
&self,
host_chain: TruncatedChainId,
target_module: ModuleInfo,
exec_msg: &M,
callback: Option<Callback>,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
pub fn module_ibc_action<M>(
&self,
host_chain: TruncatedChainId,
target_module: ModuleInfo,
exec_msg: &M,
callback: Option<Callback>,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
Send module action from this module to the target module
Sourcepub fn module_ibc_query<B, M>(
&self,
host_chain: TruncatedChainId,
target_module: InstalledModuleIdentification,
query_msg: &QueryMsg<B, M>,
callback: Callback,
) -> Result<CosmosMsg, AbstractSdkError>
pub fn module_ibc_query<B, M>( &self, host_chain: TruncatedChainId, target_module: InstalledModuleIdentification, query_msg: &QueryMsg<B, M>, callback: Callback, ) -> Result<CosmosMsg, AbstractSdkError>
Send module query from this module to the target module
Use [abstract_std::ibc::IbcResponseMsg::module_query_response
] to parse response
Sourcepub fn ibc_query(
&self,
host_chain: TruncatedChainId,
query: impl Into<QueryRequest<ModuleQuery>>,
callback: Callback,
) -> Result<CosmosMsg, AbstractSdkError>
pub fn ibc_query( &self, host_chain: TruncatedChainId, query: impl Into<QueryRequest<ModuleQuery>>, callback: Callback, ) -> Result<CosmosMsg, AbstractSdkError>
Send query from this module to the host chain
Sourcepub fn ibc_queries(
&self,
host_chain: TruncatedChainId,
queries: Vec<QueryRequest<ModuleQuery>>,
callback: Callback,
) -> Result<CosmosMsg, AbstractSdkError>
pub fn ibc_queries( &self, host_chain: TruncatedChainId, queries: Vec<QueryRequest<ModuleQuery>>, callback: Callback, ) -> Result<CosmosMsg, AbstractSdkError>
Send queries from this module to the host chain
Sourcepub fn remote_account_addr(
&self,
host_chain: &TruncatedChainId,
) -> Result<Option<String>, AbstractSdkError>
pub fn remote_account_addr( &self, host_chain: &TruncatedChainId, ) -> Result<Option<String>, AbstractSdkError>
Address of the remote account Note: only Accounts that are remote to this chain are queryable
Source§impl<T> IbcClient<'_, T>where
T: IbcInterface + AccountExecutor,
impl<T> IbcClient<'_, T>where
T: IbcInterface + AccountExecutor,
Sourcepub fn execute(
&self,
msg: &ExecuteMsg,
funds: Vec<Coin>,
) -> Result<CosmosMsg, AbstractSdkError>
pub fn execute( &self, msg: &ExecuteMsg, funds: Vec<Coin>, ) -> Result<CosmosMsg, AbstractSdkError>
Execute on ibc client
Sourcepub fn create_remote_account(
&self,
host_chain: TruncatedChainId,
) -> Result<CosmosMsg, AbstractSdkError>
pub fn create_remote_account( &self, host_chain: TruncatedChainId, ) -> Result<CosmosMsg, AbstractSdkError>
A simple helper to create and register a remote account
Sourcepub fn host_action(
&self,
host_chain: TruncatedChainId,
action: HostAction,
) -> Result<CosmosMsg, AbstractSdkError>
pub fn host_action( &self, host_chain: TruncatedChainId, action: HostAction, ) -> Result<CosmosMsg, AbstractSdkError>
Call a HostAction
on the host of the provided host_chain
.
Sourcepub fn ics20_transfer(
&self,
host_chain: TruncatedChainId,
funds: Vec<Coin>,
memo: Option<String>,
receiver: Option<String>,
) -> Result<CosmosMsg, AbstractSdkError>
pub fn ics20_transfer( &self, host_chain: TruncatedChainId, funds: Vec<Coin>, memo: Option<String>, receiver: Option<String>, ) -> Result<CosmosMsg, AbstractSdkError>
IbcClient the provided coins from the Account to its account on the receiving_chain
.
Sourcepub fn install_remote_app<M>(
&self,
host_chain: TruncatedChainId,
module: ModuleInfo,
init_msg: &M,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
pub fn install_remote_app<M>(
&self,
host_chain: TruncatedChainId,
module: ModuleInfo,
init_msg: &M,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
A simple helper to install an app on an account
Sourcepub fn install_remote_api<M>(
&self,
host_chain: TruncatedChainId,
module: ModuleInfo,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
pub fn install_remote_api<M>(
&self,
host_chain: TruncatedChainId,
module: ModuleInfo,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
A simple helper install a remote api Module providing only the chain name
Sourcepub fn execute_on_module<M>(
&self,
host_chain: TruncatedChainId,
module_id: String,
exec_msg: &M,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
pub fn execute_on_module<M>(
&self,
host_chain: TruncatedChainId,
module_id: String,
exec_msg: &M,
) -> Result<CosmosMsg, AbstractSdkError>where
M: Serialize,
A simple helper to execute on a module Executes the message as the Account of the remote account I.e. can be used to execute admin actions on remote modules.
Sourcepub fn remote_account(
&self,
host_chain: &TruncatedChainId,
) -> Result<Option<String>, AbstractSdkError>
pub fn remote_account( &self, host_chain: &TruncatedChainId, ) -> Result<Option<String>, AbstractSdkError>
Address of the remote account Note: only works if account is local
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for IbcClient<'a, T>
impl<'a, T> !RefUnwindSafe for IbcClient<'a, T>
impl<'a, T> !Send for IbcClient<'a, T>
impl<'a, T> !Sync for IbcClient<'a, T>
impl<'a, T> Unpin for IbcClient<'a, T>
impl<'a, T> !UnwindSafe for IbcClient<'a, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more