pub struct AnsHost<Chain: CwEnv>(/* private fields */);

Implementations§

source§

impl<Chain: CwEnv> AnsHost<Chain>

source

pub fn new(contract_id: impl ToString, chain: Chain) -> Self

source§

impl<Chain: CwEnv> AnsHost<Chain>where TxResponse<Chain>: IndexResponse,

source

pub fn load(chain: Chain, address: &Addr) -> Self

Trait Implementations§

source§

impl<Chain: Clone + CwEnv> Clone for AnsHost<Chain>

source§

fn clone(&self) -> AnsHost<Chain>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Chain: CwEnv> ContractInstance<Chain> for AnsHost<Chain>

source§

fn as_instance(&self) -> &Contract<Chain>

Return a reference to the underlying contract instance.
source§

fn as_instance_mut(&mut self) -> &mut Contract<Chain>

Return a mutable reference to the underlying contract instance.
§

fn id(&self) -> String

Returns the contract id.
§

fn address(&self) -> Result<Addr, CwEnvError>

Returns the contract address for this instance.
§

fn addr_str(&self) -> Result<String, CwEnvError>

Returns the contract address as a String.
§

fn code_id(&self) -> Result<u64, CwEnvError>

Returns contract code_id.
§

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.
§

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.
§

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.
§

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.
§

fn get_chain(&self) -> &Chain

Returns the chain that this contract is deployed on.
source§

impl<Chain: CwEnv> ExecutableContract for AnsHost<Chain>

§

type ExecuteMsg = ExecuteMsg

Execute message for the contract.
source§

impl<Chain: CwEnv> InstantiableContract for AnsHost<Chain>

§

type InstantiateMsg = InstantiateMsg

Instantiate message for the contract.
source§

impl<Chain: CwEnv> MigratableContract for AnsHost<Chain>

§

type MigrateMsg = MigrateMsg

Migrate message for the contract.
source§

impl<Chain: CwEnv> QueryableContract for AnsHost<Chain>

§

type QueryMsg = QueryMsg

Query message for the contract.
source§

impl<Chain: CwEnv> Uploadable for AnsHost<Chain>

source§

fn wrapper(&self) -> <Mock as TxHandler>::ContractSource

Return the wrapper object for the contract, only works for non-custom mock environments
source§

fn wasm(&self) -> WasmPath

Return an object that can be used to upload the contract to a WASM-supported environment.

Auto Trait Implementations§

§

impl<Chain> RefUnwindSafe for AnsHost<Chain>where Chain: RefUnwindSafe,

§

impl<Chain> Send for AnsHost<Chain>where Chain: Send,

§

impl<Chain> Sync for AnsHost<Chain>where Chain: Sync,

§

impl<Chain> Unpin for AnsHost<Chain>where Chain: Unpin,

§

impl<Chain> UnwindSafe for AnsHost<Chain>where Chain: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> Twhere T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
§

impl<M> AsAny for Mwhere M: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, Chain> CallAs<Chain> for Twhere T: CwOrchExecute<Chain> + ContractInstance<Chain> + Clone, Chain: CwEnv,

§

fn set_sender(&mut self, sender: &<Chain as TxHandler>::Sender)

§

fn call_as(&self, sender: &<Chain as TxHandler>::Sender) -> Self

Call a contract as a different sender. Clones the contract interface with a different sender.
§

impl<T, Chain> CwOrchExecute<Chain> for Twhere T: ExecutableContract + ContractInstance<Chain>, Chain: CwEnv,

§

