MCPInstall

deployer

Deploy CCA (Continuous Clearing Auction) smart contracts using the Factory pattern. Use when user says "deploy auction", "deploy cca", "factory deployment", or wants to deploy a configured auction.

Installs
1.1K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/uniswap/uniswap-ai --skill deployer
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads deployer automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

CCA Deployment

Deploy Continuous Clearing Auction (CCA) smart contracts using the ContinuousClearingAuctionFactory with CREATE2 for consistent addresses across chains.

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.

Instructions for Claude Code

When the user invokes this skill, guide them through the CCA deployment process with appropriate safety warnings and validation.

Pre-Deployment Requirements

Before proceeding with deployment, you MUST:

  1. Show educational disclaimer and get user acknowledgment
  2. Validate configuration file if provided
  3. Verify factory address for the target network
  4. Confirm deployment parameters with user

Deployment Workflow

  1. Show Educational Disclaimer (REQUIRED)
  2. Load or Request Configuration
  3. Validate Configuration
  4. Display Deployment Plan
  5. Get User Confirmation
  6. Provide Deployment Commands
  7. Post-Deployment Steps

⚠️ Educational Use Disclaimer

IMPORTANT: Before proceeding with deployment, you must acknowledge:

This tool and all deployment instructions are provided for educational purposes only. AI-generated deployment commands may contain errors or security vulnerabilities.

You must:

  1. ✅ Review all configurations carefully before deploying
  2. ✅ Verify all parameters (addresses, pricing, schedules) are correct
  3. ✅ Test on testnets first before deploying to mainnet
  4. ✅ Audit your contracts before deploying with real funds

Use AskUserQuestion to confirm the user acknowledges these warnings before proceeding with deployment steps.

Input Validation Rules

