deployer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CCA Deployment

CCA 部署

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.
使用
ContinuousClearingAuctionFactory
结合CREATE2机制部署CCA(持续清算拍卖)智能合约,可在不同链上获得一致的合约地址。
运行时兼容性: 本技能使用
AskUserQuestion
进行交互式提示。如果你的运行环境中没有
AskUserQuestion
,请通过自然语言对话收集相同的参数。

Instructions for Claude Code

Claude Code 使用说明

When the user invokes this skill, guide them through the CCA deployment process with appropriate safety warnings and validation.
当用户调用本技能时,需引导他们完成CCA部署流程,并提供适当的安全警告和验证步骤。

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
在开始部署前,你必须:
  1. 展示教育免责声明并获得用户确认
  2. 验证配置文件(若用户提供)
  3. 验证目标网络的工厂合约地址
  4. 与用户确认部署参数

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

  1. 展示教育免责声明(必填)
  2. 加载或请求配置信息
  3. 验证配置有效性
  4. 展示部署计划
  5. 获取用户确认
  6. 提供部署命令
  7. 部署后步骤指导

⚠️ 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.

重要提示:在开始部署前,你必须确认已知晓以下内容:
本工具及所有部署说明仅用于教育目的。AI生成的部署命令可能存在错误或安全漏洞。
你必须:
  1. 在部署前仔细检查所有配置
  2. 验证所有参数(地址、定价、时间安排)的正确性
  3. 先在测试网进行测试,再部署到主网
  4. 在部署带有真实资金的合约前进行审计
在继续部署步骤前,请使用AskUserQuestion确认用户已认可这些警告。

🔐 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
  • 绝对不要将私钥存储在Git仓库或配置文件中
  • 绝对不要直接在命令行中粘贴私钥(会显示在Shell历史记录中)
  • 绝对不要分享私钥或在共享环境中存储私钥
  • 绝对不要在不可信的电脑上使用主网私钥

✅ Recommended Practices

✅ 推荐实践

Option 1: Hardware Wallets (Most Secure)

选项1:硬件钱包(最安全)

Use Ledger or Trezor hardware wallets with the
--ledger
flag:
bash
forge script script/Example.s.sol:ExampleScript \
  --rpc-url $RPC_URL \
  --broadcast \
  --ledger
使用Ledger或Trezor硬件钱包,并添加
--ledger
参数:
bash
forge script script/Example.s.sol:ExampleScript \
  --rpc-url $RPC_URL \
  --broadcast \
  --ledger

Option 2: Encrypted Keystore

选项2:加密密钥库

Create an encrypted keystore with
cast wallet import
:
bash
undefined
使用
cast wallet import
创建加密密钥库:
bash
undefined

Import private key to encrypted keystore (one-time setup)

一次性设置:将私钥导入加密密钥库

cast wallet import deployer --interactive
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
undefined
forge script script/Example.s.sol:ExampleScript
--rpc-url $RPC_URL
--broadcast
--account deployer
--sender $DEPLOYER_ADDRESS
undefined

Option 3: Environment Variables (For Testing Only)

选项3:环境变量(仅用于测试)

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:
bash
undefined
如果使用环境变量,请确保:
  • 存储在安全的
    .env
    文件中(绝对不要提交到Git)
  • 通过
    source .env
    dotenv
    加载
  • 仅在可信、安全的电脑上使用
  • 开发时使用测试网私钥
示例:
bash
undefined

.env file (add to .gitignore)

.env文件(需添加到.gitignore)

PRIVATE_KEY=0x... RPC_URL=https://...
PRIVATE_KEY=0x... RPC_URL=https://...

Load environment

加载环境变量

source .env
source .env

Deploy

部署

forge script ... --private-key $PRIVATE_KEY
undefined
forge script ... --private-key $PRIVATE_KEY
undefined

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

始终先在测试网验证,再部署到主网:
  • Sepolia(测试网):可从水龙头获取免费ETH
  • Base Sepolia:Base测试网免费ETH
  • 在测试网部署并验证完整流程
  • 仅在彻底测试后部署到主网

Deployment Guide

部署指南

Factory Deployment

工厂合约部署

CCA instances are deployed via the
ContinuousClearingAuctionFactory
contract, which uses CREATE2 for consistent addresses across chains.
CCA实例通过
ContinuousClearingAuctionFactory
合约部署,该合约使用CREATE2机制实现跨链一致的合约地址。

Factory Addresses

工厂合约地址

VersionAddressStatus
v1.1.0
0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5
Recommended
版本地址状态
v1.1.0
0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5
推荐使用

Deploying an Auction Instance

部署拍卖合约实例

Step 0: Clone the CCA Repository

步骤0:克隆CCA仓库

If you don't already have the CCA contracts locally, clone the repository and install dependencies:
bash
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.
如果本地没有CCA合约代码,请克隆仓库并安装依赖:
bash
git clone https://github.com/Uniswap/continuous-clearing-auction.git
cd continuous-clearing-auction
forge install
完成后你将获得部署脚本、合约ABI和测试工具的访问权限。