fn execute( &self, execute_msg: &Self::ExecuteMsg, coins: Option<&[Coin]> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Send a ExecuteMsg to the contract.
§

impl<T, Chain> CwOrchInstantiate<Chain> for Twhere T: InstantiableContract + ContractInstance<Chain>, Chain: CwEnv,

§

fn instantiate( &self, instantiate_msg: &Self::InstantiateMsg, admin: Option<&Addr>, coins: Option<&[Coin]> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Instantiates the contract.
§

impl<T, Chain> CwOrchMigrate<Chain> for Twhere T: MigratableContract + ContractInstance<Chain>, Chain: CwEnv,

§

fn migrate( &self, migrate_msg: &Self::MigrateMsg, new_code_id: u64 ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Migrate the contract.
§

impl<T, Chain> CwOrchQuery<Chain> for Twhere T: QueryableContract + ContractInstance<Chain>, Chain: CwEnv,

§

fn query<G>(&self, query_msg: &Self::QueryMsg) -> Result<G, CwEnvError>where G: Serialize + DeserializeOwned + Debug,

Query the contract.
§

impl<T, Chain> CwOrchUpload<Chain> for Twhere T: ContractInstance<Chain> + Uploadable, Chain: CwEnv,

§

fn upload(&self) -> Result<<Chain as TxHandler>::Response, CwEnvError>

upload the contract to the configured environment.
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<SupportedContract, Chain> ExecuteMsgFns<Chain> for SupportedContractwhere Chain: CwEnv, SupportedContract: CwOrchExecute<Chain, ExecuteMsg = ExecuteMsg>,

source§

fn update_contract_addresses( &self, to_add: Vec<(UncheckedContractEntry, String), Global>, to_remove: Vec<UncheckedContractEntry, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Automatically generated wrapper around ExecuteMsg::UpdateContractAddresses variant
source§

fn update_asset_addresses( &self, to_add: Vec<(String, AssetInfoBase<String>), Global>, to_remove: Vec<String, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Automatically generated wrapper around ExecuteMsg::UpdateAssetAddresses variant
source§

fn update_channels( &self, to_add: Vec<(UncheckedChannelEntry, String), Global>, to_remove: Vec<UncheckedChannelEntry, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Automatically generated wrapper around ExecuteMsg::UpdateChannels variant
source§

fn update_dexes( &self, to_add: Vec<String, Global>, to_remove: Vec<String, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Automatically generated wrapper around ExecuteMsg::UpdateDexes variant
source§

fn update_pools( &self, to_add: Vec<(PoolAddressBase<String>, PoolMetadata), Global>, to_remove: Vec<UniquePoolId, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Automatically generated wrapper around ExecuteMsg::UpdatePools variant
source§

fn update_ownership( &self, arg0: Action ) -> Result<<Chain as TxHandler>::Response, CwEnvError>

Automatically generated wrapper around ExecuteMsg::UpdateOwnership variant
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for Twhere T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<SupportedContract, Chain> QueryMsgFns<Chain> for SupportedContractwhere Chain: CwEnv, SupportedContract: CwOrchQuery<Chain, QueryMsg = QueryMsg>,

source§

fn config(&self) -> Result<ConfigResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::Config variant
source§

fn assets( &self, names: Vec<String, Global> ) -> Result<AssetsResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::Assets variant
source§

fn asset_list( &self, filter: Option<AssetFilter>, limit: Option<u8>, start_after: Option<String> ) -> Result<AssetListResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::AssetList variant
source§

fn asset_infos( &self, infos: Vec<AssetInfoBase<String>, Global> ) -> Result<AssetsResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::AssetInfos variant
source§

fn asset_info_list( &self, filter: Option<AssetInfoFilter>, limit: Option<u8>, start_after: Option<AssetInfoBase<String>> ) -> Result<AssetInfoListResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::AssetInfoList variant
source§

fn contracts( &self, entries: Vec<ContractEntry, Global> ) -> Result<ContractsResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::Contracts variant
source§

fn contract_list( &self, filter: Option<ContractFilter>, limit: Option<u8>, start_after: Option<ContractEntry> ) -> Result<ContractListResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::ContractList variant
source§

fn channels( &self, entries: Vec<ChannelEntry, Global> ) -> Result<ChannelsResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::Channels variant
source§

fn channel_list( &self, filter: Option<ChannelFilter>, limit: Option<u8>, start_after: Option<ChannelEntry> ) -> Result<ChannelListResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::ChannelList variant
source§

fn registered_dexes(&self) -> Result<RegisteredDexesResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::RegisteredDexes variant
source§

fn pools( &self, pairings: Vec<DexAssetPairing, Global> ) -> Result<PoolsResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::Pools variant
source§

fn pool_list( &self, filter: Option<AssetPairingFilter>, limit: Option<u8>, start_after: Option<DexAssetPairing> ) -> Result<PoolAddressListResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::PoolList variant
source§

fn pool_metadatas( &self, ids: Vec<UniquePoolId, Global> ) -> Result<PoolMetadatasResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::PoolMetadatas variant
source§

fn pool_metadata_list( &self, filter: Option<PoolMetadataFilter>, limit: Option<u8>, start_after: Option<UniquePoolId> ) -> Result<PoolMetadataListResponse, CwEnvError>

Automatically generated wrapper around QueryMsg::PoolMetadataList variant
source§

fn ownership(&self) -> Result<Ownership<String>, CwEnvError>

Automatically generated wrapper around QueryMsg::Ownership variant
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more