abstract_std/
lib.rs

1// #![warn(missing_docs)]
2
3// https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html
4
5//! # Abstract Account
6//!
7//! Abstract Interface is the interface-defining crate to the Abstract smart-contract framework.
8//!
9//! ## Description
10//! This crate provides the key utilities that are required to integrate with or write Abstract contracts.
11//!
12//! ## Messages
13//! All interfacing message structs are defined here so they can be imported.
14//! ```no_run
15//! use abstract_std::account::ExecuteMsg;
16//! ```
17//! ### Assets
18//! [`cw-asset`](https://crates.io/crates/cw-asset) is used for asset-management.
19//! If a message requests a String value for an Asset field then you need to provide the human-readable ans_host key.
20//! The full list of supported assets and contracts is given [here](https://github.com/AbstractSDK/scripts/tree/main/resources/ans_host).
21//! The contract will handel address retrieval internally.
22//!
23//! ## State
24//! The internal state for each contract is also contained within this crate. This ensures that breaking changes to the internal state are easily spotted.
25//! It also allows for tight and low-gas integration between contracts by performing raw queries on these states.
26//! A contract's state object can be imported and used like:
27//! ```ignore
28//! use crate::account::state::ACCOUNT_ID
29//! let account_id = ACCOUNT_ID.query(querier, account_address).unwrap();
30//! ```
31//! The internally stored objects are also contained within this package in [`crate::objects`].
32//!
33//! ## Names
34//! Abstract contract names are used internally and for version management.
35//! They are exported for ease of use:
36//! ```no_run
37//! use abstract_std::ACCOUNT;
38//! ```
39//! ## Errors
40//! An `AbstractError` wraps error throws by `StdError` or `AssetError`. It is also use in the objects to throw errors.
41#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]
42
43/// Result type for Abstract objects
44pub type AbstractResult<T> = Result<T, error::AbstractError>;
45
46pub mod base;
47
48pub mod adapter;
49pub mod app;
50pub mod objects;
51pub mod standalone;
52
53mod error;
54pub use error::AbstractError;
55
56pub mod account;
57
58mod native;
59pub use crate::native::*;
60
61pub mod constants;
62pub use constants::*;
63
64pub mod native_addrs;