| 150 | #[derive(Copy, Clone, Pod, Zeroable)] |
| 151 | #[repr(C)] |
| 152 | pub struct UserAccountHeader { |
| 153 | /// This byte is used to verify and version the dex state |
| 154 | pub tag: u64, |
| 155 | /// The user account's assocatied DEX market |
| 156 | pub market: Pubkey, |
| 157 | /// The user account owner's wallet |
| 158 | pub owner: Pubkey, |
| 159 | /// The amount of base token available for settlement |
| 160 | pub base_token_free: u64, |
| 161 | /// The amount of base token currently locked in the orderbook |
| 162 | pub base_token_locked: u64, |
| 163 | /// The amount of quote token available for settlement |
| 164 | pub quote_token_free: u64, |
| 165 | /// The amount of quote token currently locked in the orderbook |
| 166 | pub quote_token_locked: u64, |
| 167 | /// The all time quantity of rebates accumulated by this user account. |
| 168 | /// |
| 169 | /// The actual rebates will always be transfer to the user account's main balance. This field is just a metric. |
| 170 | pub accumulated_rebates: u64, |
| 171 | /// The accumulated maker quote volume of the user. This field is just a metric. |
| 172 | pub accumulated_maker_quote_volume: u64, |
| 173 | /// The accumulated maker quote volume of the user. This field is just a metric. |
| 174 | pub accumulated_maker_base_volume: u64, |
| 175 | /// The accumulated taker quote volume of the user. This field is just a metric. |
| 176 | pub accumulated_taker_quote_volume: u64, |
| 177 | /// The accumulated taker quote volume of the user. This field is just a metric. |
| 178 | pub accumulated_taker_base_volume: u64, |
| 179 | /// We are forced to add padding here to keep the subsequent field as a u32 which maintains Borsh compatibility while respecting alignment constraints |
| 180 | _padding: u32, |
| 181 | /// The user account's number of active orders. |
| 182 | pub number_of_orders: u32, |
| 183 | } |
| 184 | |
| 185 | /// Represents and order in the user account. The client id offers an alias which can be used off-chain to map custom ids to an actual order id. |
| 186 | #[derive(Copy, Clone, Pod, Zeroable)] |
nothing calls this directly
no outgoing calls
no test coverage detected