Struct abstract_interface::VersionControl
source · pub struct VersionControl<Chain: CwEnv>(_);
Implementations§
source§impl<Chain: CwEnv> VersionControl<Chain>
impl<Chain: CwEnv> VersionControl<Chain>
source§impl<Chain: CwEnv> VersionControl<Chain>where
TxResponse<Chain>: IndexResponse,
impl<Chain: CwEnv> VersionControl<Chain>where TxResponse<Chain>: IndexResponse,
pub fn load(chain: Chain, address: &Addr) -> Self
sourcepub fn module(&self, info: ModuleInfo) -> Result<Module, AbstractInterfaceError>
pub fn module(&self, info: ModuleInfo) -> Result<Module, AbstractInterfaceError>
Query a single module
pub fn register_base( &self, account: &AbstractAccount<Chain> ) -> Result<(), AbstractInterfaceError>
sourcepub fn register_account_mods(
&self,
apps: Vec<(&Contract<Chain>, String)>
) -> Result<(), AbstractInterfaceError>
pub fn register_account_mods( &self, apps: Vec<(&Contract<Chain>, String)> ) -> Result<(), AbstractInterfaceError>
Register account modules
sourcepub fn register_natives(
&self,
natives: Vec<(&Contract<Chain>, String)>
) -> Result<(), AbstractInterfaceError>
pub fn register_natives( &self, natives: Vec<(&Contract<Chain>, String)> ) -> Result<(), AbstractInterfaceError>
Register native modules
pub fn register_apps( &self, apps: Vec<(&Contract<Chain>, String)> ) -> Result<(), AbstractInterfaceError>
pub fn register_adapters( &self, adapters: Vec<(&Contract<Chain>, String)> ) -> Result<(), AbstractInterfaceError>
pub fn register_standalones( &self, standalones: Vec<(&Contract<Chain>, String)> ) -> Result<(), AbstractInterfaceError>
pub fn get_account( &self, account_id: AccountId ) -> Result<AccountBase, AbstractInterfaceError>
sourcepub fn get_adapter_addr(
&self,
id: &str,
version: ModuleVersion
) -> Result<Addr, AbstractInterfaceError>
pub fn get_adapter_addr( &self, id: &str, version: ModuleVersion ) -> Result<Addr, AbstractInterfaceError>
Retrieves an Adapter’s address from version control given the module id and version.
sourcepub fn get_app_code(
&self,
id: &str,
version: ModuleVersion
) -> Result<u64, AbstractInterfaceError>
pub fn get_app_code( &self, id: &str, version: ModuleVersion ) -> Result<u64, AbstractInterfaceError>
Retrieves an APP’s code id from version control given the module id and version.
Trait Implementations§
source§impl<Chain: Clone + CwEnv> Clone for VersionControl<Chain>
impl<Chain: Clone + CwEnv> Clone for VersionControl<Chain>
source§fn clone(&self) -> VersionControl<Chain>
fn clone(&self) -> VersionControl<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: CwEnv> ContractInstance<Chain> for VersionControl<Chain>
impl<Chain: CwEnv> ContractInstance<Chain> for VersionControl<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_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: CwEnv> ExecutableContract for VersionControl<Chain>
impl<Chain: CwEnv> ExecutableContract for VersionControl<Chain>
§type ExecuteMsg = ExecuteMsg
type ExecuteMsg = ExecuteMsg
Execute message for the contract.
source§impl<Chain: CwEnv> InstantiableContract for VersionControl<Chain>
impl<Chain: CwEnv> InstantiableContract for VersionControl<Chain>
§type InstantiateMsg = InstantiateMsg
type InstantiateMsg = InstantiateMsg
Instantiate message for the contract.
source§impl<Chain: CwEnv> MigratableContract for VersionControl<Chain>
impl<Chain: CwEnv> MigratableContract for VersionControl<Chain>
§type MigrateMsg = MigrateMsg
type MigrateMsg = MigrateMsg
Migrate message for the contract.
source§impl<Chain: CwEnv> QueryableContract for VersionControl<Chain>
impl<Chain: CwEnv> QueryableContract for VersionControl<Chain>
source§impl<Chain: CwEnv> Uploadable for VersionControl<Chain>
impl<Chain: CwEnv> Uploadable for VersionControl<Chain>
Auto Trait Implementations§
impl<Chain> RefUnwindSafe for VersionControl<Chain>where Chain: RefUnwindSafe,
impl<Chain> Send for VersionControl<Chain>where Chain: Send,
impl<Chain> Sync for VersionControl<Chain>where Chain: Sync,
impl<Chain> Unpin for VersionControl<Chain>where Chain: Unpin,
impl<Chain> UnwindSafe for VersionControl<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<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§fn set_sender(&mut self, sender: &Addr)
fn set_sender(&mut self, sender: &Addr)
Set the sender for interactions with the contract.
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.