Struct abstract_interface::VersionControl
source · pub struct VersionControl<Chain: CwEnv>(/* private fields */);
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.
§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 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§
§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>,
source§fn remove_module(
&self,
module: ModuleInfo
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn remove_module( &self, module: ModuleInfo ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::RemoveModule variant
source§fn yank_module(
&self,
module: ModuleInfo
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn yank_module( &self, module: ModuleInfo ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::YankModule variant
source§fn propose_modules(
&self,
modules: Vec<(ModuleInfo, ModuleReference), Global>
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn propose_modules( &self, modules: Vec<(ModuleInfo, ModuleReference), Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::ProposeModules variant
source§fn update_module_configuration(
&self,
module_name: String,
namespace: Namespace,
update_module: UpdateModule
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_module_configuration( &self, module_name: String, namespace: Namespace, update_module: UpdateModule ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::UpdateModuleConfiguration variant
source§fn approve_or_reject_modules(
&self,
approves: Vec<ModuleInfo, Global>,
rejects: Vec<ModuleInfo, Global>
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn approve_or_reject_modules( &self, approves: Vec<ModuleInfo, Global>, rejects: Vec<ModuleInfo, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::ApproveOrRejectModules variant
source§fn claim_namespace(
&self,
account_id: AccountId,
namespace: String
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn claim_namespace( &self, account_id: AccountId, namespace: String ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::ClaimNamespace variant
source§fn remove_namespaces(
&self,
namespaces: Vec<String, Global>
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn remove_namespaces( &self, namespaces: Vec<String, Global> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::RemoveNamespaces variant
source§fn add_account(
&self,
account_base: AccountBase,
account_id: AccountId
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn add_account( &self, account_base: AccountBase, account_id: AccountId ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::AddAccount variant
source§fn update_config(
&self,
allow_direct_module_registration_and_updates: Option<bool>,
namespace_registration_fee: Option<Coin>
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn update_config( &self, allow_direct_module_registration_and_updates: Option<bool>, namespace_registration_fee: Option<Coin> ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::UpdateConfig variant
source§fn set_factory(
&self,
new_factory: String
) -> Result<<Chain as TxHandler>::Response, CwEnvError>
fn set_factory( &self, new_factory: String ) -> Result<<Chain as TxHandler>::Response, CwEnvError>
Automatically generated wrapper around ExecuteMsg::SetFactory 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> 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
source§impl<SupportedContract, Chain> QueryMsgFns<Chain> for SupportedContractwhere
Chain: CwEnv,
SupportedContract: CwOrchQuery<Chain, QueryMsg = QueryMsg>,
impl<SupportedContract, Chain> QueryMsgFns<Chain> for SupportedContractwhere Chain: CwEnv, SupportedContract: CwOrchQuery<Chain, QueryMsg = QueryMsg>,
source§fn account_base(
&self,
account_id: AccountId
) -> Result<AccountBaseResponse, CwEnvError>
fn account_base( &self, account_id: AccountId ) -> Result<AccountBaseResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::AccountBase variant
source§fn modules(
&self,
infos: Vec<ModuleInfo, Global>
) -> Result<ModulesResponse, CwEnvError>
fn modules( &self, infos: Vec<ModuleInfo, Global> ) -> Result<ModulesResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Modules variant
source§fn namespaces(
&self,
accounts: Vec<AccountId, Global>
) -> Result<NamespacesResponse, CwEnvError>
fn namespaces( &self, accounts: Vec<AccountId, Global> ) -> Result<NamespacesResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Namespaces variant
source§fn namespace(
&self,
namespace: Namespace
) -> Result<NamespaceResponse, CwEnvError>
fn namespace( &self, namespace: Namespace ) -> Result<NamespaceResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Namespace variant
source§fn config(&self) -> Result<ConfigResponse, CwEnvError>
fn config(&self) -> Result<ConfigResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::Config variant
source§fn module_list(
&self,
filter: Option<ModuleFilter>,
limit: Option<u8>,
start_after: Option<ModuleInfo>
) -> Result<ModulesListResponse, CwEnvError>
fn module_list( &self, filter: Option<ModuleFilter>, limit: Option<u8>, start_after: Option<ModuleInfo> ) -> Result<ModulesListResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::ModuleList variant
source§fn namespace_list(
&self,
limit: Option<u8>,
start_after: Option<String>
) -> Result<NamespaceListResponse, CwEnvError>
fn namespace_list( &self, limit: Option<u8>, start_after: Option<String> ) -> Result<NamespaceListResponse, CwEnvError>
Automatically generated wrapper around QueryMsg::NamespaceList variant