balancer_maths_rust/pools/liquidity_bootstrapping/
liquidity_bootstrapping_data.rs1use crate::common::types::BasePoolState;
2use num_bigint::BigInt;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7pub struct LiquidityBootstrappingMutable {
8    pub is_swap_enabled: bool,
9    pub current_timestamp: BigInt,
10}
11
12#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14pub struct LiquidityBootstrappingImmutable {
15    pub project_token_index: usize,
16    pub is_project_token_swap_in_blocked: bool,
17    pub start_weights: Vec<BigInt>,
18    pub end_weights: Vec<BigInt>,
19    pub start_time: BigInt,
20    pub end_time: BigInt,
21}
22
23#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
25pub struct LiquidityBootstrappingState {
26    pub base: BasePoolState,
27    pub mutable: LiquidityBootstrappingMutable,
28    pub immutable: LiquidityBootstrappingImmutable,
29}
30
31impl From<LiquidityBootstrappingState> for crate::common::types::PoolState {
32    fn from(state: LiquidityBootstrappingState) -> Self {
33        crate::common::types::PoolState::LiquidityBootstrapping(state)
34    }
35}