abstract_os/lib.rs
1// #![warn(missing_docs)]
2
3// https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html
4
5//! # Abstract OS
6//!
7//! Abstract OS is the interface-defining crate to the Abstract OS 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_os::manager::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/Abstract-OS/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::manager::state::OS_ID
29//! let os_id = OS_ID.query(querier, manager_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_os::PROXY;
38//! ```
39//! ## Errors
40//! An `AbstractError` wraps error throws by `StdError` or `AssetError`. It is also use in the objects to throw errors.
41
42/// Result type for Abstract OS objects
43pub type AbstractResult<T> = Result<T, error::AbstractOsError>;
44
45pub extern crate abstract_ica;
46pub mod base;
47pub mod ibc_host;
48
49pub use registry::*;
50pub mod abstract_token;
51pub mod api;
52pub mod app;
53pub mod objects;
54pub mod registry;
55
56mod error;
57pub use error::AbstractOsError;
58
59mod core;
60pub use crate::core::*;
61
62mod native;
63pub use crate::native::*;
64
65pub(crate) mod constants;