Struct abstract_interface::IbcClient
source · pub struct IbcClient<Chain>(/* private fields */);
Implementations§
Trait Implementations§
source§impl<Chain: ChainState> ContractInstance<Chain> for IbcClient<Chain>
impl<Chain: ChainState> ContractInstance<Chain> for IbcClient<Chain>
source§fn as_instance(&self) -> &Contract<Chain>
fn as_instance(&self) -> &Contract<Chain>
Return a reference to the underlying contract instance.
source§fn as_instance_mut(&mut self) -> &mut Contract<Chain>
fn as_instance_mut(&mut self) -> &mut Contract<Chain>
Return a mutable reference to the underlying contract instance.
source§fn set_address(&self, address: &Addr)
fn set_address(&self, address: &Addr)
Sets the address for the contract. Useful when the contract is already initialized
and not registered in the configured state file.
source§fn remove_address(&self)
fn remove_address(&self)
Removes the address for the contract
source§fn set_default_address(&mut self, address: &Addr)
fn set_default_address(&mut self, address: &Addr)
Sets a default address for the contract. If the contract already has an address registered in the state, this won’t be used.
This is mostly used to ship address with a cw-orch package.
source§fn set_code_id(&self, code_id: u64)
fn set_code_id(&self, code_id: u64)
Sets the code_id for the contract. Useful when the contract is already initialized
and not registered in the configured state file.
source§fn remove_code_id(&self)
fn remove_code_id(&self)
Removes the code_id for the contract
source§fn set_default_code_id(&mut self, code_id: u64)
fn set_default_code_id(&mut self, code_id: u64)
Sets a default address for the contract. If the contract already has an address registered in the state, this won’t be used.
This is mostly used to ship address with a cw-orch package.
source§impl<Chain> ExecutableContract for IbcClient<Chain>
impl<Chain> ExecutableContract for IbcClient<Chain>
§type ExecuteMsg = ExecuteMsg
type ExecuteMsg = ExecuteMsg
Execute message for the contract.
source§impl<Chain> InstantiableContract for IbcClient<Chain>
impl<Chain> InstantiableContract for IbcClient<Chain>
§type InstantiateMsg = InstantiateMsg
type InstantiateMsg = InstantiateMsg
Instantiate message for the contract.
source§impl<Chain> MigratableContract for IbcClient<Chain>
impl<Chain> MigratableContract for IbcClient<Chain>
§type MigrateMsg = MigrateMsg
type MigrateMsg = MigrateMsg
Migrate message for the contract.
source§impl<Chain> QueryableContract for IbcClient<Chain>
impl<Chain> QueryableContract for IbcClient<Chain>
source§impl<Chain: CwEnv> RegisteredModule for IbcClient<Chain>
impl<Chain: CwEnv> RegisteredModule for IbcClient<Chain>
source§fn module_version<'a>() -> &'a str
fn module_version<'a>() -> &'a str
The version of the module.
source§fn installed_module_contract_id(account_id: &AccountId) -> String
fn installed_module_contract_id(account_id: &AccountId) -> String
Create the unique contract ID for a module installed on an Account.
source§impl<Chain: CwEnv> Uploadable for IbcClient<Chain>
impl<Chain: CwEnv> Uploadable for IbcClient<Chain>
Auto Trait Implementations§
impl<Chain> Freeze for IbcClient<Chain>where
Chain: Freeze,
impl<Chain> RefUnwindSafe for IbcClient<Chain>where
Chain: RefUnwindSafe,
impl<Chain> Send for IbcClient<Chain>where
Chain: Send,
impl<Chain> Sync for IbcClient<Chain>where
Chain: Sync,
impl<Chain> Unpin for IbcClient<Chain>where
Chain: Unpin,
impl<Chain> UnwindSafe for IbcClient<Chain>where
Chain: UnwindSafe,
Blanket Implementations§
source§impl<Chain, CwOrchQueryMsgType, SupportedContract> AsyncQueryMsgFns<Chain, CwOrchQueryMsgType> for SupportedContractwhere
Chain: AsyncWasmQuerier + ChainState,
CwOrchQueryMsgType: Sync,
QueryMsg: Into<CwOrchQueryMsgType>,
SupportedContract: AsyncCwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>,
impl<Chain, CwOrchQueryMsgType, SupportedContract> AsyncQueryMsgFns<Chain, CwOrchQueryMsgType> for SupportedContractwhere
Chain: AsyncWasmQuerier + ChainState,
CwOrchQueryMsgType: Sync,
QueryMsg: Into<CwOrchQueryMsgType>,
SupportedContract: AsyncCwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>,
source§async fn ownership_async(&self) -> Result<Ownership<Addr>, CwEnvError>
async fn ownership_async(&self) -> Result<Ownership<Addr>, CwEnvError>
Automatically generated wrapper around QueryMsg::Ownership variant
source§async fn config_async(&self) -> Result<ConfigResponse, CwEnvError>
async fn config_async(&self) -> Result<ConfigResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Config variant
source§async fn host_async(
&self,
chain_name: TruncatedChainId,
) -> Result<HostResponse, CwEnvError>
async fn host_async( &self, chain_name: TruncatedChainId, ) -> Result<HostResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Host variant
source§async fn list_accounts_async(
&self,
limit: Option<u32>,
start: Option<(AccountId, String)>,
) -> Result<ListAccountsResponse, CwEnvError>
async fn list_accounts_async( &self, limit: Option<u32>, start: Option<(AccountId, String)>, ) -> Result<ListAccountsResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListAccounts variant
source§async fn remote_account_async(
&self,
account_id: AccountId,
chain_name: TruncatedChainId,
) -> Result<AccountResponse, CwEnvError>
async fn remote_account_async( &self, account_id: AccountId, chain_name: TruncatedChainId, ) -> Result<AccountResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Account variant
source§async fn list_remote_hosts_async(
&self,
) -> Result<ListRemoteHostsResponse, CwEnvError>
async fn list_remote_hosts_async( &self, ) -> Result<ListRemoteHostsResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListRemoteHosts variant
source§async fn list_remote_proxies_async(
&self,
) -> Result<ListRemoteProxiesResponse, CwEnvError>
async fn list_remote_proxies_async( &self, ) -> Result<ListRemoteProxiesResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListRemoteProxies variant
source§async fn list_remote_proxies_by_account_id_async(
&self,
account_id: AccountId,
) -> Result<ListRemoteProxiesResponse, CwEnvError>
async fn list_remote_proxies_by_account_id_async( &self, account_id: AccountId, ) -> Result<ListRemoteProxiesResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListRemoteProxiesByAccountId variant
source§async fn list_ibc_infrastructures_async(
&self,
) -> Result<ListIbcInfrastructureResponse, CwEnvError>
async fn list_ibc_infrastructures_async( &self, ) -> Result<ListIbcInfrastructureResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListIbcInfrastructures variant
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, Chain> ConditionalMigrate<Chain> for T
impl<T, Chain> ConditionalMigrate<Chain> for T
source§fn migrate_if_needed(
&self,
migrate_msg: &Self::MigrateMsg,
) -> Result<Option<<Chain as TxHandler>::Response>, CwEnvError>
fn migrate_if_needed( &self, migrate_msg: &Self::MigrateMsg, ) -> Result<Option<<Chain as TxHandler>::Response>, CwEnvError>
Only migrate the contract if it is not on the latest code-id yet
source§fn upload_and_migrate_if_needed(
&self,
migrate_msg: &Self::MigrateMsg,
) -> Result<Option<Vec<<Chain as TxHandler>::Response>>, CwEnvError>
fn upload_and_migrate_if_needed( &self, migrate_msg: &Self::MigrateMsg, ) -> Result<Option<Vec<<Chain as TxHandler>::Response>>, CwEnvError>
Uploads the contract if the local contract hash is different from the latest on-chain code hash.
Proceeds to migrates the contract if the contract is not running the latest code.
source§impl<T, Chain> ConditionalUpload<Chain> for Twhere
Chain: CwEnv,
T: CwOrchUpload<Chain>,
impl<T, Chain> ConditionalUpload<Chain> for Twhere
Chain: CwEnv,
T: CwOrchUpload<Chain>,
source§fn upload_if_needed(
&self,
) -> Result<Option<<Chain as TxHandler>::Response>, CwEnvError>
fn upload_if_needed( &self, ) -> Result<Option<<Chain as TxHandler>::Response>, CwEnvError>
Only upload the contract if it is not uploaded yet (checksum does not match)
source§fn latest_is_uploaded(&self) -> Result<bool, CwEnvError>
fn latest_is_uploaded(&self) -> Result<bool, CwEnvError>
Returns whether the checksum of the WASM file matches the checksum of the latest uploaded code for this contract.
source§fn is_running_latest(&self) -> Result<bool, CwEnvError>
fn is_running_latest(&self) -> Result<bool, CwEnvError>
Returns whether the contract is running the latest uploaded code for it
source§impl<T, Chain> CwOrchExecute<Chain> for T
impl<T, Chain> CwOrchExecute<Chain> for T
source§fn execute(
&self,
execute_msg: &Self::ExecuteMsg,
coins: Option<&[Coin]>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn execute( &self, execute_msg: &Self::ExecuteMsg, coins: Option<&[Coin]>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Send a ExecuteMsg to the contract.
source§impl<T, Chain> CwOrchInstantiate<Chain> for T
impl<T, Chain> CwOrchInstantiate<Chain> for T
source§fn instantiate(
&self,
instantiate_msg: &Self::InstantiateMsg,
admin: Option<&Addr>,
coins: Option<&[Coin]>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn instantiate( &self, instantiate_msg: &Self::InstantiateMsg, admin: Option<&Addr>, coins: Option<&[Coin]>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Instantiates the contract.
source§fn instantiate2(
&self,
instantiate_msg: &Self::InstantiateMsg,
admin: Option<&Addr>,
coins: Option<&[Coin]>,
salt: Binary,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn instantiate2( &self, instantiate_msg: &Self::InstantiateMsg, admin: Option<&Addr>, coins: Option<&[Coin]>, salt: Binary, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Instantiates the contract using instantiate2
source§impl<T, Chain> CwOrchMigrate<Chain> for T
impl<T, Chain> CwOrchMigrate<Chain> for T
source§fn migrate(
&self,
migrate_msg: &Self::MigrateMsg,
new_code_id: u64,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn migrate( &self, migrate_msg: &Self::MigrateMsg, new_code_id: u64, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Migrate the contract.
source§impl<T, Chain> CwOrchQuery<Chain> for T
impl<T, Chain> CwOrchQuery<Chain> for T
source§fn raw_query(&self, query_keys: Vec<u8>) -> Result<Vec<u8>, CwEnvError>
fn raw_query(&self, query_keys: Vec<u8>) -> Result<Vec<u8>, CwEnvError>
Query the contract raw state from an raw binary key
source§fn item_query<T>(&self, query_item: Item<'_, T>) -> Result<T, CwEnvError>where
T: Serialize + DeserializeOwned,
fn item_query<T>(&self, query_item: Item<'_, T>) -> Result<T, CwEnvError>where
T: Serialize + DeserializeOwned,
Query the contract raw state from an cw-storage-plus::Item
source§impl<T, Chain> CwOrchUpload<Chain> for T
impl<T, Chain> CwOrchUpload<Chain> for T
source§impl<Chain, T> Environment<Chain> for T
impl<Chain, T> Environment<Chain> for T
source§fn environment(&self) -> &Chain
fn environment(&self) -> &Chain
Returns the chain that this structure executes on
source§impl<Chain, CwOrchExecuteMsgType, SupportedContract> ExecuteMsgFns<Chain, CwOrchExecuteMsgType> for SupportedContractwhere
Chain: TxHandler,
ExecuteMsg: Into<CwOrchExecuteMsgType>,
SupportedContract: CwOrchExecute<Chain, ExecuteMsg = CwOrchExecuteMsgType>,
impl<Chain, CwOrchExecuteMsgType, SupportedContract> ExecuteMsgFns<Chain, CwOrchExecuteMsgType> for SupportedContractwhere
Chain: TxHandler,
ExecuteMsg: Into<CwOrchExecuteMsgType>,
SupportedContract: CwOrchExecute<Chain, ExecuteMsg = CwOrchExecuteMsgType>,
source§fn update_ownership(
&self,
arg0: Action,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_ownership( &self, arg0: Action, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::UpdateOwnership variant
source§fn register_infrastructure(
&self,
chain: TruncatedChainId,
host: impl Into<String>,
note: impl Into<String>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn register_infrastructure( &self, chain: TruncatedChainId, host: impl Into<String>, note: impl Into<String>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::RegisterInfrastructure variant
source§fn update_config(
&self,
ans_host: Option<String>,
version_control: Option<String>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_config( &self, ans_host: Option<String>, version_control: Option<String>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::UpdateConfig variant
source§fn send_funds(
&self,
funds: Vec<Coin>,
host_chain: TruncatedChainId,
memo: Option<String>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn send_funds( &self, funds: Vec<Coin>, host_chain: TruncatedChainId, memo: Option<String>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::SendFunds variant
source§fn register(
&self,
host_chain: TruncatedChainId,
install_modules: Vec<ModuleInstallConfig>,
base_asset: Option<AssetEntry>,
namespace: Option<String>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn register( &self, host_chain: TruncatedChainId, install_modules: Vec<ModuleInstallConfig>, base_asset: Option<AssetEntry>, namespace: Option<String>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::Register variant
source§fn module_ibc_action(
&self,
host_chain: TruncatedChainId,
msg: Binary,
target_module: ModuleInfo,
callback: Option<Callback>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn module_ibc_action( &self, host_chain: TruncatedChainId, msg: Binary, target_module: ModuleInfo, callback: Option<Callback>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::ModuleIbcAction variant
source§fn ibc_query(
&self,
callback: Callback,
host_chain: TruncatedChainId,
queries: Vec<QueryRequest<ModuleQuery>>,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn ibc_query( &self, callback: Callback, host_chain: TruncatedChainId, queries: Vec<QueryRequest<ModuleQuery>>, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::IbcQuery variant
source§fn remote_action(
&self,
action: HostAction,
host_chain: TruncatedChainId,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn remote_action( &self, action: HostAction, host_chain: TruncatedChainId, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::RemoteAction variant
source§fn remove_host(
&self,
host_chain: TruncatedChainId,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn remove_host( &self, host_chain: TruncatedChainId, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::RemoveHost variant
source§fn callback(
&self,
arg0: CallbackMessage,
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn callback( &self, arg0: CallbackMessage, ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::Callback variant
source§impl<T> InstallConfig for Twhere
T: RegisteredModule,
impl<T> InstallConfig for Twhere
T: RegisteredModule,
source§fn module_info() -> Result<ModuleInfo, AbstractInterfaceError>
fn module_info() -> Result<ModuleInfo, AbstractInterfaceError>
Constructs the
ModuleInfo
by using information from RegisteredModule
.source§fn install_config(
init_msg: &Self::InitMsg,
) -> Result<ModuleInstallConfig, AbstractInterfaceError>
fn install_config( init_msg: &Self::InitMsg, ) -> Result<ModuleInstallConfig, AbstractInterfaceError>
Constructs the
ModuleInstallConfig
for an App Interfacesource§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>
Converts
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>
Converts
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 moresource§impl<Chain, CwOrchQueryMsgType, SupportedContract> QueryMsgFns<Chain, CwOrchQueryMsgType> for SupportedContractwhere
Chain: QueryHandler + ChainState,
QueryMsg: Into<CwOrchQueryMsgType>,
SupportedContract: CwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>,
impl<Chain, CwOrchQueryMsgType, SupportedContract> QueryMsgFns<Chain, CwOrchQueryMsgType> for SupportedContractwhere
Chain: QueryHandler + ChainState,
QueryMsg: Into<CwOrchQueryMsgType>,
SupportedContract: CwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>,
source§fn ownership(&self) -> Result<Ownership<Addr>, CwEnvError>
fn ownership(&self) -> Result<Ownership<Addr>, CwEnvError>
Automatically generated wrapper around QueryMsg::Ownership variant
source§fn config(&self) -> Result<ConfigResponse, CwEnvError>
fn config(&self) -> Result<ConfigResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Config variant
source§fn host(&self, chain_name: TruncatedChainId) -> Result<HostResponse, CwEnvError>
fn host(&self, chain_name: TruncatedChainId) -> Result<HostResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Host variant
source§fn list_accounts(
&self,
limit: Option<u32>,
start: Option<(AccountId, String)>,
) -> Result<ListAccountsResponse, CwEnvError>
fn list_accounts( &self, limit: Option<u32>, start: Option<(AccountId, String)>, ) -> Result<ListAccountsResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListAccounts variant
source§fn remote_account(
&self,
account_id: AccountId,
chain_name: TruncatedChainId,
) -> Result<AccountResponse, CwEnvError>
fn remote_account( &self, account_id: AccountId, chain_name: TruncatedChainId, ) -> Result<AccountResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Account variant
source§fn list_remote_hosts(&self) -> Result<ListRemoteHostsResponse, CwEnvError>
fn list_remote_hosts(&self) -> Result<ListRemoteHostsResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListRemoteHosts variant
source§fn list_remote_proxies(&self) -> Result<ListRemoteProxiesResponse, CwEnvError>
fn list_remote_proxies(&self) -> Result<ListRemoteProxiesResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListRemoteProxies variant
source§fn list_remote_proxies_by_account_id(
&self,
account_id: AccountId,
) -> Result<ListRemoteProxiesResponse, CwEnvError>
fn list_remote_proxies_by_account_id( &self, account_id: AccountId, ) -> Result<ListRemoteProxiesResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListRemoteProxiesByAccountId variant
source§fn list_ibc_infrastructures(
&self,
) -> Result<ListIbcInfrastructureResponse, CwEnvError>
fn list_ibc_infrastructures( &self, ) -> Result<ListIbcInfrastructureResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ListIbcInfrastructures variant