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

Implementations§

source§

impl<Chain: CwEnv> VersionControl<Chain>where TxResponse<Chain>: IndexResponse,

source

pub fn new(name: &str, chain: Chain) -> Self

source

pub fn load(chain: Chain, address: &Addr) -> Self

source

pub fn module(&self, info: ModuleInfo) -> Result<Module, AbstractBootError>

Query a single module

source

pub fn register_base( &self, account: &AbstractAccount<Chain>, version: &str ) -> Result<(), AbstractBootError>

source

pub fn register_account_mods( &self, apps: Vec<&Contract<Chain>>, version: &Version ) -> Result<(), AbstractBootError>

Register account modules

source

pub fn register_natives( &self, natives: Vec<&Contract<Chain>>, version: &Version ) -> Result<(), AbstractBootError>

Register native modules

source

pub fn register_apps( &self, apps: Vec<&Contract<Chain>>, version: &Version ) -> Result<(), AbstractBootError>

source

pub fn register_apis( &self, apis: Vec<&Contract<Chain>>, version: &Version ) -> Result<(), AbstractBootError>

source

pub fn register_standalones( &self, standalones: Vec<&Contract<Chain>>, version: &Version ) -> Result<(), AbstractBootError>

source

pub fn get_account( &self, account_id: AccountId ) -> Result<AccountBase, AbstractBootError>

source

pub fn get_api_addr( &self, id: &str, version: ModuleVersion ) -> Result<Addr, AbstractBootError>

Retrieves an API’s address from version control given the module id and version.

source

pub fn get_app_code( &self, id: &str, version: ModuleVersion ) -> Result<u64, AbstractBootError>

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>

source§

fn clone(&self) -> VersionControl<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 VersionControl<Chain>

source§

fn as_instance(&self) -> &Contract<Chain>

source§

fn as_instance_mut(&mut self) -> &mut Contract<Chain>

source§

fn id(&self) -> String

source§

fn address(&self) -> Result<Addr, BootError>

source§

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

source§

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

source§

fn set_address(&self, address: &Addr)

source§

fn set_code_id(&self, code_id: u64)

source§

fn get_chain(&self) -> &Chain

source§

impl<Chain: CwEnv> CwInterface for VersionControl<Chain>

Auto Trait Implementations§

§

impl<Chain> !RefUnwindSafe for VersionControl<Chain>

§

impl<Chain> !Send for VersionControl<Chain>

§

impl<Chain> !Sync for VersionControl<Chain>

§

impl<Chain> Unpin for VersionControl<Chain>where Chain: Unpin,

§

impl<Chain> !UnwindSafe for VersionControl<Chain>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<M> AsAny for Mwhere M: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

source§

impl<T, Chain> BootExecute<Chain> for Twhere T: CwInterface + ContractInstance<Chain>, Chain: CwEnv,

§

type ExecuteMsg = <T as CwInterface>::ExecuteMsg

source§

fn execute( &self, execute_msg: &<T as BootExecute<Chain>>::ExecuteMsg, coins: Option<&[Coin]> ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

impl<T, Chain> BootInstantiate<Chain> for Twhere T: CwInterface + ContractInstance<Chain>, Chain: CwEnv,

§

type InstantiateMsg = <T as CwInterface>::InstantiateMsg

source§

fn instantiate( &self, instantiate_msg: &<T as BootInstantiate<Chain>>::InstantiateMsg, admin: Option<&Addr>, coins: Option<&[Coin]> ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

impl<T, Chain> BootMigrate<Chain> for Twhere T: CwInterface + ContractInstance<Chain>, Chain: CwEnv,

§

type MigrateMsg = <T as CwInterface>::MigrateMsg

source§

fn migrate( &self, migrate_msg: &<T as BootMigrate<Chain>>::MigrateMsg, new_code_id: u64 ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

impl<T, Chain> BootQuery<Chain> for Twhere T: CwInterface + ContractInstance<Chain>, Chain: CwEnv,

§

type QueryMsg = <T as CwInterface>::QueryMsg

source§

fn query<G>( &self, query_msg: &<T as BootQuery<Chain>>::QueryMsg ) -> Result<G, BootError>where G: Serialize + DeserializeOwned + Debug,

source§

impl<T, Chain> BootUpload<Chain> for Twhere T: ContractInstance<Chain>, Chain: CwEnv,

source§

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

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CallAs<Daemon> for Twhere T: BootExecute<Daemon> + ContractInstance<Daemon> + Clone,

§

type Sender = Rc<Sender<All>>

source§

fn set_sender(&mut self, sender: &<T as CallAs<Daemon>>::Sender)

Set the sender for the contract
source§

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

Call a contract as a different sender.
Creates a new copy of the contract with a different sender
source§

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

§

type Sender = Addr

source§

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

Set the sender for the contract
source§

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

Call a contract as a different sender.
Creates a new copy of the contract with a different sender
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: BootExecute<Chain, ExecuteMsg = ExecuteMsg>,

source§

fn remove_module( &self, module: ModuleInfo ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn yank_module( &self, module: ModuleInfo ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn add_modules( &self, modules: Vec<(ModuleInfo, ModuleReference), Global> ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn approve_or_reject_modules( &self, approves: Vec<ModuleInfo, Global>, rejects: Vec<ModuleInfo, Global> ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn claim_namespaces( &self, account_id: u32, namespaces: Vec<String, Global> ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn remove_namespaces( &self, namespaces: Vec<String, Global> ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn add_account( &self, account_base: AccountBase, account_id: u32 ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn update_namespace_limit( &self, new_limit: u32 ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

fn set_factory( &self, new_factory: String ) -> Result<<Chain as TxHandler>::Response, BootError>

source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for Twhere T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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<T> IntoRequest<T> for T

source§

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: BootQuery<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.
const: unstable · 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.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more