degenbot.curve.trackers¶
Curve pool and registry trackers for event-driven updates.
Module Contents¶
- class degenbot.curve.trackers.CurveStableswapPoolTracker(*, bot: degenbot.bot.Bot, chain_id: degenbot.types.aliases.ChainId | None = None)¶
Bases:
degenbot.types.abstract.AbstractPoolTracker[degenbot.curve.curve_stableswap_liquidity_pool.CurveStableswapPool]Manages Curve StableSwap pool instances.
Tracks Curve pools by address, delegates construction to Bot.build_pool(), and supports registry-based discovery.
- get_pool(pool_address: degenbot.types.chain.ChecksummedAddress | str, *, silent: bool = False) degenbot.curve.curve_stableswap_liquidity_pool.CurveStableswapPool¶
Get a Curve pool from its address.
If the pool is already tracked, that instance is returned. If the pool is in the bot’s pool registry, it is tracked and returned. Otherwise, a new pool is built via Bot.build_pool().
- Returns:
The computed value.
- Raises:
PoolCreationFailed – See function documentation.
PoolNotAssociated – See function documentation.
- get_pools_for_token(token_address: degenbot.types.chain.ChecksummedAddress | str) list[degenbot.curve.curve_stableswap_liquidity_pool.CurveStableswapPool]¶
Return all tracked pools that contain the given token.
- Returns:
A list of results.