check_pending_swaps_on_pool
Monitors the public mempool on Polygon for pending swaps on a Uniswap v3 pool, detecting direct pool calls and single-hop router transactions.
Instructions
Watches the public mempool for pending transactions touching a given Uniswap v3 pool — either direct calls to the pool, or single-hop swaps routed through a known Uniswap v3 router (SwapRouter or SwapRouter02) whose calldata references both of the pool's tokens.
Polygon only — Arbitrum uses a centralized sequencer with no public mempool, so this isn't available there. See the README for details.
Note: only catches single-hop router swaps (exactInputSingle / exactOutputSingle). Multi-hop swaps (exactInput / exactOutput) encode the route as a packed path that isn't decoded yet — see roadmap.
Args: pool_address: the pool contract address (catches direct calls) token0: address of one of the pool's two tokens token1: address of the pool's other token chain: only "polygon" is currently supported duration_seconds: how long to watch, capped at 60 seconds (default 15)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | polygon | |
| token0 | Yes | ||
| token1 | Yes | ||
| pool_address | Yes | ||
| duration_seconds | No |