degenbot.uniswap.trackers ========================= .. py:module:: degenbot.uniswap.trackers .. autoapi-nested-parse:: Uniswap pool and factory trackers for event-driven updates. Module Contents --------------- .. py:class:: DeploymentOverrides Optional CREATE2 deployment values that override registry resolution. .. py:attribute:: deployer_address :type: degenbot.types.chain.ChecksummedAddress | str | None :value: None .. py:attribute:: pool_init_hash :type: str | None :value: None .. py:class:: 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: :py:obj:`degenbot.types.abstract.AbstractPoolTracker`\ [\ :py:obj:`Pool`\ ] AbstractUniswapV2PoolTracker class. .. py:method:: 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. :raises PoolCreationFailed: If the pool could not be built. .. py:class:: UniswapV2PoolTracker Bases: :py:obj:`AbstractUniswapV2PoolTracker`\ [\ :py:obj:`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. .. py:property:: pool_init_hash :type: str Pool init hash. :returns: The pool init hash string. .. py:method:: get_pool_from_tokens(token_addresses: tuple[str, str], *, silent: bool = False) -> degenbot.uniswap.v2_liquidity_pool.UniswapV2Pool Get a pool by its token addresses. :returns: The pool instance. .. py:class:: 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: :py:obj:`degenbot.types.abstract.AbstractPoolTracker`\ [\ :py:obj:`Pool`\ ] AbstractUniswapV3PoolTracker class. .. py:method:: 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. :raises PoolCreationFailed: If the pool could not be built. .. py:method:: unload_snapshot() -> None Drop the snapshot reference so it can be garbage-collected. .. py:property:: snapshot :type: degenbot.uniswap.v3_snapshot.UniswapV3LiquiditySnapshot | None The snapshot, if loaded. .. py:class:: UniswapV3PoolTracker Bases: :py:obj:`AbstractUniswapV3PoolTracker`\ [\ :py:obj:`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. .. py:method:: 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.