Expand description
Exports very commonly used items into the prelude glob
Re-exports§
pub use crate::contracts::factory::entry::ExecuteMsg as FactoryExecuteMsg;pub use crate::contracts::factory::entry::QueryMsg as FactoryQueryMsg;pub use crate::contracts::market::entry::ExecuteMsg as MarketExecuteMsg;pub use crate::contracts::market::entry::QueryMsg as MarketQueryMsg;pub use crate::direction::DirectionToBase;pub use crate::direction::DirectionToNotional;pub use crate::event::CosmwasmEventExt;pub use crate::market_type::MarketId;pub use crate::market_type::MarketType;pub use crate::max_gains::MaxGainsInQuote;pub use crate::namespace;pub use crate::number::Signed;pub use crate::time::Duration;pub use crate::time::Timestamp;pub use crate::storage::external_map_has;pub use crate::storage::load_external_item;pub use crate::storage::load_external_map;pub use super::number::*;pub use super::result::*;pub use crate::cosmwasm::*;pub use crate::error::*;pub use crate::leverage::*;pub use crate::price::*;
Macros§
- anyhow
- Construct an ad-hoc error from a string or existing non-
anyhowerror value. - bail
- Return early with an error.
Structs§
- Addr
- A human readable address.
- Decimal256
- A fixed-point decimal value with 18 fractional digits, i.e. Decimal256(1_000_000_000_000_000_000) == 1.0
- Event
- A full Cosmos SDK event.
- Item
- Item stores one typed item at the given key. This is an analog of Singleton. It functions the same way as Path does but doesn’t use a Vec and thus has a const fn constructor.
- Map
- RawAddr
- A raw address passed in via JSON.
- Response
Builder - Helper data type, following builder pattern, for constructing a [Response].
- Uint64
- A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.
Enums§
- Auth
Check - Check that an addr satisfies auth checks
- Bound
Boundis used to define the two ends of a range.Nonemeans that we don’t limit that side of the range at all.Inclusivemeans we use the given value as a limit and include anything at that exact key.Exclusivemeans we use the given value as a limit and exclude anything at that exact key.- Congestion
Reason - What was the user doing when they hit the congestion error message?
- Market
Error - An error type for known market errors with potentially special error handling.
- Order
- Trigger
Price Must Be - Was the price provided by the trader too high or too low?
- Trigger
Type - What type of price trigger occurred?
Traits§
- Api
- Api are callbacks to system functions implemented outside of the wasm modules. Currently it just supports address conversion but we could add eg. crypto functions here.
- Context
- Provides the
contextmethod forResult. - Display
- Format trait for an empty format,
{}. - FromStr
- Parse a value from a string
- Storage
- Storage provides read and write access to a persistent storage.
If you only want to provide read access, provide
&Storage
Functions§
- assert_
auth - Ensure that the given address passes the specified AuthCheck.
- get_
contract_ version - get_contract_version can be use in migrate to read the previous version of this contract
Type Aliases§
- Result
Result<T, Error>