gmsol_store/states/
mod.rs

1/// Common types.
2pub mod common;
3
4/// Store.
5pub mod store;
6
7/// Feature.
8pub mod feature;
9
10/// Roles.
11pub mod roles;
12
13/// Token Config.
14pub mod token_config;
15
16/// This module defines the [`Market`] struct and its associated state.
17pub mod market;
18
19/// Oracle.
20pub mod oracle;
21
22/// Deposit.
23pub mod deposit;
24
25/// Withdrawal.
26pub mod withdrawal;
27
28/// Order.
29pub mod order;
30
31/// Position.
32pub mod position;
33
34/// Shift.
35pub mod shift;
36
37/// User.
38pub mod user;
39
40/// GLV.
41pub mod glv;
42
43/// GT.
44pub mod gt;
45
46pub use deposit::Deposit;
47pub use glv::{Glv, GlvDeposit, GlvShift, GlvWithdrawal};
48pub use market::{
49    config::MarketConfigKey, pool::PoolStorage, HasMarketMeta, Market, MarketMeta, OtherState,
50};
51pub use oracle::*;
52pub use order::{Order, OrderActionParams, UpdateOrderParams};
53pub use position::Position;
54pub use roles::*;
55pub use shift::*;
56pub use store::*;
57pub use token_config::*;
58pub use user::UserHeader;
59pub use withdrawal::Withdrawal;
60
61pub type Amount = u64;
62pub type Factor = u128;
63
64use gmsol_utils::InitSpace;
65
66/// Data type that has [`SEED`](Seed::SEED).
67pub trait Seed {
68    /// Prefix seed for program derived addresses.
69    const SEED: &'static [u8];
70}
71
72/// Nonce Bytes.
73pub type NonceBytes = [u8; 32];