Struct abstract_interface_testing::Manager
source · pub struct Manager<Chain: CwEnv>(_);
Implementations§
source§impl<Chain: CwEnv> Manager<Chain>
impl<Chain: CwEnv> Manager<Chain>
pub fn new(name: &str, chain: Chain) -> Self
pub fn upgrade_module<M: Serialize>( &self, module_id: &str, migrate_msg: &M ) -> Result<(), AbstractInterfaceError>
pub fn replace_api(&self, module_id: &str) -> Result<(), AbstractInterfaceError>
pub fn install_module<TInitMsg: Serialize>( &self, module_id: &str, init_msg: &TInitMsg ) -> Result<(), AbstractInterfaceError>
pub fn install_module_version<M: Serialize>( &self, module_id: &str, version: ModuleVersion, init_msg: &M ) -> Result<(), AbstractInterfaceError>
pub fn execute_on_module( &self, module: &str, msg: impl Serialize ) -> Result<(), 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.
source§fn address(&self) -> Result<Addr, CwOrchError>
fn address(&self) -> Result<Addr, CwOrchError>
Returns the contract address for this 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_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 get_chain_mut(&mut self) -> &mut Chain
fn get_chain_mut(&mut self) -> &mut Chain
Returns the chain that this contract is deployed on.
source§impl<Chain: CwEnv> ExecutableContract for Manager<Chain>
impl<Chain: CwEnv> ExecutableContract for Manager<Chain>
type ExecuteMsg = ExecuteMsg
source§impl<Chain: CwEnv> InstantiableContract for Manager<Chain>
impl<Chain: CwEnv> InstantiableContract for Manager<Chain>
type InstantiateMsg = InstantiateMsg
source§impl<Chain: CwEnv> MigratableContract for Manager<Chain>
impl<Chain: CwEnv> MigratableContract for Manager<Chain>
type MigrateMsg = MigrateMsg
source§impl<Chain: CwEnv> Uploadable for Manager<Chain>
impl<Chain: CwEnv> Uploadable for Manager<Chain>
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§
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> CallAs<Daemon> for Twhere
T: CwOrcExecute<Daemon> + ContractInstance<Daemon> + Clone,
impl<T> CallAs<Daemon> for Twhere T: CwOrcExecute<Daemon> + ContractInstance<Daemon> + Clone,
source§impl<T> CallAs<Mock<MockState, Empty, Empty>> for Twhere
T: CwOrcExecute<Mock<MockState, Empty, Empty>> + ContractInstance<Mock<MockState, Empty, Empty>> + Clone,
impl<T> CallAs<Mock<MockState, Empty, Empty>> for Twhere T: CwOrcExecute<Mock<MockState, Empty, Empty>> + ContractInstance<Mock<MockState, Empty, Empty>> + Clone,
source§impl<T> ConditionalMigrate for Twhere
T: CwOrcMigrate<Daemon> + CwOrcUpload<Daemon>,
impl<T> ConditionalMigrate for Twhere T: CwOrcMigrate<Daemon> + CwOrcUpload<Daemon>,
source§fn migrate_if_needed(
&self,
migrate_msg: &Self::MigrateMsg
) -> Result<Option<<Daemon as TxHandler>::Response>, CwOrchError>
fn migrate_if_needed( &self, migrate_msg: &Self::MigrateMsg ) -> Result<Option<<Daemon as TxHandler>::Response>, CwOrchError>
Only migrate the contract if it is not on the latest code-id yet
source§impl<T> ConditionalUpload for Twhere
T: CwOrcUpload<Daemon>,
impl<T> ConditionalUpload for Twhere T: CwOrcUpload<Daemon>,
source§fn upload_if_needed(
&self
) -> Result<Option<<Daemon as TxHandler>::Response>, CwOrchError>
fn upload_if_needed( &self ) -> Result<Option<<Daemon as TxHandler>::Response>, CwOrchError>
Only upload the contract if it is not uploaded yet (checksum does not match)
source§fn latest_is_uploaded(&self) -> Result<bool, CwOrchError>
fn latest_is_uploaded(&self) -> Result<bool, CwOrchError>
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, CwOrchError>
fn is_running_latest(&self) -> Result<bool, CwOrchError>
Returns whether the contract is running the latest uploaded code for it
source§impl<T, Chain> CwOrcExecute<Chain> for Twhere
T: ExecutableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrcExecute<Chain> for Twhere T: ExecutableContract + ContractInstance<Chain>, Chain: CwEnv,
source§fn execute(
&self,
execute_msg: &Self::ExecuteMsg,
coins: Option<&[Coin]>
) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn execute( &self, execute_msg: &Self::ExecuteMsg, coins: Option<&[Coin]> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
Send a ExecuteMsg to the contract.
source§impl<T, Chain> CwOrcInstantiate<Chain> for Twhere
T: InstantiableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrcInstantiate<Chain> for Twhere T: InstantiableContract + ContractInstance<Chain>, Chain: CwEnv,
source§fn instantiate(
&self,
instantiate_msg: &Self::InstantiateMsg,
admin: Option<&Addr>,
coins: Option<&[Coin]>
) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn instantiate( &self, instantiate_msg: &Self::InstantiateMsg, admin: Option<&Addr>, coins: Option<&[Coin]> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
Instantiates the contract.
source§impl<T, Chain> CwOrcMigrate<Chain> for Twhere
T: MigratableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrcMigrate<Chain> for Twhere T: MigratableContract + ContractInstance<Chain>, Chain: CwEnv,
source§fn migrate(
&self,
migrate_msg: &Self::MigrateMsg,
new_code_id: u64
) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn migrate( &self, migrate_msg: &Self::MigrateMsg, new_code_id: u64 ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
Migrate the contract.
source§impl<T, Chain> CwOrcQuery<Chain> for Twhere
T: QueryableContract + ContractInstance<Chain>,
Chain: CwEnv,
impl<T, Chain> CwOrcQuery<Chain> for Twhere T: QueryableContract + ContractInstance<Chain>, Chain: CwEnv,
source§fn query<G>(&self, query_msg: &Self::QueryMsg) -> Result<G, CwOrchError>where
G: Serialize + DeserializeOwned + Debug,
fn query<G>(&self, query_msg: &Self::QueryMsg) -> Result<G, CwOrchError>where G: Serialize + DeserializeOwned + Debug,
Query the contract.
source§impl<T, Chain> CwOrcUpload<Chain> for Twhere
T: ContractInstance<Chain> + Uploadable,
Chain: CwEnv + ChainUpload,
impl<T, Chain> CwOrcUpload<Chain> for Twhere T: ContractInstance<Chain> + Uploadable, Chain: CwEnv + ChainUpload,
source§impl<SupportedContract, Chain> ExecuteMsgFns<Chain> for SupportedContractwhere
Chain: CwEnv,
SupportedContract: CwOrcExecute<Chain, ExecuteMsg = ExecuteMsg>,
impl<SupportedContract, Chain> ExecuteMsgFns<Chain> for SupportedContractwhere Chain: CwEnv, SupportedContract: CwOrcExecute<Chain, ExecuteMsg = ExecuteMsg>,
fn exec_on_module( &self, exec_msg: Binary, module_id: String ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn install_module( &self, module: ModuleInfo, init_msg: Option<Binary> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn register_module( &self, module: Module, module_addr: String ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn uninstall_module( &self, module_id: String ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn upgrade( &self, modules: Vec<(ModuleInfo, Option<Binary>), Global> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn update_info( &self, description: Option<String>, link: Option<String>, name: Option<String> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn set_owner( &self, owner: GovernanceDetails<String> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn update_status( &self, is_suspended: Option<bool> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
fn update_settings( &self, ibc_enabled: Option<bool> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>
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