Before interpolating ANY user-provided value into forge/cast commands or deployment scripts:

  • Ethereum addresses: MUST match ^0x[a-fA-F0-9]{40}$ — reject otherwise
  • Chain IDs: MUST be from the supported chains list (1, 130, 1301, 8453, 42161, 11155111)
  • Numeric values (supply, prices, blocks, chain IDs): MUST be non-negative and match ^[0-9]+\.?[0-9]*$
  • RPC endpoint URL ($RPC_URL): MUST be https://-scheme and MUST NOT contain any metacharacter or whitespace from the rule below. This value does not come from the configuration file, the user supplies it during the walkthrough, and it reaches --rpc-url on every forge script, cast send, and forge verify-contract command below. "It came from the user, not the config" is not an exemption. Validate it the first time it is supplied, assign it to $RPC_URL, and reference only that variable afterwards; never re-read a raw URL into a later command. An endpoint whose URL needs a query string (a provider API key, for example) is exported into the environment out of band and referenced as $RPC_URL, never pasted into command text.
  • REJECT any input containing shell metacharacters or whitespace: ;, |, &, $, `, (, ), >, <, \, ', ", spaces, tabs, newlines. $(...) and backticks execute even inside double quotes, and a space splits one value into extra forge/cast flags, so neither is ever safe to interpolate. Abort and report which value and which character failed rather than stripping the offending characters and continuing.
  • Never pass raw user input directly to shell commands without validation
  • Always double-quote every interpolation in a generated command (write --rpc-url "$RPC_URL", never the bare unquoted form). Quoting is the second layer, not the first: validate the value before it reaches the command, then quote it as well.

⚠️ Permission Safety

Do NOT auto-approve Bash(forge:*) or Bash(cast:*) in your Claude Code settings. Always require per-invocation approval for commands that spend gas or broadcast transactions. The PreToolUse hooks in .claude/hooks/ provide programmatic validation as a safety net, but user approval per command is the primary control.


🔐 Private Key Security

CRITICAL: Handling private keys safely is essential for secure deployments.

⚠️ Never Do These

  • ❌ Never store private keys in git repositories or config files
  • ❌ Never paste private keys directly in command line (visible in shell history)
  • ❌ Never share private keys or store them in shared environments
  • ❌ Never use mainnet private keys on untrusted computers
  • ❌ Never use --private-key flag (blocked by PreToolUse hook)

✅ Recommended Practices

Option 1: Hardware Wallets (Most Secure)

Use Ledger or Trezor hardware wallets with the --ledger flag:

forge script script/Example.s.sol:ExampleScript \
  --rpc-url "$RPC_URL" \
  --broadcast \
  --ledger

Option 2: Encrypted Keystore

Create an encrypted keystore with cast wallet import:

# Import private key to encrypted keystore (one-time setup)
cast wallet import deployer --interactive

# Use keystore for deployment
forge script script/Example.s.sol:ExampleScript \
  --rpc-url "$RPC_URL" \
  --broadcast \
  --account deployer \
  --sender "$DEPLOYER_ADDRESS"

Option 3: Environment Variables (For Testing Only)

If using environment variables, ensure they are:

  • Set in a secure .env file (never committed to git)
  • Loaded via source .env or dotenv
  • Only used on trusted, secure computers
  • Use testnet keys for development

Example:

# .env file (add to .gitignore)
PRIVATE_KEY=0x...
RPC_URL=https://...

# Load environment
source .env

# Deploy (use encrypted keystore instead of --private-key)
cast wallet import deployer --interactive
forge script ... --account deployer --sender "$DEPLOYER_ADDRESS"

Testnet First

Always test on testnets before mainnet:

  • Sepolia (testnet): Get free ETH from faucets
  • Base Sepolia: Free ETH for testing on Base
  • Deploy and verify full workflow on testnet
  • Only deploy to mainnet after thorough testing

Deployment Guide

Factory Deployment

CCA instances are deployed via the ContinuousClearingAuctionFactory contract, which uses CREATE2 for consistent addresses across chains.

Factory Addresses

VersionAddressStatus
v1.1.00xCCccCcCAE7503Cac057829BF2811De42E16e0bD5Recommended

Deploying an Auction Instance

Step 0: Clone the CCA Repository

If you don't already have the CCA contracts locally, clone the repository and install dependencies:

git clone https://github.com/Uniswap/continuous-clearing-auction.git
cd continuous-clearing-auction
forge install

This gives you access to the deployment scripts, contract ABIs, and test helpers referenced in later steps.

Step 1: Prepare Configuration

Ensure you have a valid configuration file (generated via the configurator skill or manually created).

Example configuration file structure:

{
  "1": {
    "token": "0x...",
    "totalSupply": 1e29,
    "currency": "0x0000000000000000000000000000000000000000",
    "tokensRecipient": "0x...",
    "fundsRecipient": "0x...",
    "startBlock": 24321000,
    "endBlock": 24327001,
    "claimBlock": 24327001,
    "tickSpacing": 79228162514264337593543950,
    "validationHook": "0x0000000000000000000000000000000000000000",
    "floorPrice": 7922816251426433759354395000,
    "requiredCurrencyRaised": 0,
    "supplySchedule": [
      { "mps": 1000, "blockDelta": 6000 },
      { "mps": 4000000, "blockDelta": 1 }
    ]
  }
}

Step 2: Validate Configuration

Before deployment, verify the configuration passes all validation rules (see Validation Rules section).

Step 3: Deploy via Factory

The factory has a simple interface:

function initializeDistribution(
    address token,
    uint256 amount,
    bytes calldata configData,
    bytes32 salt
) external returns (IDistributionContract);

Where:

  • token: Address of the token to be sold
  • amount: Amount of tokens to sell in the auction
  • configData: ABI-encoded AuctionParameters struct
  • salt: Optional bytes32 value for vanity address mining

Step 3.5: Encode Configuration to configData

The factory's initializeDistribution expects configData as ABI-encoded AuctionParameters. Convert your JSON config to encoded bytes:

Using cast (Foundry CLI):

# Encode the AuctionParameters struct
cast abi-encode "initializeDistribution(address,uint256,bytes,bytes32)" \
  "$TOKEN_ADDRESS" \
  "$TOTAL_SUPPLY" \
  "$(cast abi-encode "(address,address,address,uint64,uint64,uint64,uint256,address,uint256,uint128,bytes)" \
    "$CURRENCY" \
    "$TOKENS_RECIPIENT" \
    "$FUNDS_RECIPIENT" \
    "$START_BLOCK" \
    "$END_BLOCK" \
    "$CLAIM_BLOCK" \
    "$TICK_SPACING" \
    "$VALIDATION_HOOK" \
    "$FLOOR_PRICE" \
    "$REQUIRED_CURRENCY_RAISED" \
    "$ENCODED_SUPPLY_SCHEDULE")" \
  "0x0000000000000000000000000000000000000000000000000000000000000000"

Using a Foundry Script:

// script/DeployAuction.s.sol
pragma solidity ^0.8.24;

import "forge-std/Script.sol";

interface ICCAFactory {
    function initializeDistribution(
        address token,
        uint256 amount,
        bytes calldata configData,
        bytes32 salt
    ) external returns (address);
}

contract DeployAuction is Script {
    function run() external {
        // Load config values
        address token = vm.envAddress("TOKEN");
        uint256 amount = vm.envUint("TOTAL_SUPPLY");

        // Encode AuctionParameters
        bytes memory configData = abi.encode(
            vm.envAddress("CURRENCY"),
            vm.envAddress("TOKENS_RECIPIENT"),
            vm.envAddress("FUNDS_RECIPIENT"),
            uint64(vm.envUint("START_BLOCK")),
            uint64(vm.envUint("END_BLOCK")),
            uint64(vm.envUint("CLAIM_BLOCK")),
            vm.envUint("TICK_SPACING"),
            vm.envAddress("VALIDATION_HOOK"),
            vm.envUint("FLOOR_PRICE"),
            uint128(vm.envUint("REQUIRED_CURRENCY_RAISED")),
            vm.envBytes("ENCODED_SUPPLY_SCHEDULE")
        );

        vm.startBroadcast();

        // Approve token transfer to factory
        IERC20(token).approve(
            0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5,
            amount
        );

        // Deploy auction
        address auction = ICCAFactory(
            0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5
        ).initializeDistribution(
            token,
            amount,
            configData,
            bytes32(0) // salt
        );

        vm.stopBroadcast();

        console.log("Auction deployed at:", auction);
    }
}

Important: You must approve the token transfer to the factory before calling initializeDistribution. The factory will transfer amount tokens from your address to the newly created auction contract.

Step 4: Using Foundry Script

# Deploy factory (if needed on new network)
forge script script/deploy/DeployContinuousAuctionFactory.s.sol:DeployContinuousAuctionFactoryScript \
  --rpc-url "$RPC_URL" \
  --broadcast \
  --account deployer --sender "$DEPLOYER_ADDRESS"

# Deploy auction instance
forge script script/Example.s.sol:ExampleScript \
  --rpc-url "$RPC_URL" \
  --broadcast \
  --account deployer --sender "$DEPLOYER_ADDRESS"

Step 5: Post-Deployment

After deployment, you must call onTokensReceived() to notify the auction that tokens have been transferred:

cast send "$AUCTION_ADDRESS" "onTokensReceived()" --rpc-url "$RPC_URL" --account deployer --sender "$DEPLOYER_ADDRESS"

This is a required prerequisite before the auction can accept bids.

Alternative: Deploy via Constructor

You can also deploy directly via the constructor:

constructor(
    address token,
    uint128 amount,
    AuctionParameters memory parameters
) {}

This approach doesn't require a salt parameter but won't benefit from CREATE2's deterministic addressing.

Verification on Block Explorers

Generate standard JSON input for verification:

forge verify-contract "$AUCTION_ADDRESS" \
  src/ContinuousClearingAuction.sol:ContinuousClearingAuction \
  --rpc-url "$RPC_URL" \
  --show-standard-json-input > standard-json-input.json

Upload this file to block explorers for verification.


Validation Rules

Before deployment, ensure:

  1. Block constraints: startBlock < endBlock <= claimBlock
  2. Valid addresses: All addresses are valid Ethereum addresses (0x + 40 hex chars)
  3. Non-negative values: All numeric values >= 0
  4. Floor price alignment: Floor price must be a multiple of tick spacing
  5. Tick spacing: At least 1 basis point of floor price (1%, 10% recommended)
  6. Supply schedule: Last block sells significant tokens (~30%+)
  7. Total supply bounds: Max 1e30 wei (1 trillion 18-decimal tokens)
  8. No FoT tokens: Fee-on-transfer tokens not supported
  9. Minimum decimals: Do not use tokens with < 6 decimals

Technical Overview

Q96 Fixed-Point Math

The auction uses Q96 fixed-point arithmetic:

library FixedPoint96 {
    uint8 internal constant RESOLUTION = 96;
    uint256 internal constant Q96 = 0x1000000000000000000000000; // 2^96
}
  • Price: Q96 fixed-point number for fractional price ratios
  • Demand: Currency amounts scaled by Q96

Auction Steps (Supply Issuance)

Steps are packed into bytes, where each step is a uint64:

  • First 24 bits: mps (per-block issuance rate in MPS)
  • Last 40 bits: blockDelta (number of blocks)
function parse(bytes8 data) internal pure returns (uint24 mps, uint40 blockDelta) {
    mps = uint24(bytes3(data));
    blockDelta = uint40(uint64(data));
}

The data is deployed to an external SSTORE2 contract for cheaper reads.

Key Contract Functions

submitBid()

Users submit bids with:

  • maxPrice: Maximum price willing to pay (Q96)
  • amount: Currency amount to bid
  • owner: Address to receive tokens/refunds
  • prevTickPrice: Hint for gas optimization
  • hookData: Optional data for validation hooks

checkpoint()

Auction is checkpointed once per block with a new bid. Checkpoints determine token allocations.

exitBid() / exitPartiallyFilledBid()

Bids can be exited when outbid or when auction ends (only after graduation).

isGraduated()

Returns true if currencyRaised >= requiredCurrencyRaised. No bids can exit before graduation.

claimTokens()

Users claim purchased tokens after claimBlock (only for graduated auctions).

sweepCurrency() / sweepUnsoldTokens()

After auction ends:

  • sweepCurrency(): Withdraw raised currency (graduated only)
  • sweepUnsoldTokens(): Withdraw unsold tokens

Supported Chains

CCA is deployed to canonical addresses across select EVM chains:

Chain IDNetworkBlock Time
1Mainnet12s
130Unichain1s
1301Unichain Sepolia2s
8453Base2s
42161Arbitrum2s
11155111Sepolia12s

Troubleshooting

Common Issues

IssueSolution
"Invalid block sequence"Ensure startBlock < endBlock <= claimBlock
"Floor price not aligned"Round floor price to multiple of tick spacing
"Tick spacing too small"Use at least 1% of floor price
"Total supply too large"Max 1e30 wei (1 trillion 18-decimal tokens)
"Gas inefficiency"Increase tick spacing
"Invalid address"Verify addresses are 42 characters starting with 0x

Validation Checklist

Before deployment:

  • Block sequence is valid (start < end <= claim)
  • Floor price is multiple of tick spacing
  • Tick spacing >= 1% of floor price
  • All addresses are valid Ethereum addresses
  • Total supply <= 1e30 wei
  • Currency is more valuable than token
  • Block times match network (12s mainnet, 2s L2s)
  • Recipients addresses are set (not placeholders)
  • Currency address is correct for network
  • Last supply step sells ~30%+ of tokens
  • No fee-on-transfer tokens used
  • Token decimals >= 6
  • onTokensReceived() called post-deployment

Additional Resources

FAQ

What does the deployer skill do?

Deploy CCA (Continuous Clearing Auction) smart contracts using the Factory pattern. Use when user says "deploy auction", "deploy cca", "factory deployment", or wants to deploy a configured auction.

How do I install deployer?

Run npx skills add https://github.com/uniswap/uniswap-ai --skill deployer in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/deployer/ (personal) or .claude/skills/deployer/ (project).

Which AI agents can use deployer?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is deployer safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains deployer?

It is published by uniswap in uniswap/uniswap-ai. It has 1,111 recorded installs.

More from uniswap/uniswap-ai

View all →

swap-integration

uniswap/uniswap-ai

Integrate Uniswap swaps into applications. Use when user says "integrate swaps", "uniswap", "trading api", "add swap functionality", "build a swap frontend", "create a swap script", "smart contract swap integration", "use Universal Router", "Trading API", or mentions swapping tokens via Uniswap.

Business & Finance2.2K installs

viem-integration

uniswap/uniswap-ai

Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.

Business & Finance1.7K installs

liquidity-planner

uniswap/uniswap-ai

This skill should be used when the user asks to "provide liquidity", "create LP position", "add liquidity to pool", "become a liquidity provider", "create v3 position", "create v4 position", "concentrated liquidity", "set price range", or mentions providing liquidity, LP positions, or liquidity pools on Uniswap. Generates deep links to create positions in the Uniswap interface.

1.2K installs

swap-planner

uniswap/uniswap-ai

This skill should be used when the user asks to "swap tokens", "trade ETH for USDC", "exchange tokens on Uniswap", "buy tokens", "sell tokens", "convert ETH to stablecoins", "find memecoins", "discover tokens", "research tokens", "tokens to buy", "find tokens to swap", "what should I buy", or mentions swapping, trading, researching, discovering, buying, or exchanging tokens on any Uniswap-supported chain. Supports both known token swaps and token discovery workflows (discovery uses keyword search and web search — there is no live "trending" feed). Generates deep links to execute swaps in the Uniswap interface.

v4-security-foundations

uniswap/uniswap-ai

Security-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap", "afterSwap", or asks about V4 hook best practices, vulnerabilities, or audit requirements.

Security1.2K installs

configurator

uniswap/uniswap-ai

Configure 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.

Business & Finance1.1K installs

Popular devops & cloud skills

View category →

microsoft-foundry

microsoft/azure-skills

Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure

OfficialDevOps & Cloud579.1K installs

azure-diagnostics

microsoft/azure-skills

Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.

OfficialDevOps & Cloud569.8K installs

azure-prepare

microsoft/azure-skills

Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.

OfficialDevOps & Cloud569K installs

azure-ai

microsoft/azure-skills

Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.

OfficialDevOps & Cloud568.8K installs

azure-deploy

microsoft/azure-skills

Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.

OfficialDevOps & Cloud568.6K installs

azure-validate

microsoft/azure-skills

Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.

OfficialDevOps & Cloud568K installs