Struct abstract_boot::Abstract

source ·
pub struct Abstract<Chain: BootEnvironment> {
    pub chain: Chain,
    pub version: Version,
    pub ans_host: AnsHost<Chain>,
    pub version_control: VersionControl<Chain>,
    pub account_factory: AccountFactory<Chain>,
    pub module_factory: ModuleFactory<Chain>,
}

Fields§

§chain: Chain§version: Version§ans_host: AnsHost<Chain>§version_control: VersionControl<Chain>§account_factory: AccountFactory<Chain>§module_factory: ModuleFactory<Chain>

Implementations§

source§

impl<Chain: BootEnvironment> Abstract<Chain>

source

pub fn new(chain: Chain, version: Version) -> Self

source

pub fn upload( &mut self, account: &mut AbstractAccount<Chain> ) -> Result<(), AbstractBootError>

source

pub fn instantiate(&mut self) -> Result<(), AbstractBootError>

source

pub fn deploy( &mut self, account: &mut AbstractAccount<Chain> ) -> Result<(), AbstractBootError>

source

pub fn contracts(&self) -> Vec<&Contract<Chain>>

Trait Implementations§

source§

impl<Chain: BootEnvironment> Deploy<Chain> for Abstract<Chain>

§

type Error = BootError

§

type DeployData = Version

Data required to deploy the application.
source§

fn deploy_on(chain: Chain, version: Version) -> Result<Self, BootError>

Deploy the application to the chain.
source§

fn load_from(chain: Chain) -> Result<Self, Self::Error>

Load the application from the chain, assuming it has already been deployed. This either loads contract addresses from the chain state manually or constructs the boot contract wrappers that were used to deploy the application with the same name.

Auto Trait Implementations§

§

impl<Chain> !RefUnwindSafe for Abstract<Chain>

§

impl<Chain> !Send for Abstract<Chain>

§

impl<Chain> !Sync for Abstract<Chain>

§

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

§

impl<Chain> !UnwindSafe for Abstract<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
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> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same<T> for T

§

type Output = T

Should always be Self
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.