uniswap_pool_id
Compute a Uniswap v4 poolId from a PoolKey by automatically sorting currencies to avoid pool lookup failures.
Instructions
Compute the Uniswap v4 poolId from a PoolKey. Currencies are sorted automatically — an unsorted key yields a different, non-existent poolId, which is the usual reason a pool 'cannot be found'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | Fee in hundredths of a bip (3000 = 0.30%) | |
| hooks | No | 0x0000000000000000000000000000000000000000 | |
| currency0 | Yes | Token address, or 0x0 for native ETH | |
| currency1 | Yes | ||
| tickSpacing | No |