pub struct MockAppRemoteI<Chain>(/* private fields */);

Implementations§

Source§

impl<Chain> MockAppRemoteI<Chain>

Source

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

Trait Implementations§

Source§

impl<Chain: CwEnv> AppDeployer<Chain> for MockAppRemoteI<Chain>

Source§

fn deploy( &self, version: Version, strategy: DeployStrategy, ) -> Result<(), AbstractInterfaceError>

Deploys the app. If the app is already deployed, it will return an error. Use maybe_deploy if you want to deploy the app only if it is not already deployed.
Source§

impl<Chain: Clone> Clone for MockAppRemoteI<Chain>

Source§

fn clone(&self) -> MockAppRemoteI<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: ChainState> ContractInstance<Chain> for MockAppRemoteI<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.
Source§

fn id(&self) -> String

Returns the contract id.
Source§

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

Returns the contract address for this instance.
Source§

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

Returns the contract address as a String.
Source§

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

Returns contract code_id.
Source§

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 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)

Sets the code_id for the contract. Useful when the contract is already initialized and not registered in the configured state file.
Source§

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§

fn get_chain(&self) -> &Chain

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

impl<Chain> ExecutableContract for MockAppRemoteI<Chain>

Source§

impl<T: CwEnv> From<Contract<T>> for MockAppRemoteI<T>

Source§

fn from(contract: Contract<T>) -> Self

Converts to this type from the input type.
Source§

impl<Chain> InstantiableContract for MockAppRemoteI<Chain>

Source§

impl<Chain> MigratableContract for MockAppRemoteI<Chain>

Source§

impl<Chain> QueryableContract for MockAppRemoteI<Chain>

Source§

impl<Chain: CwEnv> RegisteredModule for MockAppRemoteI<Chain>

Source§

type InitMsg = <AppContract<MockError, MockInitMsg, MockExecMsg, MockQueryMsg, MockMigrateMsg, MockReceiveMsg, MockSudoMsg> as Handler>::CustomInitMsg

The init message for the module.
Source§

fn module_id<'a>() -> &'a str

The id of the module.
Source§

fn module_version<'a>() -> &'a str

The version of the module.
Source§

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 MockAppRemoteI<Chain>

Source§

fn wasm(_chain: &ChainInfoOwned) -> WasmPath

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

fn wrapper() -> Box<dyn MockContract<Empty, Empty>>

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

Auto Trait Implementations§

§

impl<Chain> Freeze for MockAppRemoteI<Chain>
where Chain: Freeze,

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<U> As for U

Source§

fn as_<T>(self) -> T
where 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
Source§

impl<M> AsAny for M
where M: Any,

Source§

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

Source§

impl<SupportedContract, Chain, ModuleMsg> BaseQueryMsgFns<Chain, ModuleMsg> for SupportedContract
where Chain: QueryHandler + ChainState, SupportedContract: CwOrchQuery<Chain, QueryMsg = QueryMsg<BaseQueryMsg, ModuleMsg>>,

Source§

fn base_config(&self) -> Result<AppConfigResponse, CwEnvError>

Automatically generated wrapper around BaseQueryMsg::BaseConfig variant
Source§

fn base_admin(&self) -> Result<AdminResponse, CwEnvError>

Automatically generated wrapper around BaseQueryMsg::BaseAdmin variant
Source§

fn module_data(&self) -> Result<ModuleDataResponse, CwEnvError>

Automatically generated wrapper around BaseQueryMsg::ModuleData variant
Source§

fn top_level_owner(&self) -> Result<TopLevelOwnerResponse, CwEnvError>

Automatically generated wrapper around BaseQueryMsg::TopLevelOwner variant
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T, Chain> CallAs<Chain> for T
where T: CwOrchExecute<Chain> + ContractInstance<Chain> + Clone, Chain: TxHandler,

Source§

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

Source§

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

impl<T> CloneAny for T
where T: Any + Clone + Send + Sync,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, Chain> ConditionalMigrate<Chain> for T
where Chain: CwEnv, T: CwOrchMigrate<Chain> + ConditionalUpload<Chain>,

Source§

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>

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 T
where Chain: CwEnv, T: CwOrchUpload<Chain>,

Source§

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>

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>

Returns whether the contract is running the latest uploaded code for it
Source§

impl<T, Chain> CwOrchExecute<Chain> for T
where T: ExecutableContract + ContractInstance<Chain>, Chain: TxHandler,

Source§

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

Source§

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>

Instantiates the contract using instantiate2
Source§

impl<T, Chain> CwOrchMigrate<Chain> for T
where T: MigratableContract + ContractInstance<Chain>, Chain: TxHandler,

Source§

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

Source§

fn query<G>(&self, query_msg: &Self::QueryMsg) -> Result<G, CwEnvError>

Query the contract.
Source§

impl<T, Chain> CwOrchUpload<Chain> for T
where T: ContractInstance<Chain> + Uploadable, Chain: TxHandler,

Source§

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

upload the contract to the configured environment.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

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

impl<T> IbcPacketLogger for T

Source§

fn log_ibc_packets(&self) -> Result<(), Box<dyn Error>>

This function should start logging incoming ibc packets related to the object
Source§

impl<T> InstallConfig for T

Source§

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>

Constructs the ModuleInstallConfig for an App Interface
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 T
where 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
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<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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

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

Source§

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

impl<T> UnsafeAny for T
where T: Any,