Struct abstract_interface::ModuleFactory
source · pub struct ModuleFactory<Chain>(/* private fields */);
Implementations§
source§impl<Chain> ModuleFactory<Chain>
impl<Chain> ModuleFactory<Chain>
source§impl<Chain: CwEnv> ModuleFactory<Chain>
impl<Chain: CwEnv> ModuleFactory<Chain>
pub fn change_ans_host_addr( &self, mem_addr: String ) -> Result<TxResponse<Chain>, AbstractInterfaceError>
Trait Implementations§
source§impl<Chain: Clone> Clone for ModuleFactory<Chain>
impl<Chain: Clone> Clone for ModuleFactory<Chain>
source§fn clone(&self) -> ModuleFactory<Chain>
fn clone(&self) -> ModuleFactory<Chain>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Chain: ChainState> ContractInstance<Chain> for ModuleFactory<Chain>
impl<Chain: ChainState> ContractInstance<Chain> for ModuleFactory<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 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 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 ModuleFactory<Chain>
impl<Chain> ExecutableContract for ModuleFactory<Chain>
§type ExecuteMsg = ExecuteMsg
type ExecuteMsg = ExecuteMsg
Execute message for the contract.
source§impl<Chain> InstantiableContract for ModuleFactory<Chain>
impl<Chain> InstantiableContract for ModuleFactory<Chain>
§type InstantiateMsg = InstantiateMsg
type InstantiateMsg = InstantiateMsg
Instantiate message for the contract.
source§impl<Chain> MigratableContract for ModuleFactory<Chain>
impl<Chain> MigratableContract for ModuleFactory<Chain>
§type MigrateMsg = MigrateMsg
type MigrateMsg = MigrateMsg
Migrate message for the contract.
source§impl<Chain> QueryableContract for ModuleFactory<Chain>
impl<Chain> QueryableContract for ModuleFactory<Chain>
source§impl<Chain: CwEnv> Uploadable for ModuleFactory<Chain>
impl<Chain: CwEnv> Uploadable for ModuleFactory<Chain>
Auto Trait Implementations§
impl<Chain> Freeze for ModuleFactory<Chain>where
Chain: Freeze,
impl<Chain> RefUnwindSafe for ModuleFactory<Chain>where
Chain: RefUnwindSafe,
impl<Chain> Send for ModuleFactory<Chain>where
Chain: Send,
impl<Chain> Sync for ModuleFactory<Chain>where
Chain: Sync,
impl<Chain> Unpin for ModuleFactory<Chain>where
Chain: Unpin,
impl<Chain> UnwindSafe for ModuleFactory<Chain>where
Chain: UnwindSafe,
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
Mutably borrows from an owned value. Read more
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§impl<T, Chain> CwOrchUpload<Chain> for T
impl<T, Chain> CwOrchUpload<Chain> for T
source§impl<SupportedContract, Chain> ExecuteMsgFns<Chain> for SupportedContract
impl<SupportedContract, Chain> ExecuteMsgFns<Chain> for SupportedContract
source§fn update_config(
&self,
ans_host_address: Option<String>,
version_control_address: Option<String>
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_config( &self, ans_host_address: Option<String>, version_control_address: Option<String> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::UpdateConfig variant
source§fn install_modules(
&self,
modules: Vec<FactoryModuleInstallConfig>,
salt: Binary
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn install_modules( &self, modules: Vec<FactoryModuleInstallConfig>, salt: Binary ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::InstallModules variant
source§fn update_factory_binary_msgs(
&self,
to_add: Vec<(ModuleInfo, Binary)>,
to_remove: Vec<ModuleInfo>
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_factory_binary_msgs( &self, to_add: Vec<(ModuleInfo, Binary)>, to_remove: Vec<ModuleInfo> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::UpdateFactoryBinaryMsgs variant
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§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<SupportedContract, Chain> QueryMsgFns<Chain> for SupportedContract
impl<SupportedContract, Chain> QueryMsgFns<Chain> for SupportedContract
source§fn config(&self) -> Result<ConfigResponse, CwEnvError>
fn config(&self) -> Result<ConfigResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Config variant
source§fn simulate_install_modules(
&self,
modules: Vec<ModuleInfo>
) -> Result<SimulateInstallModulesResponse, CwEnvError>
fn simulate_install_modules( &self, modules: Vec<ModuleInfo> ) -> Result<SimulateInstallModulesResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::SimulateInstallModules variant