Step 1: Prepare Configuration

步骤1:准备配置文件

Ensure you have a valid configuration file (generated via the
configurator
skill or manually created).
Example configuration file structure:
json
{
  "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 }
    ]
  }
}
确保你有有效的配置文件(可通过
configurator
技能生成或手动创建)。
示例配置文件结构:
json
{
  "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

步骤2:验证配置有效性

Before deployment, verify the configuration passes all validation rules (see Validation Rules section).
部署前,请确认配置通过所有验证规则(详见验证规则部分)。

Step 3: Deploy via Factory

步骤3:通过工厂合约部署

The factory has a simple interface:
solidity
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
工厂合约提供简单的调用接口:
solidity
function initializeDistribution(
    address token,
    uint256 amount,
    bytes calldata configData,
    bytes32 salt
) external returns (IDistributionContract);
参数说明:
  • token
    :待拍卖代币的合约地址
  • amount
    :拍卖的代币总量
  • configData
    :ABI编码后的
    AuctionParameters
    结构体
  • salt
    :可选的bytes32值,用于生成自定义合约地址

Step 3.5: Encode Configuration to configData

步骤3.5:将配置编码为configData

The factory's
initializeDistribution
expects
configData
as ABI-encoded
AuctionParameters
. Convert your JSON config to encoded bytes:
Using cast (Foundry CLI):
bash
undefined
工厂合约的
initializeDistribution
方法要求
configData
为ABI编码后的
AuctionParameters
结构体。请将JSON配置转换为编码后的字节数据:
使用cast(Foundry CLI):
bash
undefined

Encode the AuctionParameters struct

编码AuctionParameters结构体

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:**

```solidity
// 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.
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"

**使用Foundry脚本:**

```solidity
// 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 {
        // 加载配置值
        address token = vm.envAddress("TOKEN");
        uint256 amount = vm.envUint("TOTAL_SUPPLY");

        // 编码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();

        // 授权工厂合约转移代币
        IERC20(token).approve(
            0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5,
            amount
        );

        // 部署拍卖合约
        address auction = ICCAFactory(
            0xCCccCcCAE7503Cac057829BF2811De42E16e0bD5
        ).initializeDistribution(
            token,
            amount,
            configData,
            bytes32(0) // salt值
        );

        vm.stopBroadcast();

        console.log("Auction deployed at:", auction);
    }
}
重要提示: 在调用
initializeDistribution
前,你必须授权工厂合约转移代币。工厂合约会将
amount
数量的代币从你的地址转移到新创建的拍卖合约中。

Step 4: Using Foundry Script

步骤4:使用Foundry脚本部署

bash
undefined
bash
undefined

Deploy factory (if needed on new network)

部署工厂合约(若目标网络未部署)

forge script script/deploy/DeployContinuousAuctionFactory.s.sol:DeployContinuousAuctionFactoryScript
--rpc-url $RPC_URL
--broadcast
--private-key $PRIVATE_KEY
forge script script/deploy/DeployContinuousAuctionFactory.s.sol:DeployContinuousAuctionFactoryScript
--rpc-url $RPC_URL
--broadcast
--private-key $PRIVATE_KEY

Deploy auction instance

部署拍卖合约实例

forge script script/Example.s.sol:ExampleScript
--rpc-url $RPC_URL
--broadcast
--private-key $PRIVATE_KEY
undefined
forge script script/Example.s.sol:ExampleScript
--rpc-url $RPC_URL
--broadcast
--private-key $PRIVATE_KEY
undefined

Step 5: Post-Deployment

步骤5:部署后操作

After deployment, you must call
onTokensReceived()
to notify the auction that tokens have been transferred:
bash
cast send $AUCTION_ADDRESS "onTokensReceived()" --rpc-url $RPC_URL --private-key $PRIVATE_KEY
This is a required prerequisite before the auction can accept bids.
部署完成后,你必须调用
onTokensReceived()
方法通知拍卖合约代币已转移:
bash
cast send $AUCTION_ADDRESS "onTokensReceived()" --rpc-url $RPC_URL --private-key $PRIVATE_KEY
这是拍卖合约接受出价前的必填前置步骤。

Alternative: Deploy via Constructor

替代方案:通过构造函数直接部署

You can also deploy directly via the constructor:
solidity
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.
你也可以直接通过构造函数部署:
solidity
constructor(
    address token,
    uint128 amount,
    AuctionParameters memory parameters
) {}
这种方式不需要salt参数,但无法利用CREATE2的确定性地址特性。

Verification on Block Explorers

在区块浏览器上验证合约

Generate standard JSON input for verification:
bash
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.

