degenbot.uniswap.trackers¶
Uniswap pool and factory trackers for event-driven updates.
Module Contents¶
- class degenbot.uniswap.trackers.DeploymentOverrides¶
Optional CREATE2 deployment values that override registry resolution.
- deployer_address: degenbot.types.chain.ChecksummedAddress | str | None = None¶
- class degenbot.uniswap.trackers.AbstractUniswapV2PoolTracker[Pool: degenbot.uniswap.v2_liquidity_pool.UniswapV2Pool](factory_address: str, bot: degenbot.bot.Bot, *, chain_id: degenbot.types.aliases.ChainId | None = None, deployer_address: degenbot.types.chain.ChecksummedAddress | str | None = None, pool_init_hash: str | None = None)¶
Bases:
degenbot.types.abstract.AbstractPoolTracker[Pool]AbstractUniswapV2PoolTracker class.
- get_pool(pool_address: degenbot.types.chain.ChecksummedAddress | str, *, silent: bool = False) Pool¶
Get a pool from its address.
If the pool is already tracked or found in the global registry, that instance will be returned. Otherwise, a new one will be built.
- Returns:
The pool instance.
- Raises:
PoolNotAssociated – If the pool is not associated with this tracker.
PoolCreationFailed – If the pool could not be built.
- class degenbot.uniswap.trackers.UniswapV2PoolTracker¶
Bases:
AbstractUniswapV2PoolTracker[degenbot.uniswap.v2_liquidity_pool.UniswapV2Pool]A class that generates and tracks concrete instances of a Uniswap V2.
liquidity pool helper or one of its child classes.
- class degenbot.uniswap.trackers.AbstractUniswapV3PoolTracker[Pool: degenbot.uniswap.v3_liquidity_pool.UniswapV3Pool](factory_address: degenbot.types.chain.ChecksummedAddress | str, bot: degenbot.bot.Bot, *, chain_id: degenbot.types.aliases.ChainId | None = None, overrides: DeploymentOverrides | None = None, snapshot: degenbot.uniswap.v3_snapshot.UniswapV3LiquiditySnapshot | None = None)¶
Bases:
degenbot.types.abstract.AbstractPoolTracker[Pool]AbstractUniswapV3PoolTracker class.
- get_pool(pool_address: degenbot.types.chain.ChecksummedAddress | str, *, silent: bool = False) Pool¶
Get a pool from its address.
If the pool is already tracked or found in the pool registry, that instance will be returned. Otherwise, a new one will be built via Bot.
- Returns:
The pool instance.
- Raises:
PoolNotAssociated – If the pool is not associated with this tracker.
PoolCreationFailed – If the pool could not be built.
- property snapshot: degenbot.uniswap.v3_snapshot.UniswapV3LiquiditySnapshot | None¶
The snapshot, if loaded.
- class degenbot.uniswap.trackers.UniswapV3PoolTracker¶
Bases:
AbstractUniswapV3PoolTracker[degenbot.uniswap.v3_liquidity_pool.UniswapV3Pool]A class that generates and tracks concrete instances of a Uniswap V3.
liquidity pool helper or one of its child classes.
- get_pool_from_tokens_and_fee(token_addresses: tuple[degenbot.types.chain.ChecksummedAddress | str, degenbot.types.chain.ChecksummedAddress | str], pool_fee: int, *, silent: bool = False) degenbot.uniswap.v3_liquidity_pool.UniswapV3Pool¶
Get a pool by its token addresses and fee.
- Returns:
The pool instance.