pub enum Pool {
Show 21 variants
UniswapV2(UniswapV2Pool),
SushiSwapV2(UniswapV2Pool),
PancakeSwapV2(UniswapV2Pool),
BaseSwapV2(UniswapV2Pool),
AlienBaseV2(UniswapV2Pool),
SwapBasedV2(UniswapV2Pool),
DackieSwapV2(UniswapV2Pool),
Aerodrome(UniswapV2Pool),
Slipstream(UniswapV3Pool),
UniswapV3(UniswapV3Pool),
SushiSwapV3(UniswapV3Pool),
PancakeSwapV3(UniswapV3Pool),
BaseSwapV3(UniswapV3Pool),
AlienBaseV3(UniswapV3Pool),
SwapBasedV3(UniswapV3Pool),
DackieSwapV3(UniswapV3Pool),
MaverickV1(MaverickPool),
MaverickV2(MaverickPool),
CurveTwoCrypto(CurveTwoCryptoPool),
CurveTriCrypto(CurveTriCryptoPool),
BalancerV2(BalancerV2Pool),
}Expand description
Represents a populated pool from any of the supported protocols
Variants§
UniswapV2(UniswapV2Pool)
SushiSwapV2(UniswapV2Pool)
PancakeSwapV2(UniswapV2Pool)
BaseSwapV2(UniswapV2Pool)
AlienBaseV2(UniswapV2Pool)
SwapBasedV2(UniswapV2Pool)
DackieSwapV2(UniswapV2Pool)
Aerodrome(UniswapV2Pool)
Slipstream(UniswapV3Pool)
UniswapV3(UniswapV3Pool)
SushiSwapV3(UniswapV3Pool)
PancakeSwapV3(UniswapV3Pool)
BaseSwapV3(UniswapV3Pool)
AlienBaseV3(UniswapV3Pool)
SwapBasedV3(UniswapV3Pool)
DackieSwapV3(UniswapV3Pool)
MaverickV1(MaverickPool)
MaverickV2(MaverickPool)
CurveTwoCrypto(CurveTwoCryptoPool)
CurveTriCrypto(CurveTriCryptoPool)
BalancerV2(BalancerV2Pool)
Implementations§
Source§impl Pool
impl Pool
pub fn new_v2(pool_type: PoolType, pool: UniswapV2Pool) -> Self
pub fn new_v3(pool_type: PoolType, pool: UniswapV3Pool) -> Self
pub fn new_maverick(pool_type: PoolType, pool: MaverickPool) -> Self
pub fn new_curve_two(pool_type: PoolType, pool: CurveTwoCryptoPool) -> Self
pub fn new_curve_tri(pool_type: PoolType, pool: CurveTriCryptoPool) -> Self
pub fn new_balancer(pool_type: PoolType, pool: BalancerV2Pool) -> Self
pub fn is_v2(&self) -> bool
pub fn is_v3(&self) -> bool
pub fn is_maverick(&self) -> bool
pub fn is_curve_two(&self) -> bool
pub fn is_curve_tri(&self) -> bool
pub fn is_balancer(&self) -> bool
pub fn get_v2(&self) -> Option<&UniswapV2Pool>
pub fn get_v3(&self) -> Option<&UniswapV3Pool>
pub fn get_maverick(&self) -> Option<&MaverickPool>
pub fn get_curve_two(&self) -> Option<&CurveTwoCryptoPool>
pub fn get_curve_tri(&self) -> Option<&CurveTriCryptoPool>
pub fn get_balancer(&self) -> Option<&BalancerV2Pool>
pub fn get_v2_mut(&mut self) -> Option<&mut UniswapV2Pool>
pub fn get_v3_mut(&mut self) -> Option<&mut UniswapV3Pool>
pub fn get_maverick_mut(&mut self) -> Option<&mut MaverickPool>
pub fn get_curve_two_mut(&mut self) -> Option<&mut CurveTwoCryptoPool>
pub fn get_curve_tri_mut(&mut self) -> Option<&mut CurveTriCryptoPool>
pub fn get_balancer_mut(&mut self) -> Option<&mut BalancerV2Pool>
pub fn is_valid(&self) -> bool
pub fn update_token1_name(pool: &mut Pool, token1: String)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pool
impl<'de> Deserialize<'de> for Pool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PoolInfo for Pool
impl PoolInfo for Pool
fn address(&self) -> Address
fn token0_address(&self) -> Address
fn token1_address(&self) -> Address
fn token0_name(&self) -> String
fn token1_name(&self) -> String
fn token0_decimals(&self) -> u8
fn token1_decimals(&self) -> u8
fn pool_type(&self) -> PoolType
fn fee(&self) -> u32
fn stable(&self) -> bool
Auto Trait Implementations§
impl Freeze for Pool
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnwindSafe for Pool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more