Struct abstract_interface::Manager
source · pub struct Manager<Chain: CwEnv>(/* private fields */);
Implementations§
source§impl<Chain: CwEnv> Manager<Chain>
impl<Chain: CwEnv> Manager<Chain>
pub fn upgrade_module<M: Serialize>( &self, module_id: &str, migrate_msg: &M ) -> Result<(), AbstractInterfaceError>
pub fn replace_api( &self, module_id: &str, funds: Option<&[Coin]> ) -> Result<(), AbstractInterfaceError>
pub fn install_modules( &self, modules: Vec<ModuleInstallConfig>, funds: Option<&[Coin]> ) -> Result<Chain::Response, AbstractInterfaceError>
pub fn install_modules_auto( &self, modules: Vec<ModuleInstallConfig> ) -> Result<Chain::Response, AbstractInterfaceError>
pub fn install_module<TInitMsg: Serialize>( &self, module_id: &str, init_msg: &TInitMsg, funds: Option<&[Coin]> ) -> Result<Chain::Response, AbstractInterfaceError>
pub fn install_module_version<M: Serialize>( &self, module_id: &str, version: ModuleVersion, init_msg: &M, funds: Option<&[Coin]> ) -> Result<Chain::Response, AbstractInterfaceError>
pub fn execute_on_module( &self, module: &str, msg: impl Serialize ) -> Result<<Chain as TxHandler>::Response, AbstractInterfaceError>
sourcepub fn module_info(
&self,
module_id: &str
) -> Result<Option<ManagerModuleInfo>, AbstractInterfaceError>
pub fn module_info( &self, module_id: &str ) -> Result<Option<ManagerModuleInfo>, AbstractInterfaceError>
Return the module info installed on the manager
pub fn is_module_installed( &self, module_id: &str ) -> Result<bool, AbstractInterfaceError>
Trait Implementations§
source§impl<Chain: CwEnv> ContractInstance<Chain> for Manager<Chain>
impl<Chain: CwEnv> ContractInstance<Chain> for Manager<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.
§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.
§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.
§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.
§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: CwEnv> ExecutableContract for Manager<Chain>
impl<Chain: CwEnv> ExecutableContract for Manager<Chain>
§type ExecuteMsg = ExecuteMsg
type ExecuteMsg = ExecuteMsg
Execute message for the contract.
source§impl<Chain: CwEnv> InstantiableContract for Manager<Chain>
impl<Chain: CwEnv> InstantiableContract for Manager<Chain>
§type InstantiateMsg = InstantiateMsg
type InstantiateMsg = InstantiateMsg
Instantiate message for the contract.
source§impl<Chain: CwEnv> MigratableContract for Manager<Chain>
impl<Chain: CwEnv> MigratableContract for Manager<Chain>
§type MigrateMsg = MigrateMsg
type MigrateMsg = MigrateMsg
Migrate message for the contract.
Auto Trait Implementations§
impl<Chain> RefUnwindSafe for Manager<Chain>where Chain: RefUnwindSafe,
impl<Chain> Send for Manager<Chain>where Chain: Send,
impl<Chain> Sync for Manager<Chain>where Chain: Sync,
impl<Chain> Unpin for Manager<Chain>where Chain: Unpin,
impl<Chain> UnwindSafe for Manager<Chain>where Chain: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<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 moresource§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
§impl<T, Chain> CallAs<Chain> for Twhere
T: CwOrchExecute<Chain> + ContractInstance<Chain> + Clone,
Chain: CwEnv,
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)
§impl<T, Chain> CwOrchExecute<Chain> for Twhere
T: ExecutableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrchExecute<Chain> for Twhere T: ExecutableContract + ContractInstance<Chain>, Chain: CwEnv,
§impl<T, Chain> CwOrchInstantiate<Chain> for Twhere
T: InstantiableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrchInstantiate<Chain> for Twhere T: InstantiableContract + ContractInstance<Chain>, Chain: CwEnv,
§impl<T, Chain> CwOrchMigrate<Chain> for Twhere
T: MigratableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrchMigrate<Chain> for Twhere T: MigratableContract + ContractInstance<Chain>, Chain: CwEnv,
§impl<T, Chain> CwOrchQuery<Chain> for Twhere
T: QueryableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrchQuery<Chain> for Twhere T: QueryableContract + ContractInstance<Chain>, Chain: CwEnv,
§impl<T, Chain> CwOrchUpload<Chain> for Twhere
T: ContractInstance<Chain> + Uploadable,
Chain: CwEnv,
impl<T, Chain> CwOrchUpload<Chain> for Twhere T: ContractInstance<Chain> + Uploadable, Chain: CwEnv,
source§impl<SupportedContract, Chain> ExecuteMsgFns<Chain> for SupportedContractwhere
Chain: CwEnv,
SupportedContract: CwOrchExecute<Chain, ExecuteMsg = ExecuteMsg>,
impl<SupportedContract, Chain> ExecuteMsgFns<Chain> for SupportedContractwhere Chain: CwEnv, SupportedContract: CwOrchExecute<Chain, ExecuteMsg = ExecuteMsg>,
fn exec_on_module( &self, exec_msg: Binary, module_id: String, coins: &[Coin] ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_internal_config( &self, arg0: Binary ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn install_modules( &self, modules: Vec<ModuleInstallConfig, Global>, coins: &[Coin] ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn register_modules( &self, modules: Vec<RegisterModuleData, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn uninstall_module( &self, module_id: String ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn upgrade( &self, modules: Vec<(ModuleInfo, Option<Binary>), Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn create_sub_account( &self, install_modules: Vec<ModuleInstallConfig, Global>, name: String, base_asset: Option<AssetEntry>, description: Option<String>, link: Option<String>, namespace: Option<String> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_info( &self, description: Option<String>, link: Option<String>, name: Option<String> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn set_owner( &self, owner: GovernanceDetails<String> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_status( &self, is_suspended: Option<bool> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_settings( &self, ibc_enabled: Option<bool> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_sub_account( &self, arg0: UpdateSubAccountAction ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn callback( &self, arg0: CallbackMsg ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_ownership( &self, arg0: Action ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request