1#![cfg_attr(docsrs, feature(doc_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
57pub mod user;
59
60#[cfg(feature = "instruction")]
62pub mod instruction;
63
64#[cfg(feature = "security-txt")]
66pub mod security_txt;
67
68pub fn to_seed(key: &str) -> [u8; 32] {
70 use anchor_lang::solana_program::hash::hash;
71 hash(key.as_bytes()).to_bytes()
72}
73
74#[anchor_lang::error_code]
76pub enum GeneralError {
77 #[msg("Already exist")]
79 AlreadyExist,
80 #[msg("Exceed max length limit")]
82 ExceedMaxLengthLimit,
83}
84
85pub use self::{init_space::InitSpace, price::Price};
86pub use bitmaps;
87pub use paste;
88pub use static_assertions;
89
90#[cfg(feature = "security-txt")]
91pub use solana_security_txt;