gmsol_programs/constants/
mod.rs

1/// Roles.
2pub mod roles;
3
4/// Default decimals for calculation.
5pub const MARKET_DECIMALS: u8 = 20;
6
7/// Unit USD value i.e. `one`.
8pub const MARKET_USD_UNIT: u128 = 10u128.pow(MARKET_DECIMALS as u32);
9
10/// Decimals of market tokens.
11pub const MARKET_TOKEN_DECIMALS: u8 = 9;
12
13/// USD value to amount divisor.
14pub const MARKET_USD_TO_AMOUNT_DIVISOR: u128 =
15    10u128.pow((MARKET_DECIMALS - MARKET_TOKEN_DECIMALS) as u32);
16
17/// Adjustment factor for saving funding amount per size.
18pub const FUNDING_AMOUNT_PER_SIZE_ADJUSTMENT: u128 = 10u128.pow((MARKET_DECIMALS >> 1) as u32);
19
20/// Number of market config flags.
21pub const NUM_MARKET_CONFIG_FLAGS: usize = 128;
22
23/// Number of market flags.
24pub const NUM_MARKET_FLAGS: usize = 8;
25
26/// Max length of the role anme.
27pub const MAX_ROLE_NAME_LEN: usize = 32;