$npx -y skills add Uniswap/uniswap-ai --skill configuratorConfigure CCA (Continuous Clearing Auction) smart contract parameters through an interactive bulk form flow. Use when user says "configure auction", "cca auction", "setup token auction", "auction configuration", "continuous auction", or mentions CCA contracts.
| 1 | # CCA Configuration |
| 2 | |
| 3 | Configure Continuous Clearing Auction (CCA) smart contract parameters for fair and transparent token distribution. |
| 4 | |
| 5 | > **Runtime Compatibility:** This skill uses `AskUserQuestion` for interactive prompts. If `AskUserQuestion` is not available in your runtime, collect the same parameters through natural language conversation instead. |
| 6 | |
| 7 | ## Instructions for Claude Code |
| 8 | |
| 9 | When the user invokes this skill, guide them through a **bulk interactive form configuration flow** using AskUserQuestion. Collect parameters in batches to minimize user interaction rounds. |
| 10 | |
| 11 | ### Bulk Interactive Form Rules |
| 12 | |
| 13 | 1. **Batch questions** - Ask up to 4 questions at once using a single AskUserQuestion call |
| 14 | 2. **Allow direct input** - For fields requiring custom values (addresses, numbers): |
| 15 | - Provide a "Not available yet" or "Skip for now" option |
| 16 | - The "Other" option (automatically provided) allows direct custom input |
| 17 | - **NEVER** ask "Do you have X?" as a separate question |
| 18 | 3. **Store answers** - Keep track of all collected values in a configuration object |
| 19 | 4. **Validate after collection** - After each batch, validate all inputs before proceeding |
| 20 | 5. **Show progress** - After each batch, show which parameters are collected and which remain |
| 21 | |
| 22 | ### Configuration Flow |
| 23 | |
| 24 | Collect parameters in these batches: |
| 25 | |
| 26 | #### Batch 1: Task Selection (1 question) |
| 27 | |
| 28 | **Question 1: Task Type** |
| 29 | |
| 30 | - Prompt: "What would you like to do with CCA?" |
| 31 | - Options: "Configure auction parameters", "Generate supply schedule only", "Review existing config", "Deploy existing config" |
| 32 | |
| 33 | **After collection:** If not "Configure auction parameters", skip to appropriate section. |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | #### Batch 2: Basic Configuration (4 questions) |
| 38 | |
| 39 | **Question 1: Network** |
| 40 | |
| 41 | - Prompt: "Which network to deploy on?" |
| 42 | - Options: "Ethereum Mainnet", "Unichain (Mainnet)", "Unichain Sepolia (Testnet)", "Base", "Arbitrum", "Sepolia" |
| 43 | - Store: `chainId`, `blockTime`, `rpcUrl`, `currencyDecimals` (for selected currency) |
| 44 | |
| 45 | **Question 2: Token Address** |
| 46 | |
| 47 | - Prompt: "Token to be auctioned?" |
| 48 | - Options: "Token not deployed yet" (placeholder), Custom address (via "Other") |
| 49 | - Validation: Must be 42 chars starting with 0x |
| 50 | - Store: `token` |
| 51 | |
| 52 | **Question 3: Total Supply** |
| 53 | |
| 54 | - Prompt: "How many tokens to auction?" |
| 55 | - Options: "100 million tokens (18 decimals)", "1 billion tokens (18 decimals)", "10 billion tokens (18 decimals)", Custom (via "Other") |
| 56 | - Validation: Must be <= 1e30 wei |
| 57 | - Store: `totalSupply` |
| 58 | |
| 59 | **Question 4: Currency** |
| 60 | |
| 61 | - Prompt: "What currency should bidders use?" |
| 62 | - Options: "ETH (Native)", "USDC on [network]", "USDT on [network]", Custom ERC20 (via "Other") |
| 63 | - Validation: Must be 42 chars starting with 0x or address(0) |
| 64 | - Store: `currency` |
| 65 | |
| 66 | **After collection:** Validate all inputs, show summary of basic configuration. |
| 67 | |
| 68 | --- |
| 69 | |
| 70 | #### Batch 3: Timing & Pricing (4 questions) |
| 71 | |
| 72 | **Question 1: Auction Duration** |
| 73 | |
| 74 | - Prompt: "How long should the auction run?" |
| 75 | - Options: "1 day", "2 days", "3 days", "7 days", Custom blocks (via "Other") |
| 76 | - Calculate blocks based on network block time |
| 77 | - Store: `auctionBlocks` |
| 78 | |
| 79 | **Question 2: Prebid Period** |
| 80 | |
| 81 | - Prompt: "Include a prebid period? (time when no tokens are sold)" |
| 82 | - Options: "No prebid period (0 blocks)", "12 hours", "1 day", Custom blocks (via "Other") |
| 83 | - Calculate blocks based on network block time |
| 84 | - Store: `prebidBlocks` |
| 85 | |
| 86 | **Question 3: Floor Price** |
| 87 | |
| 88 | - Prompt: "Starting floor price? (ratio of currency per token)" |
| 89 | - Options: "0.10x (10% of 1:1 ratio)", "0.01x (1% of 1:1 ratio)", "0.001x (0.1% of 1:1 ratio)", Custom ratio (via "Other") |
| 90 | - Calculate Q96 value accounting for decimal differences: `Q96 * ratio / 10^(tokenDecimals - currencyDecimals)` |
| 91 | - For USDC (6 decimals) and 18-decimal token: `Q96 * ratio / 10^12` |
| 92 | - For native ETH (18 decimals) and 18-decimal token: `Q96 * ratio / 10^0 = Q96 * ratio` |
| 93 | - Store: `floorPriceRatio`, `floorPrice` (Q96), `tokenDecimals`, `currencyDecimals` |
| 94 | |
| 95 | **Question 4: Tick Spacing** |
| 96 | |
| 97 | - Prompt: "Tick spacing as percentage of floor price?" |
| 98 | - Options: "1% of floor price (Recommended)", "10% of floor price", "0.1% of floor price", Custom percentage (via "Other") |
| 99 | - Calculate: `tickSpacing = int(floorPrice * percentage)` |
| 100 | - **CRITICAL**: Round floor price DOWN to be evenly divisible by tick spacing: |
| 101 | - `roundedFloorPrice = (floorPrice // tickSpacing) * tickSpacing` |
| 102 | - Verify: `roundedFloorPrice % tickSpacing == 0` must be true |
| 103 | - Validate: Tick spacing must be >= 1 basis point of floor price |
| 104 | - Store: `tic |