Struct AddOnContract

Source
pub struct AddOnContract<'a> {
    pub base_state: Item<'a, AddOnState>,
    pub version: Item<'a, ContractVersion>,
    pub admin: Admin<'a>,
}
Expand description

The state variables for our AddOnContract.

Fields§

§base_state: Item<'a, AddOnState>§version: Item<'a, ContractVersion>§admin: Admin<'a>

Implementations§

Source§

impl<'a> AddOnContract<'a>

Source

pub fn execute( &self, deps: DepsMut<'_>, _env: Env, info: MessageInfo, message: BaseExecuteMsg, ) -> AddOnResult

Source§

impl<'a> AddOnContract<'a>

Source

pub fn instantiate( &self, deps: DepsMut<'_>, _env: Env, info: MessageInfo, msg: BaseInstantiateMsg, module_name: &str, module_version: &str, ) -> StdResult<Self>

Source§

impl<'a> AddOnContract<'a>

Where we dispatch the queries for the AddOnContract These BaseQueryMsg declarations can be found in abstract_os::common_module::add_on_msg

Source

pub fn query( &self, deps: Deps<'_>, _env: Env, query: BaseQueryMsg, ) -> StdResult<Binary>

Source§

impl<'a> AddOnContract<'a>

Constructor

Source

pub fn state(&self, store: &dyn Storage) -> StdResult<AddOnState>

Source

pub fn version(&self, store: &dyn Storage) -> StdResult<ContractVersion>

Trait Implementations§

Source§

impl Default for AddOnContract<'static>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Dependency for AddOnContract<'_>

Source§

fn dependency_address( &self, deps: Deps<'_>, dependency_name: &str, ) -> StdResult<Addr>

Source§

fn call_api_dependency<E: Serialize>( &self, deps: Deps<'_>, dependency_name: &str, request_msg: &E, funds: Vec<Coin>, ) -> StdResult<CosmosMsg>

Source§

impl MemoryOperation for AddOnContract<'_>

Source§

fn load_memory(&self, store: &dyn Storage) -> StdResult<Memory>

Load the Memory object
Source§

fn resolve<T>( &self, deps: Deps<'_>, memory_entry: &T, ) -> Result<<T as Resolve>::Output, StdError>
where T: Resolve,

Resolve a query on the memory contract
Source§

impl OsExecute for AddOnContract<'_>

Source§

type Err = AddOnError

Source§

fn os_execute( &self, deps: Deps<'_>, msgs: Vec<CosmosMsg>, ) -> Result<Response, Self::Err>

Auto Trait Implementations§

§

impl<'a> Freeze for AddOnContract<'a>

§

impl<'a> RefUnwindSafe for AddOnContract<'a>

§

impl<'a> Send for AddOnContract<'a>

§

impl<'a> Sync for AddOnContract<'a>

§

impl<'a> Unpin for AddOnContract<'a>

§

impl<'a> UnwindSafe for AddOnContract<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<U> As for U

Source§

fn as_<T>(self) -> T
where 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 more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.