Module common

Module common 

Source
Expand description

Common types, constants, and utilities shared across all pool implementations

Re-exports§

pub use constants::WAD;
pub use errors::PoolError;
pub use oz_math::sqrt;
pub use pool_base::PoolBase;
pub use types::AddLiquidityInput;
pub use types::AddLiquidityResult;
pub use types::PoolState;
pub use types::RemoveLiquidityInput;
pub use types::RemoveLiquidityResult;
pub use types::Rounding;
pub use types::SwapInput;
pub use types::SwapKind;
pub use types::SwapParams;
pub use types::SwapResult;
pub use utils::compute_and_charge_aggregate_swap_fees;
pub use utils::copy_to_scaled18_apply_rate_round_down_array;
pub use utils::copy_to_scaled18_apply_rate_round_up_array;
pub use utils::find_case_insensitive_index_in_list;
pub use utils::get_single_input_index;
pub use utils::is_same_address;
pub use utils::require_unbalanced_liquidity_enabled;
pub use utils::to_raw_undo_rate_round_down;
pub use utils::to_raw_undo_rate_round_up;
pub use utils::to_scaled_18_apply_rate_round_down;
pub use utils::to_scaled_18_apply_rate_round_up;
pub use utils::MAX_UINT256;

Modules§

constants
Mathematical constants used throughout the Balancer maths implementation
errors
Custom error types for the Balancer maths library
log_exp_math
Logarithmic and exponential math utilities for fixed-point arithmetic
maths
Mathematical utilities for fixed-point arithmetic
oz_math
pool_base
Pool base trait for all pool implementations
types
Core types for the Balancer maths library
utils
Common utility functions for Balancer pools