Install
openclaw skills install create-test-poolDeploy a custom Uniswap pool on the local testnet with configurable parameters. Create pools with specific conditions (thin liquidity, wide spreads, exact tick ranges) to test agent behavior under controlled scenarios. Requires a running local testnet.
openclaw skills install create-test-poolDeploys a custom Uniswap pool on the local testnet with exact parameters you specify. This lets you create controlled test environments -- thin liquidity pools, extreme price ranges, specific fee tiers -- to test how agents behave under edge conditions.
Why this is 10x better than doing it manually:
createAndInitializePoolIfNecessary, computing sqrtPriceX96, calculating tick ranges, approving tokens, and calling mint. This does it all with natural language.sqrtPriceX96 and tick range.get_pool_info to confirm state.Activate when the user says anything like:
Do NOT use when no testnet is running (use setup-local-testnet first), or when the user wants to interact with existing mainnet pools (use analyze-pool).
| Parameter | Required | Default | How to Extract |
|---|---|---|---|
| token0 | Yes | -- | First token: "WETH", "USDC", or a 0x address |
| token1 | Yes | -- | Second token: "USDC", "DAI", or a 0x address |
| version | No | v3 | "v2" or "v3" |
| fee | No | 3000 | Fee tier: 100 (0.01%), 500 (0.05%), 3000 (0.3%), 10000 (1%) |
| initialPrice | No | -- | Price of token0 in token1 terms (e.g. 2000 for ETH at $2000) |
| liquidityUsd | No | 1,000,000 | Dollar value of initial liquidity |
| tickLower | No | auto | V3 lower tick (advanced users only) |
| tickUpper | No | auto | V3 upper tick (advanced users only) |
If the tool returns TESTNET_NOT_RUNNING, tell the user:
No local testnet is running. Let me set one up first.
Then suggest using setup-local-testnet or offer to do it for them.
Parse the user's request carefully:
Common liquidity descriptions:
If the pool requires tokens the deployer might not have, call mcp__uniswap__fund_test_account first to ensure the deployer (account #1: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266) has sufficient tokens.
Call mcp__uniswap__deploy_mock_pool with the extracted parameters.
Present the deployed pool with full details:
Test Pool Deployed
Pool: WETH/USDC (V3, 0.05% fee)
Address: 0xNEW...
Price: 1 WETH = 2,000 USDC
Liquidity: ~$1,000,000
Tick Range: -204714 to -199514 (±50% around current price)
Token0: USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 (6 decimals)
Token1: WETH 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 (18 decimals)
Test Scenarios This Pool Enables:
- Swap testing: "Get a quote for 1 WETH → USDC"
- LP testing: "Add liquidity to the WETH/USDC pool"
- Price impact: "What's the price impact of swapping 100 WETH?"
- Time-dependent: "Advance 7 days and check fee accumulation"
Next Steps:
- Query pool state: "Get info on pool 0xNEW..."
- Test a swap against this pool
- Create another pool with different parameters
- Advance time to test fee accumulation: "Time travel 7 days"
createAndInitializePoolIfNecessary which sets the initial price.| Error | User-Facing Message | Suggested Action |
|---|---|---|
TESTNET_NOT_RUNNING | "No local testnet is running." | Run setup-local-testnet first |
TESTNET_TOKEN_NOT_FOUND | "Cannot resolve token X." | Use a well-known symbol or provide the 0x address |
TESTNET_CONTRACT_NOT_FOUND | "NonfungiblePositionManager not found on this chain." | Fork Ethereum mainnet which has all V3 contracts |
TESTNET_DEPLOY_POOL_FAILED | "Failed to deploy pool: {reason}" | Check token balances, fund deployer if needed |