pub struct ApiContract<'a, Request: Serialize + DeserializeOwned, Error: From<StdError> + From<ApiError>, Receive: Serialize + DeserializeOwned = Empty> {
    pub traders: Map<'a, Addr, HashSet<Addr>>,
    pub base_state: Item<'a, ApiState>,
    pub version: Item<'a, ContractVersion>,
    pub target_os: Option<Core>,
    pub dependencies: &'static [&'static str],
    /* private fields */
}
Expand description

The state variables for our ApiContract.

Fields

traders: Map<'a, Addr, HashSet<Addr>>base_state: Item<'a, ApiState>version: Item<'a, ContractVersion>

Stores the API version

target_os: Option<Core>dependencies: &'static [&'static str]

Implementations

Instantiate the API

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

Constructor

add IBC callback handler to contract

add dependencies to the contract

Trait Implementations

Takes request, sets destination and executes request handler This fn is the only way to get an ApiContract instance which ensures the destination address is set correctly. Read more
Returns the “default value” for a type. Read more

Implement the dependency functions for an API contract

Takes request, sets destination and executes request handler This fn is the only way to get an ApiContract instance which ensures the destination address is set correctly. Read more
Load the Memory object
Resolve a query on the memory contract

Execute a set of CosmosMsgs on the proxy contract of an OS.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.