pub struct Manager<Chain: CwEnv>(_);

Implementations§

source§

impl<Chain: CwEnv> Manager<Chain>

source

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

source§

impl<Chain: CwEnv> Manager<Chain>

source

pub fn upgrade_module<M: Serialize>( &self, module_id: &str, migrate_msg: &M ) -> Result<(), AbstractInterfaceError>

source

pub fn replace_api(&self, module_id: &str) -> Result<(), AbstractInterfaceError>

source

pub fn install_module<TInitMsg: Serialize>( &self, module_id: &str, init_msg: &TInitMsg ) -> Result<(), AbstractInterfaceError>

source

pub fn install_module_version<M: Serialize>( &self, module_id: &str, version: ModuleVersion, init_msg: &M ) -> Result<(), AbstractInterfaceError>

source

pub fn execute_on_module( &self, module: &str, msg: impl Serialize ) -> Result<(), AbstractInterfaceError>

source

pub fn update_adapter_authorized_addresses( &self, module_id: &str, to_add: Vec<String>, to_remove: Vec<String> ) -> Result<(), AbstractInterfaceError>

source

pub fn module_info( &self, module_id: &str ) -> Result<Option<ManagerModuleInfo>, AbstractInterfaceError>

Return the module info installed on the manager

source

pub fn is_module_installed( &self, module_id: &str ) -> Result<bool, AbstractInterfaceError>

Trait Implementations§

source§

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

source§

fn clone(&self) -> Manager<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 Manager<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, CwOrchError>

Returns the contract address for this instance.
source§

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

Returns the contract address as a String.
source§

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

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: CwEnv> ExecutableContract for Manager<Chain>

§

type ExecuteMsg = ExecuteMsg

Execute message for the contract.
source§

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

§

type InstantiateMsg = InstantiateMsg

Instantiate message for the contract.
source§

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

§

type MigrateMsg = MigrateMsg

Migrate message for the contract.
source§

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

§

type QueryMsg = QueryMsg

Query message for the contract.
source§

impl<Chain: CwEnv> Uploadable for Manager<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 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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
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
source§

impl<T> CallAs<Mock<MockState, Empty, Empty>> for Twhere T: CwOrcExecute<Mock<MockState, Empty, Empty>> + ContractInstance<Mock<MockState, Empty, Empty>> + Clone,

§

type Sender = Addr

The sender type for environment
source§

fn set_sender(&mut self, sender: &Addr)

Set the sender for interactions with the contract.
source§

fn call_as( &self, sender: &<T as CallAs<Mock<MockState, Empty, Empty>>>::Sender ) -> T

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

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>

Send a ExecuteMsg to the contract.
source§

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>

Instantiates the contract.
source§

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>

Migrate the contract.
source§

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,

Query the contract.
source§

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

source§

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

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: CwOrcExecute<Chain, ExecuteMsg = ExecuteMsg>,

source§

fn exec_on_module( &self, exec_msg: Binary, module_id: String ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn install_module( &self, module: ModuleInfo, init_msg: Option<Binary> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn register_module( &self, module: Module, module_addr: String ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn uninstall_module( &self, module_id: String ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn upgrade( &self, modules: Vec<(ModuleInfo, Option<Binary>), Global> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn update_info( &self, description: Option<String>, link: Option<String>, name: Option<String> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn set_owner( &self, owner: GovernanceDetails<String> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn update_status( &self, is_suspended: Option<bool> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

fn update_settings( &self, ibc_enabled: Option<bool> ) -> Result<<Chain as TxHandler>::Response, CwOrchError>

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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<SupportedContract, Chain> QueryMsgFns<Chain> for SupportedContractwhere Chain: CwEnv, SupportedContract: CwOrcQuery<Chain, QueryMsg = QueryMsg>,

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.