degenbot.updater.pool_updater_configs¶
Parameterized pool creation event updaters.
Module Contents¶
- degenbot.updater.pool_updater_configs.UNISWAP_V3_MINT_EVENT_HASH¶
- degenbot.updater.pool_updater_configs.UNISWAP_V3_BURN_EVENT_HASH¶
- class degenbot.updater.pool_updater_configs.V2PoolUpdateConfig¶
Configuration for a V2-style pool creation event updater.
V2 PoolCreated events have: - topics[1]: token0 address - topics[2]: token1 address - topics[3]: (optional) stable bool (Aerodrome) - data: ABI-encoded (pool_address, ?)
- class degenbot.updater.pool_updater_configs.V3PoolUpdateConfig¶
Configuration for a V3-style pool creation event updater.
V3 PoolCreated events have: - topics[1]: token0 address - topics[2]: token1 address - topics[3]: fee (uint24) - data: ABI-encoded (tick_spacing, pool_address)
- class degenbot.updater.pool_updater_configs.V4PoolUpdateConfig¶
Configuration for a V4-style pool creation event updater.
V4 PoolCreated events have: - topics[1]: pool_hash (bytes32) - topics[2]: currency0 address - topics[3]: currency1 address - data: ABI-encoded (fee, tick_spacing, hooks)
- class degenbot.updater.pool_updater_configs.PoolUpdateRequest[ConfigT: V2PoolUpdateConfig | V3PoolUpdateConfig | V4PoolUpdateConfig]¶
Typed request for one pool-creation event update run.
Bundles the block bounds, Rust-backed exchange row, database path, decode config, and event-fetch callable so each updater shell takes a single argument.
- provider: degenbot.provider.AlloyProvider¶
- exchange: degenbot.db.ExchangeRow¶
- config: ConfigT¶
- get_events_fn: collections.abc.Callable[..., list[degenbot.types.rpc_types.LogReceipt]]¶
- degenbot.updater.pool_updater_configs.update_v2_pools(request: PoolUpdateRequest[V2PoolUpdateConfig]) None¶
Process V2-style pool creation events for a DEX.
- degenbot.updater.pool_updater_configs.update_v3_pools(request: PoolUpdateRequest[V3PoolUpdateConfig]) None¶
Process V3-style pool creation events for a DEX.
- degenbot.updater.pool_updater_configs.update_v4_pools(request: PoolUpdateRequest[V4PoolUpdateConfig]) None¶
Process V4-style pool creation events for a DEX.
- degenbot.updater.pool_updater_configs.apply_v3_liquidity_updates(provider: degenbot.provider.AlloyProvider, pool_address: str, liquidity_events: list[degenbot.types.rpc_types.LogReceipt], exchanges_in_scope: set[degenbot.db.ExchangeRow], *, database_path: str) None¶
Apply the V3 liquidity updates to the provided pool.
- degenbot.updater.pool_updater_configs.apply_v4_liquidity_updates(pool_id: bytes, liquidity_events: list[degenbot.types.rpc_types.LogReceipt], pool_manager: degenbot.db.PoolManagerRow, *, database_path: str) None¶
Apply the V4 liquidity updates to the provided pool.
V4 emits a single signed
ModifyLiquidityevent (no Burn/Mint split), so the decode unpacks(tick_lower, tick_upper, liquidity_delta, _)straight fromdata.Assumes the liquidity updates are ordered by block number + log index, ascending (the Rust apply enforces the ordering invariant).