What you can do
| swap (simple, v3) | Swap an exact amount of one token for another through a single v3 pool | ERC-20 approve(SwapRouter02, amountIn), then SwapRouter02.exactInputSingle((tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, 0)). Get amountOutMinimum from QuoterV2.quoteExactInputSingle via eth_call minus slippage. |
| swap (best route, v2/v3/v4) | Swap across any Uniswap version via the UniversalRouter | ERC-20 approve(Permit2, amount); Permit2.approve(token, UniversalRouter, amount, expiration); UniversalRouter.execute(commands, inputs, deadline). Easiest: get the calldata from the Trading API /quote + /swap. |
| quote | Get the expected output for a swap without sending a transaction | eth_call QuoterV2.quoteExactInputSingle((tokenIn, tokenOut, amountIn, fee, 0)) for v3, or V4Quoter.quoteExactInputSingle((poolKey, zeroForOne, amount, hookData)) for v4. |
| add liquidity (v3) | Open a concentrated-liquidity position | approve both tokens to NonfungiblePositionManager, then mint((token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline)). Add more with increaseLiquidity. |
| remove liquidity / collect fees (v3) | Withdraw liquidity and fees from a v3 position NFT | NonfungiblePositionManager.multicall([decreaseLiquidity((tokenId, liquidity, amount0Min, amount1Min, deadline)), collect((tokenId, recipient, 2^128-1, 2^128-1))]). Fees only: collect alone. |
| add / remove liquidity (v4) | Manage a v4 position | approve tokens to Permit2, Permit2.approve(token, PositionManager, amount, expiration), then PositionManager.modifyLiquidities(abi.encode(actions, params), deadline) with MINT_POSITION/INCREASE_LIQUIDITY/DECREASE_LIQUIDITY + SETTLE_PAIR/TAKE_PAIR actions. |
| read pool state | Price, tick and liquidity of a pool | v3: UniswapV3Factory.getPool(tokenA, tokenB, fee) then pool.slot0() / pool.liquidity(). v4: StateView.getSlot0(poolId) / getLiquidity(poolId). |
| swap / add liquidity (v2) | Classic constant-product pools | approve UniswapV2Router02, then swapExactTokensForTokens(amountIn, amountOutMin, path, to, deadline) or addLiquidity(...). |
Addresses differ per chain: Uniswap's docs say integrators must not assume the same address across chains (e.g. Base, BNB, Avalanche and Unichain v3 contracts differ from Ethereum's).
Always set a minimum-output / maximum-input (slippage) and a deadline; swaps without them can be sandwiched by MEV bots.
QuoterV2 and V4Quoter quote functions are not view functions (they simulate and revert); call them with eth_call only, never as a transaction.
Concentrated liquidity (v3/v4) earns fees only while the price is inside the range and suffers impermanent loss; out-of-range positions hold a single token.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).UniswapV3Factoryfactory on ethereum0x1F98431c8aD98523631AE4a59f267346ea31F984
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on ethereum0xC36442b4a4522E871399CD717aBDD847Ab11FE88
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on ethereum0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on ethereum0x61fFE014bA17989E743c5F6cB21bF9697530B21e
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on ethereum0x000000000004444c5dc75cB358380D2e3dE08A90
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on ethereum0xbD216513d74C8cf14cf4747E6AaA6420FF64ee9e
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on ethereum0x99bd42B2B22e531f283b7F8a86dFf631EB16A9D1
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on ethereum0x7fFE42C4a5DEeA5b0feC41C94C136Cf115597227
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on ethereum0x66a9893cC07D91D95644AEDD05D03f95e1dBA8Af
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on ethereum0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on ethereum0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on ethereum0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.
UniswapV3Factoryfactory on base0x33128a8fC17869897dcE68Ed026d694621f6FDfD
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on base0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on base0x2626664c2603336E57B271c5C0b26F421741e481
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on base0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on base0x498581fF718922c3f8e6A244956aF099B2652b2b
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on base0x7C5f5A4bBd8fD63184577525326123B519429bDc
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on base0xE1A6C5803e3c44368b171BD680c7D32dfc92CA47
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on base0xA3c0c9b65baD0b08107Aa264b0f3dB444b867A71
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on base0x6fF5693b99212Da76ad316178A184AB56D299b43
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on base0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on base0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on base0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.
UniswapV3Factoryfactory on arbitrum0x1F98431c8aD98523631AE4a59f267346ea31F984
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on arbitrum0xC36442b4a4522E871399CD717aBDD847Ab11FE88
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on arbitrum0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on arbitrum0x61fFE014bA17989E743c5F6cB21bF9697530B21e
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on arbitrum0x360E68faCcca8cA495c1B759Fd9EEe466db9FB32
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on arbitrum0xd88F38F930b7952f2DB2432Cb002E7abbF3dD869
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on arbitrum0x8928074CA1b241D8Ec02815881c1Af11E8bC5219
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on arbitrum0x76Fd297e2D437cd7f76d50F01AfE6160f86e9990
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on arbitrum0xA51afAFe0263b40EdaEf0Df8781eA9aa03E381a3
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on arbitrum0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on arbitrum0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on arbitrum0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.
UniswapV3Factoryfactory on optimism0x1F98431c8aD98523631AE4a59f267346ea31F984
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on optimism0xC36442b4a4522E871399CD717aBDD847Ab11FE88
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on optimism0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on optimism0x61fFE014bA17989E743c5F6cB21bF9697530B21e
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on optimism0x9a13F98Cb987694C9F086b1F5eB990EeA8264Ec3
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on optimism0x3C3Ea4B57a46241e54610e5f022E5c45859A1017
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on optimism0xd673F731EDFe5AaF1bDa7FD43D13Bbb5150B87Ca
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on optimism0xc18a3169788F4F75A170290584ECA6395C75Ecdb
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on optimism0x851116D9223fabED8E56C0E6b8Ad0c31d98B3507
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on optimism0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on optimism0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on optimism0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.
UniswapV3Factoryfactory on polygon0x1F98431c8aD98523631AE4a59f267346ea31F984
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on polygon0xC36442b4a4522E871399CD717aBDD847Ab11FE88
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on polygon0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on polygon0x61fFE014bA17989E743c5F6cB21bF9697530B21e
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on polygon0x67366782805870060151383F4BbFF9daB53e5cD6
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on polygon0x1Ec2eBf4F37E7363FDfe3551602425af0B3ceef9
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on polygon0x31AB0Dea31FC0ad5A54F03cD59C896eCD067447B
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on polygon0x5eA1bD7974c8A611cBAB0bDCAFcB1D9CC9b3BA5a
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on polygon0x1095692A6237d83C6a72F3F5eFEdb9A670C49223
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on polygon0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on polygon0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on polygon0xedf6066a2b290C185783862C7F4776A2C8077AD1
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.
UniswapV3Factoryfactory on bnb0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on bnb0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on bnb0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on bnb0x78D78E420Da98ad378D7799bE8f4AF69033EB077
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on bnb0x28e2Ea090877bF75740558f6BFB36A5ffeE9e9dF
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on bnb0x7A4a5c919aE2541AeD11041A1AEeE68f1287f95b
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on bnb0x95C086d7fE28AdD842ee220fef225a777474d781
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on bnb0xd13Dd3D6E93f276FAfc9Db9E6BB47C1180aeE0c4
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on bnb0x1906c1d672b88cD1B9aC7593301cA990F94Eae07
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on bnb0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on bnb0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on bnb0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.
UniswapV3Factoryfactory on unichain0x1F98400000000000000000000000000000000003
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on unichain0x943e6e07a7E8E791dAFC44083e54041D743C46E9
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on unichain0x73855d06DE49d0fe4A9c42636Ba96c62da12FF9C
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on unichain0x385A5cf5F83e99f7BB2852b6A19C3538b9FA7658
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on unichain0x1F98400000000000000000000000000000000004
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on unichain0x4529A01c7A0410167c5740C487A8DE60232617bf
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on unichain0xF885781cB68A0BE66AA2AC7eDa5Fe72Bde7dA907
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on unichain0x86e8631A016F9068C3f085fAF484Ee3F5fDee8f2
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on unichain0xEf740bf23aCaE26f6492B10de645D6B98dC8Eaf3
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on unichain0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on unichain0x1F98400000000000000000000000000000000002
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on unichain0x284F11109359a7e1306C3e447ef14D38400063FF
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.
UniswapV3Factoryfactory on avalanche0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD
read getPool(address,address,uint24)
Pool address for a token pair and fee tier (fee in hundredths of a bip: 100, 500, 3000, 10000). Returns zero address if none.
write createPool(address,address,uint24)
Deploy a new v3 pool for a pair and enabled fee tier (pool must then be initialized with a price).
read feeAmountTickSpacing(uint24)
Tick spacing for a fee tier; 0 means the fee tier is not enabled.
NonfungiblePositionManager (v3)other on avalanche0x655C406EBFa14EE2006250925e54ec43AD184f8B
write mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))
Open a new concentrated-liquidity position NFT. Params: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. token0 < token1 by address; ticks must be multiples of the tick spacing. Approve both tokens to this contract first.
write increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))
Add liquidity to an existing position. Params: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
write decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))
Remove liquidity from a position. Params: tokenId, liquidity, amount0Min, amount1Min, deadline. Tokens are credited as owed; call collect to actually withdraw them.
write collect((uint256,address,uint128,uint128))
Withdraw owed tokens (fees plus decreased liquidity). Params: tokenId, recipient, amount0Max, amount1Max (use 2^128-1 to collect all).
write burn(uint256)
Burn a position NFT; it must have zero liquidity and nothing left to collect.
write createAndInitializePoolIfNecessary(address,address,uint24,uint160)
Create and initialize a pool at sqrtPriceX96 if it does not exist yet (usually batched with mint via multicall).
write multicall(bytes[])
Batch several calls (e.g. decreaseLiquidity + collect, or mint + refundETH) in one transaction.
read positions(uint256)
Position details: nonce, operator, token0, token1, fee, tickLower, tickUpper, liquidity, feeGrowthInside0/1LastX128, tokensOwed0, tokensOwed1.
read balanceOf(address)
Number of v3 position NFTs owned by an address.
read tokenOfOwnerByIndex(address,uint256)
Enumerate an owner's position token IDs.
SwapRouter02router on avalanche0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE
write exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap an exact amount in through one v3 pool. Params: tokenIn, tokenOut, fee, recipient, amountIn, amountOutMinimum, sqrtPriceLimitX96 (0 = no limit). SwapRouter02 has no deadline in the struct; use multicall(uint256 deadline, bytes[]) for a deadline. Approve tokenIn to the router first.
write exactInput((bytes,address,uint256,uint256))
Multi-hop exact-input swap. Params: path (abi.encodePacked tokenIn, fee, token, fee, tokenOut), recipient, amountIn, amountOutMinimum.
write exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))
Swap for an exact amount out through one pool. Params: tokenIn, tokenOut, fee, recipient, amountOut, amountInMaximum, sqrtPriceLimitX96.
write exactOutput((bytes,address,uint256,uint256))
Multi-hop exact-output swap. Params: path (reversed: tokenOut first), recipient, amountOut, amountInMaximum.
write swapExactTokensForTokens(uint256,uint256,address[],address)
Uniswap v2-pool swap via SwapRouter02. Params: amountIn, amountOutMin, path, to.
write multicall(uint256,bytes[])
Batch calls with a deadline (unix seconds), e.g. swap + unwrapWETH9.
write unwrapWETH9(uint256,address)
Unwrap WETH held by the router to native ETH and send it (amountMinimum, recipient); use after a swap to WETH with recipient = router.
write refundETH()
Return any unused native ETH sent with the call.
QuoterV2 (v3)other on avalanche0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F
read quoteExactInputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-input swap. Params: tokenIn, tokenOut, amountIn, fee, sqrtPriceLimitX96. Returns amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate. Not a view function: call it with eth_call / staticcall, never send it as a transaction.
read quoteExactInput(bytes,uint256)
Quote a multi-hop exact-input swap (path, amountIn). Use eth_call.
read quoteExactOutputSingle((address,address,uint256,uint24,uint160))
Quote a single-pool exact-output swap. Params: tokenIn, tokenOut, amount, fee, sqrtPriceLimitX96. Use eth_call.
read quoteExactOutput(bytes,uint256)
Quote a multi-hop exact-output swap (reversed path, amountOut). Use eth_call.
PoolManager (v4)pool on avalanche0x06380C0e0912312B5150364B9DC4542BA0DbBc85
write initialize((address,address,uint24,int24,address),uint160)
Create a v4 pool. PoolKey: currency0, currency1 (address(0) = native ETH; currency0 < currency1), fee, tickSpacing, hooks; then sqrtPriceX96. Returns the initial tick.
write unlock(bytes)
Entry point for all swaps/liquidity changes (flash accounting). Only callable by contracts implementing unlockCallback; agents should use PositionManager or UniversalRouter instead.
read extsload(bytes32)
Read raw pool storage. Use the StateView contract for decoded reads.
PositionManager (v4)other on avalanche0xB74b1F14d2754AcfcbBe1a221023a5cf50Ab8ACD
write modifyLiquidities(bytes,uint256)
Main v4 liquidity entry point. unlockData = abi.encode(bytes actions, bytes[] params), e.g. actions MINT_POSITION + SETTLE_PAIR, INCREASE_LIQUIDITY, DECREASE_LIQUIDITY + TAKE_PAIR (fees are collected by DECREASE_LIQUIDITY with 0 liquidity), BURN_POSITION; second arg is the deadline. Tokens are pulled via Permit2, so approve tokens to Permit2 and Permit2-approve this PositionManager first.
write initializePool((address,address,uint24,int24,address),uint160)
Initialize a v4 pool (PoolKey, sqrtPriceX96); can be batched with modifyLiquidities via multicall.
write multicall(bytes[])
Batch calls, e.g. initializePool + modifyLiquidities, or permit + modifyLiquidities.
read getPoolAndPositionInfo(uint256)
PoolKey and packed position info (tickLower, tickUpper, poolId) for a tokenId.
read getPositionLiquidity(uint256)
Current liquidity of a position tokenId.
read nextTokenId()
Token ID the next minted position will receive.
read ownerOf(uint256)
Owner of a v4 position NFT.
V4Quoterother on avalanche0xf27e532878B622d6b916F524E8711880107D4eF0
read quoteExactInputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-input swap. Params: (PoolKey, zeroForOne, exactAmount, hookData). Returns amountOut, gasEstimate. Not a view: call with eth_call only.
read quoteExactInput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-input swap. Params: (exactCurrency, PathKey[] {intermediateCurrency, fee, tickSpacing, hooks, hookData}, exactAmount). Use eth_call.
read quoteExactOutputSingle(((address,address,uint24,int24,address),bool,uint128,bytes))
Quote a single-pool v4 exact-output swap. Returns amountIn, gasEstimate. Use eth_call.
read quoteExactOutput((address,(address,uint24,int24,address,bytes)[],uint128))
Quote a multi-hop v4 exact-output swap. Use eth_call.
StateView (v4)other on avalanche0xc3c9e198C735a4b97e3e683f391cCBDD60B69286
read getSlot0(bytes32)
Pool state by poolId (keccak256(abi.encode(PoolKey))): sqrtPriceX96, tick, protocolFee, lpFee.
read getLiquidity(bytes32)
Active in-range liquidity of a v4 pool.
read getPositionInfo(bytes32,address,int24,int24,bytes32)
Position info (liquidity, feeGrowthInside0/1LastX128) by poolId, owner (the PositionManager for NFT positions), tickLower, tickUpper, salt (bytes32(tokenId) for PositionManager positions).
read getPositionLiquidity(bytes32,bytes32)
Liquidity of a position by poolId and positionId.
read getTickInfo(bytes32,int24)
Tick data: liquidityGross, liquidityNet, feeGrowthOutside0/1X128.
read getFeeGrowthGlobals(bytes32)
Global fee growth for both currencies of a pool.
read getFeeGrowthInside(bytes32,int24,int24)
Fee growth inside a tick range, used to compute uncollected fees.
UniversalRouterrouter on avalanche0x94b75331AE8d42C1b61065089B7d48FE14aA73b7
write execute(bytes,bytes[],uint256)
Run a sequence of commands (one byte each: e.g. V3_SWAP_EXACT_IN 0x00, V2_SWAP_EXACT_IN 0x08, V4_SWAP 0x10, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, PERMIT2_PERMIT 0x0a, SWEEP 0x04) with ABI-encoded inputs per command and a deadline. Routes across v2, v3 and v4. Tokens are pulled through Permit2: approve token to Permit2, then Permit2.approve(token, UniversalRouter, amount, expiration) or include a PERMIT2_PERMIT command.
write execute(bytes,bytes[])
Same as above without a deadline.
Permit2other on avalanche0x000000000022D473030F116dDEE9F6B43aC78BA3
write approve(address,address,uint160,uint48)
AllowanceTransfer approval: (token, spender, amount, expiration). Lets a spender such as UniversalRouter or v4 PositionManager pull the token through Permit2. Requires a prior ERC-20 approve(token -> Permit2).
read allowance(address,address,address)
Current Permit2 allowance for (owner, token, spender): amount, expiration, nonce.
write permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)
Set an allowance with an EIP-712 signature: (owner, PermitSingle {details {token, amount, expiration, nonce}, spender, sigDeadline}, signature).
write lockdown((address,address)[])
Emergency: revoke allowances for a list of (token, spender) pairs.
write invalidateNonces(address,address,uint48)
Invalidate outstanding signed permits for (token, spender) by raising the nonce.
read DOMAIN_SEPARATOR()
EIP-712 domain separator for signing permits on this chain.
UniswapV2Factoryfactory on avalanche0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C
read getPair(address,address)
v2 pair address for two tokens; zero address if none.
write createPair(address,address)
Deploy a new v2 pair.
read allPairsLength()
Total number of v2 pairs.
UniswapV2Router02router on avalanche0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24
write swapExactTokensForTokens(uint256,uint256,address[],address,uint256)
Swap exact tokens in along a v2 path: amountIn, amountOutMin, path, to, deadline. Approve the router first.
write swapExactETHForTokens(uint256,address[],address,uint256)
Swap exact native ETH (msg.value) for tokens: amountOutMin, path (starts with WETH), to, deadline.
write swapExactTokensForETH(uint256,uint256,address[],address,uint256)
Swap exact tokens for native ETH: amountIn, amountOutMin, path (ends with WETH), to, deadline.
write addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)
Add v2 liquidity: tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline.
write addLiquidityETH(address,uint256,uint256,uint256,address,uint256)
Add v2 liquidity with native ETH (msg.value): token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline.
write removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)
Burn LP tokens for the underlying tokens: tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline. Approve the pair (LP token) to the router first.
read getAmountsOut(uint256,address[])
Quote output amounts along a v2 path.