1#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2
3pub mod price;
5
6pub mod fixed_map;
8
9pub mod init_space;
11
12pub mod flags;
14
15pub mod fixed_str;
17
18pub mod pubkey;
20
21pub mod oracle;
23
24pub mod market;
26
27pub mod token_config;
29
30pub mod dynamic_access;
32
33pub mod action;
35
36pub mod chunk_by;
38
39pub mod swap;
41
42pub mod order;
44
45pub mod glv;
47
48pub mod config;
50
51pub mod gt;
53
54pub mod role;
56
57#[cfg(feature = "instruction")]
59pub mod instruction;
60
61pub fn to_seed(key: &str) -> [u8; 32] {
63 use anchor_lang::solana_program::hash::hash;
64 hash(key.as_bytes()).to_bytes()
65}
66
67pub use self::{init_space::InitSpace, price::Price};
68pub use bitmaps;
69pub use paste;
70pub use static_assertions;
71
72#[anchor_lang::error_code]
74pub enum GeneralError {
75 #[msg("Already exist")]
77 AlreadyExist,
78 #[msg("Exceed max length limit")]
80 ExceedMaxLengthLimit,
81}