Clanker Skill
Deploy ERC20 tokens on Base using the Clanker protocol with built-in Uniswap V4 liquidity pools.
Setup
1. Configuration
Create a config file at ~/.clawdbot/skills/clanker/config.json:
CODEBLOCK0
Security: Never commit your private key to version control. Use environment variables or a separate config file outside the repo.
2. Get Testnet ETH
For Base Sepolia testing, get free ETH from:
- - https://cloud.base.org/faucet
- https://sepoliafaucet.com
Note: Faucet access may require:
- - MetaMask or similar wallet installed
- Social login (GitHub, Twitter, etc.)
- Limited to 1-2 requests per day
3. Install Dependencies (for deployment)
For token deployment, install web3 Python package:
CODEBLOCK1
For read-only operations, only curl, jq, and python3 are required.
Usage
Deploy a Token (Mainnet)
CODEBLOCK2
Deploys an ERC20 token with 0.1 ETH initial liquidity on Uniswap V4.
Check Deployment Status
CODEBLOCK3
Check if a deployment transaction was successful.
Get Token Info
CODEBLOCK4
Returns token name, symbol, total supply, and other details.
Find Tokens by Deployer
CODEBLOCK5
Find all tokens deployed by a specific address.
Deploy to Testnet (Sepolia)
CODEBLOCK6
Deploy to Base Sepolia testnet for testing.
Using Testnet Network
All commands support --network testnet flag:
CODEBLOCK7
Commands Reference
| Command | Description | Parameters |
|---|
| INLINECODE5 | Deploy token on mainnet | INLINECODE6 |
| INLINECODE7 |
Deploy to Sepolia testnet |
<name> <symbol> |
|
status | Check deployment status |
<txhash> |
|
info | Get token information |
<token-address> |
|
get-token | Find tokens by deployer |
<deployer-address> |
Examples
CODEBLOCK8
Testing Guide
Step 1: Set Up Testnet Config
CODEBLOCK9
Step 2: Get Testnet ETH
- 1. Visit https://cloud.base.org/faucet
- Connect your wallet (MetaMask)
- Request test ETH (0.001-0.01 ETH should be enough)
Alternative faucets:
- - https://sepoliafaucet.com
- https://faucet.paradigm.xyz
Step 3: Deploy a Test Token
CODEBLOCK10
Or with initial liquidity:
CODEBLOCK11
Step 4: Verify Deployment
- 1. Check transaction status:
CODEBLOCK12
- 2. Get token info:
CODEBLOCK13
- 3. View on explorer:
- Open https://sepolia.basescan.org/tx/\
- View token contract at https://sepolia.basescan.org/token/\
Troubleshooting
Transaction failed?
- - Check if you have enough ETH for gas
- Verify the Clanker factory contract is available on Sepolia
- Check network connectivity
Cannot get testnet ETH?
- - Try alternative faucets
- Wait 24 hours between requests
- Check if wallet is connected correctly
Private key errors?
- - Ensure key doesn't have "0x" prefix (or remove it if present)
- Check config file syntax is valid JSON
Test Results
Read-Only Operations ✅
| Command | Network | Result |
|---|
| INLINECODE15 (WETH) | mainnet | ✅ Works - Shows correct name, symbol, supply |
| INLINECODE16 |
mainnet | ✅ Works - Returns deployer stats |
| status | mainnet | ✅ Works - Handles pending/not found tx |
Deployment ⚠️
| Feature | Status | Notes |
|---|
| Python deployment helper | ⚠️ Placeholder | Requires Clanker factory address |
| Web-based deployment |
✅ Recommended | Use https://clanker.world |
| Direct contract call | 🔲 Not implemented | Would need factory ABI |
Note: Full deployment requires the actual Clanker factory contract address on Base Sepolia. The protocol is relatively new, and contract addresses may change. For production deployment, check the official documentation.
Security Best Practices
- 1. Never commit private keys to version control
- Use separate keys for testnet and mainnet
- Test on Sepolia first before mainnet deployment
- Verify contract addresses on official Clanker documentation
- Start with small ETH amounts for initial liquidity
- Monitor deployed tokens for unusual activity
Resources
- - Official Website: https://clanker.world
- Documentation: https://docs.clanker.world
- GitHub: https://github.com/clanker-world
- Base Mainnet Explorer: https://basescan.org
- Base Sepolia Explorer: https://sepolia.basescan.org
Notes
- - All deployments create tokens with built-in Uniswap V4 LP
- Initial LP ETH is required for liquidity bootstrapping
- Testnet deployments are free (no real funds, requires testnet ETH)
- Deployment may fail if Clanker contract is not available
- Check network connectivity if operations timeout
Clanker 技能
使用 Clanker 协议在 Base 网络上部署 ERC20 代币,内置 Uniswap V4 流动性池。
设置
1. 配置
在 ~/.clawdbot/skills/clanker/config.json 创建配置文件:
json
{
mainnet: {
rpc_url: https://1rpc.io/base,
private_key: 你的私钥
},
testnet: {
rpc_url: https://sepolia.base.org,
private_key: 你的测试网私钥
}
}
安全提示: 切勿将私钥提交到版本控制系统。请使用环境变量或仓库外部的独立配置文件。
2. 获取测试网 ETH
对于 Base Sepolia 测试,可从以下地址获取免费 ETH:
- - https://cloud.base.org/faucet
- https://sepoliafaucet.com
注意: 水龙头访问可能需要:
- - 安装 MetaMask 或类似钱包
- 社交登录(GitHub、Twitter 等)
- 每天限制 1-2 次请求
3. 安装依赖(用于部署)
对于代币部署,安装 web3 Python 包:
bash
pip install web3
对于只读操作,仅需 curl、jq 和 python3。
使用方法
部署代币(主网)
bash
clanker.sh deploy 我的代币 MYT 0.1
在 Uniswap V4 上部署一个 ERC20 代币,初始流动性为 0.1 ETH。
检查部署状态
bash
clanker.sh status <交易哈希>
检查部署交易是否成功。
获取代币信息
bash
clanker.sh info <代币地址>
返回代币名称、符号、总供应量及其他详细信息。
按部署者查找代币
bash
clanker.sh get-token <部署者地址>
查找特定地址部署的所有代币。
部署到测试网(Sepolia)
bash
clanker.sh testnet-deploy 测试代币 TST
部署到 Base Sepolia 测试网进行测试。
使用测试网网络
所有命令均支持 --network testnet 标志:
bash
检查测试网状态
clanker.sh status 0x1234... --network testnet
获取测试网代币信息
clanker.sh info 0xabcd... --network testnet
按部署者查找测试网代币
clanker.sh get-token 0xdef0... --network testnet
命令参考
| 命令 | 描述 | 参数 |
|---|
| deploy | 在主网部署代币 | <名称> <符号> <初始LP-ETH> |
| testnet-deploy |
部署到 Sepolia 测试网 | <名称> <符号> |
| status | 检查部署状态 | <交易哈希> |
| info | 获取代币信息 | <代币地址> |
| get-token | 按部署者查找代币 | <部署者地址> |
示例
bash
部署一个迷因币
./clanker.sh deploy Base 狗 BDOG 0.05
检查部署是否成功
./clanker.sh status 0x1234...5678
获取已知代币的信息
./clanker.sh info 0xabcd...1234
查找谁部署了代币
./clanker.sh get-token 0xdef0...9876
在 Sepolia 上测试
./clanker.sh testnet-deploy 测试迷因 TMEME
./clanker.sh status 0x交易哈希... --network testnet
测试指南
步骤 1:设置测试网配置
bash
使用测试网私钥创建配置
cat > ~/.clawdbot/skills/clanker/config.json << EOF
{
testnet: {
rpc_url: https://sepolia.base.org,
private_key: 你的测试网私钥
}
}
EOF
步骤 2:获取测试网 ETH
- 1. 访问 https://cloud.base.org/faucet
- 连接你的钱包(MetaMask)
- 请求测试 ETH(0.001-0.01 ETH 应该足够)
其他水龙头:
- - https://sepoliafaucet.com
- https://faucet.paradigm.xyz
步骤 3:部署测试代币
bash
在测试网上部署,初始流动性为 0.001 ETH
./clanker.sh testnet-deploy 测试代币 TST
或带初始流动性:
bash
./clanker.sh deploy 测试代币 TST 0.001 --network testnet
步骤 4:验证部署
- 1. 检查交易状态:
bash
./clanker.sh status <交易哈希> --network testnet
- 2. 获取代币信息:
bash
./clanker.sh info <代币地址> --network testnet
- 3. 在浏览器中查看:
- 打开 https://sepolia.basescan.org/tx/\<交易哈希\>
- 查看代币合约:https://sepolia.basescan.org/token/\<代币地址\>
故障排除
交易失败?
- - 检查是否有足够的 ETH 支付 Gas 费
- 验证 Clanker 工厂合约在 Sepolia 上可用
- 检查网络连接
无法获取测试网 ETH?
- - 尝试其他水龙头
- 等待 24 小时后再请求
- 检查钱包是否正确连接
私钥错误?
- - 确保密钥没有 0x 前缀(如有则移除)
- 检查配置文件语法是否为有效 JSON
测试结果
只读操作 ✅
| 命令 | 网络 | 结果 |
|---|
| info (WETH) | 主网 | ✅ 可用 - 显示正确的名称、符号、供应量 |
| get-token |
主网 | ✅ 可用 - 返回部署者统计信息 |
| status | 主网 | ✅ 可用 - 处理待处理/未找到的交易 |
部署 ⚠️
| 功能 | 状态 | 备注 |
|---|
| Python 部署助手 | ⚠️ 占位符 | 需要 Clanker 工厂地址 |
| 基于网页的部署 |
✅ 推荐 | 使用 https://clanker.world |
| 直接合约调用 | 🔲 未实现 | 需要工厂 ABI |
注意: 完整部署需要 Base Sepolia 上实际的 Clanker 工厂合约地址。该协议相对较新,合约地址可能发生变化。对于生产环境部署,请查看官方文档。
安全最佳实践
- 1. 切勿将私钥提交到版本控制系统
- 使用单独的密钥用于测试网和主网
- 先在 Sepolia 上测试,再部署到主网
- 在官方 Clanker 文档上验证合约地址
- 从小额 ETH 开始用于初始流动性
- 监控已部署的代币是否有异常活动
资源
- - 官方网站: https://clanker.world
- 文档: https://docs.clanker.world
- GitHub: https://github.com/clanker-world
- Base 主网浏览器: https://basescan.org
- Base Sepolia 浏览器: https://sepolia.basescan.org
备注
- - 所有部署都会创建带有内置 Uniswap V4 LP 的代币
- 初始 LP ETH 用于流动性引导
- 测试网部署免费(无需真实资金,需要测试网 ETH)
- 如果 Clanker 合约不可用,部署可能失败
- 如果操作超时,请检查网络连接