生成标准JSON输入用于验证:
bash
forge verify-contract $AUCTION_ADDRESS \
  src/ContinuousClearingAuction.sol:ContinuousClearingAuction \
  --rpc-url $RPC_URL \
  --show-standard-json-input > standard-json-input.json
将该文件上传到区块浏览器完成合约验证。

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

部署前,请确保配置满足以下规则:
  1. 区块约束
    startBlock < endBlock <= claimBlock
  2. 有效地址:所有地址均为有效的以太坊地址(0x开头+40位十六进制字符)
  3. 非负数值:所有数值均≥0
  4. 底价对齐:底价必须是tick spacing的整数倍
  5. tick spacing:至少为底价的1个基点(推荐1%或10%)
  6. 供应计划:最后一个区块需售出大量代币(约30%以上)
  7. 总供应量限制:最大为1e30 wei(1万亿个18位小数代币)
  8. 不支持FoT代币:不支持转账即收费(Fee-on-Transfer)代币
  9. 最小小数位数:不要使用小数位数<6的代币

Technical Overview

技术概述

Q96 Fixed-Point Math

Q96定点数运算

The auction uses Q96 fixed-point arithmetic:
solidity
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
拍卖合约使用Q96定点数算术:
solidity
library FixedPoint96 {
    uint8 internal constant RESOLUTION = 96;
    uint256 internal constant Q96 = 0x1000000000000000000000000; // 2^96
}
  • 价格:使用Q96定点数表示 fractional price ratios(价格比率)
  • 需求:货币金额按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)
solidity
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.
发行步骤被打包为字节数据,每个步骤为
uint64
类型:
  • 前24位:
    mps
    (每区块发行速率,单位MPS)
  • 后40位:
    blockDelta
    (区块数量)
solidity
function parse(bytes8 data) internal pure returns (uint24 mps, uint40 blockDelta) {
    mps = uint24(bytes3(data));
    blockDelta = uint40(uint64(data));
}
该数据会部署到外部SSTORE2合约中以降低读取成本。

Key Contract Functions

核心合约函数

submitBid()

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
用户提交出价时需提供:
  • maxPrice
    :愿意支付的最高价格(Q96格式)
  • amount
    :出价的货币金额
  • owner
    :接收代币/退款的地址
  • prevTickPrice
    :用于优化Gas费用的提示值
  • hookData
    :验证钩子的可选数据

checkpoint()

checkpoint()

Auction is checkpointed once per block with a new bid. Checkpoints determine token allocations.
每收到一个新出价,拍卖合约会在当前区块创建一个检查点。检查点用于确定代币分配。

exitBid() / exitPartiallyFilledBid()

exitBid() / exitPartiallyFilledBid()

Bids can be exited when outbid or when auction ends (only after graduation).
当用户被超越出价或拍卖结束后(仅在拍卖达标后),可退出出价。

isGraduated()

isGraduated()

Returns true if
currencyRaised >= requiredCurrencyRaised
. No bids can exit before graduation.
currencyRaised >= requiredCurrencyRaised
时返回true。达标前无法退出出价。

claimTokens()

claimTokens()

Users claim purchased tokens after
claimBlock
(only for graduated auctions).
用户可在
claimBlock
之后领取购买的代币(仅适用于达标的拍卖)。

sweepCurrency() / sweepUnsoldTokens()

sweepCurrency() / sweepUnsoldTokens()

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

拍卖结束后:
  • sweepCurrency()
    :提取筹集的货币(仅适用于达标的拍卖)
  • sweepUnsoldTokens()
    :提取未售出的代币

Supported Chains

支持的链

CCA is deployed to canonical addresses across select EVM chains:
Chain IDNetworkBlock Time
1Mainnet12s
130Unichain1s
1301Unichain Sepolia2s
8453Base2s
42161Arbitrum2s
11155111Sepolia12s

CCA已在以下精选EVM链上部署了标准地址:
链ID网络区块时间
1主网12s
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
问题解决方案
"Invalid block sequence"确保
startBlock < endBlock <= claimBlock
"Floor price not aligned"将底价调整为tick spacing的整数倍
"Tick spacing too small"设置tick spacing至少为底价的1%
"Total supply too large"总供应量不超过1e30 wei(1万亿个18位小数代币)
"Gas inefficiency"增大tick spacing
"Invalid address"验证地址为0x开头的42位有效以太坊地址

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

部署前请确认:
  • 区块顺序有效(start < end <= claim)
  • 底价是tick spacing的整数倍
  • tick spacing ≥ 底价的1%
  • 所有地址均为有效以太坊地址
  • 总供应量 ≤ 1e30 wei
  • 货币价值高于代币
  • 区块时间与目标网络匹配(主网12s,L2网络2s)
  • 接收地址已正确设置(非占位符)
  • 货币地址与目标网络一致
  • 最后一个供应步骤售出约30%以上的代币
  • 未使用转账即收费代币
  • 代币小数位数 ≥6
  • 部署后已调用
    onTokensReceived()

Additional Resources

额外资源