Deploy ERC20 tokens on Base, Ethereum, Arbitrum, and other EVM chains using the Clanker SDK. Use when the user wants to deploy a new token, create a memecoin, set up token vesting, configure airdrops, manage token rewards, claim LP fees, or update token metadata. Supports V4 deployment with vaults, airdrops, dev buys, custom market caps, vanity addresses, and multi-chain deployment.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Der Befehl bleibt in einer Zeile. Scrollen Sie horizontal, um ihn vor dem Kopieren vollständig zu prüfen.
Sie bevorzugen eine lokale Kopie? Laden Sie die Dateien herunter, die SkillsMP derzeit vorliegen.
SKILL.md wird angezeigt
SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
clanker
version
1.0.0
description
Deploy ERC20 tokens on Base, Ethereum, Arbitrum, and other EVM chains using the Clanker SDK. Use when the user wants to deploy a new token, create a memecoin, set up token vesting, configure airdrops, manage token rewards, claim LP fees, or update token metadata. Supports V4 deployment with vaults, airdrops, dev buys, custom market caps, vanity addresses, and multi-chain deployment.
author
BankrBot
license
MIT
tags
["crypto","defi","token-deployment","base"]
env_needed
[{"name":"PRIVATE_KEY","description":"Private key for the EVM wallet deploying the tokens (must start with 0x)","required":true}]
Deploy production-ready ERC20 tokens with built-in liquidity pools using the official Clanker TypeScript SDK.
🚨 Financial Safety Guardrails
This skill enables high-risk financial operations (token deployment requires gas, dev buys require funds, and liquidity parameters are immutable). You MUST adhere to the following safety rules:
Always confirm with the user before executing the deployment script.
Display all parameters clearly before execution: Token Name, Symbol, Total Supply, Vault allocations, Dev buy amounts, and target chain.
Double-check dev buy amounts: Do NOT execute large dev buys without explicit double-confirmation from the user.
Warn users about irreversibility: Smart contract deployments are permanent and cannot be deleted once broadcast to the blockchain.
Overview
Clanker is a token deployment protocol that creates ERC20 tokens with Uniswap V4 liquidity pools in a single transaction. The SDK provides a TypeScript interface for deploying tokens with advanced features like vesting, airdrops, and customizable reward distribution.
Quick Start
Installation
npm install clanker-sdk viem
# or
yarn add clanker-sdk viem
# or
pnpm add clanker-sdk viem
Deploy tokens with full customization including metadata, social links, and pool configuration.
Basic deployment:
Token name, symbol, and image (IPFS)
Description and social media links
Vanity address generation
Custom pool configurations
Reference: the Advanced Reference Guide below (deployment)
2. Vault (Token Vesting)
Lock a percentage of tokens with lockup and vesting periods:
vault: {
percentage: 10, // 10% of token supplylockupDuration: 2592000, // 30 days cliff (in seconds)vestingDuration: 2592000, // 30 days linear vestingrecipient: account.address,
}
Reference: the Advanced Reference Guide below (vesting)
3. Airdrops
Distribute tokens to multiple addresses using Merkle tree proofs:
If you don't want to use the Clanker service, store and manage the tree yourself:
import { StandardMerkleTree } from'@openzeppelin/merkle-tree';
import fs from'fs';
// After creating the airdropconst { tree, airdrop } = createAirdrop([...]);
// Save the tree to a file
fs.writeFileSync('merkle-tree.json', JSON.stringify(tree.dump()));
// Later, load and use the treeconst loadedTree = StandardMerkleTree.load(
JSON.parse(fs.readFileSync('merkle-tree.json', 'utf8'))
);
Contract Limits
From the Solidity contracts:
Minimum Lockup Duration: 1 day (86,400 seconds) - enforced on-chain
Maximum Extension BPS: 9000 (90% of supply can go to extensions total)
airdrop: {
...airdrop,
lockupDuration: 86_400, // Minimum 1 day requiredvestingDuration: 0, // No minimum for vesting
}
Note: Unlike vault (7 days min), airdrop only requires 1 day minimum lockup.
This is the default and recommended configuration for all token deployments via Bankr. Both recipients receive fees in the paired token (e.g., WETH) to simplify fee management.
Secure admin addresses - Use multisig for high-value tokens
Document fee split - Be transparent with community about distribution
Regular claims - Don't let rewards accumulate excessively
Test updates - Verify recipient/admin changes on testnet first
Fair distribution - Consider community expectations for fee splits
📖 Reference: troubleshooting.md
Troubleshooting
Common issues and solutions when using the Clanker SDK.
Setup Issues
"Missing PRIVATE_KEY env var"
Cause: Environment variable not set or not in correct format.
Solution:
# Ensure PRIVATE_KEY is set with 0x prefixexport PRIVATE_KEY=0x...your_64_character_hex_key...
# Or in .env file
PRIVATE_KEY=0x...your_64_character_hex_key...
"Invalid private key format"
Cause: Private key missing 0x prefix or incorrect length.
Solution:
// Validate private key formatconstPRIVATE_KEY = process.env.PRIVATE_KEY;
if (!PRIVATE_KEY || !isHex(PRIVATE_KEY)) {
thrownewError('PRIVATE_KEY must be a hex string starting with 0x');
}
TypeScript Import Errors
Cause: Incorrect import paths or missing viem peer dependency.
Solution:
# Ensure both packages installed
npm install clanker-sdk viem
Cause: Wallet doesn't have enough native token for gas.
Solution:
// Check balance before deploymentconst balance = await publicClient.getBalance({ address: account.address });
console.log('Balance:', formatEther(balance), 'ETH');
// Fund wallet if needed// Minimum ~0.01 ETH recommended for Base, more for Ethereum mainnet
"Transaction reverted"
Cause: Invalid configuration or contract state issue.
// Check current claimable amountconst claimable = await clanker.getVaultClaimableAmount({ token: TOKEN_ADDRESS });
console.log('Claimable:', claimable.toString());
// If 0, lockup hasn't passed// Check deployment block time + lockupDuration
"Cannot claim rewards"
Cause: Not the reward recipient or no rewards accumulated.
Solution:
// Check available rewards firstconst available = await clanker.availableRewards({
token: TOKEN_ADDRESS,
rewardRecipient: YOUR_ADDRESS,
});
console.log('Available:', available);
// Ensure you're the correct recipient
"Cannot update metadata"
Cause: Not the token admin.
Solution:
// Only tokenAdmin can update metadata// Verify you're using the same account that deployedconsole.log('Your address:', account.address);
// Compare with tokenAdmin set during deployment
Airdrop Issues
"Airdrop not registered"
Cause: Didn't wait for indexing before registering.
Solution:
// Wait at least 10 seconds after deploymentawaitsleep(10_000);
awaitregisterAirdrop(tokenAddress, tree);
"Invalid proof"
Cause: Merkle tree mismatch or wrong address.
Solution:
// Regenerate the tree with same dataconst { tree, airdrop } = createAirdrop(originalRecipients);
// Ensure exact address match (case-sensitive)const proof = getAllowlistMerkleProof(tree, entries, address.toLowerCase(), amount);
RPC Issues
"Rate limited"
Cause: Public RPC rate limits exceeded.
Solution:
// Use dedicated RPC URLconst publicClient = createPublicClient({
chain: base,
transport: http(process.env.RPC_URL_BASE), // Alchemy, Infura, etc.
});
"Request failed"
Cause: Network issues or RPC unavailable.
Solution:
// Add retry logicasyncfunctiondeployWithRetry(config, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
returnawait clanker.deploy(config);
} catch (error) {
if (i === maxRetries - 1) throw error;
awaitsleep(1000 * (i + 1)); // Exponential backoff
}
}
}
Contract Error Reference
Common revert reasons from the Solidity contracts:
Review error messages: Usually contain specific guidance
Verify on block explorer: Check transaction status and logs
Test on testnet: Validate configuration before mainnet
📖 Reference: vesting.md
Token Vesting (Vault)
Configure token vesting with lockup periods and linear vesting using the Clanker vault system.
Overview
The vault system allows you to lock a percentage of the token supply with:
Lockup Duration: Cliff period before any tokens can be claimed
Vesting Duration: Linear vesting period after lockup
Recipient: Address that receives vested tokens
Basic Vault Configuration
const { txHash, waitForTransaction, error } = await clanker.deploy({
name: 'My Token',
symbol: 'TKN',
image: 'ipfs://...',
tokenAdmin: account.address,
vault: {
percentage: 10, // 10% of token supplylockupDuration: 2592000, // 30 days cliff (in seconds)vestingDuration: 2592000, // 30 days linear vestingrecipient: account.address,
},
// ... other config
});
Duration Values
Common duration values in seconds:
Duration
Seconds
1 hour
3600
1 day
86400
7 days
604800
14 days
1209600
30 days
2592000
60 days
5184000
90 days
7776000
180 days
15552000
1 year
31536000
Contract Limits
From the Solidity contracts:
Minimum Lockup Duration: 7 days (enforced on-chain)
Maximum Extension BPS: 9000 (90% of supply can go to extensions total)
Minimum to LP: 10% of supply must go to liquidity pool
vault: {
percentage: 10, // Up to 90% combined with other extensionslockupDuration: 604800, // Minimum 7 days (604800 seconds)vestingDuration: 2592000, // No minimum for vesting duration
}
Note: The vault is one of several possible extensions. The total of all extension percentages (vault + airdrop + etc.) cannot exceed 90%.
Check Claimable Amount
After deployment, check how many tokens are available to claim:
For a 10% vault with 30-day lockup and 30-day vesting:
Day 0: Token deployed, 10% locked in vault
↓
Day 1-30: Lockup period (nothing claimable)
↓
Day 31: Vesting begins
~3.33% claimable (1/30 of vaulted amount)
↓
Day 45: ~50% of vaulted tokens claimable
↓
Day 60: 100% claimable
Custom Recipient
Set a different address to receive vested tokens:
vault: {
percentage: 10,
lockupDuration: 2592000,
vestingDuration: 2592000,
recipient: '0x...treasury_address...', // Different from tokenAdmin
}
If not specified, recipient defaults to tokenAdmin.