balancer_maths_rust/pools/fixed_price_lbp/
fixed_price_lbp_data.rs1use crate::common::types::BasePoolState;
2use alloy_primitives::U256;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7pub struct FixedPriceLBPMutable {
8 pub is_swap_enabled: bool,
9 pub current_timestamp: U256,
10}
11
12#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14pub struct FixedPriceLBPImmutable {
15 pub project_token_index: usize,
16 pub reserve_token_index: usize,
17 pub project_token_rate: U256,
18 pub start_time: U256,
19 pub end_time: U256,
20}
21
22#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
24pub struct FixedPriceLBPState {
25 pub base: BasePoolState,
26 pub mutable: FixedPriceLBPMutable,
27 pub immutable: FixedPriceLBPImmutable,
28}
29
30impl From<FixedPriceLBPState> for crate::common::types::PoolState {
31 fn from(state: FixedPriceLBPState) -> Self {
32 crate::common::types::PoolState::FixedPriceLBP(state)
33 }
34}