$npx -y skills add basezh/agent-skills-on-base --skill clankerDeploy 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 depl
| 1 | # Clanker SDK |
| 2 | |
| 3 | Deploy production-ready ERC20 tokens with built-in liquidity pools using the official Clanker TypeScript SDK. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | 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. |
| 8 | |
| 9 | ## Quick Start |
| 10 | |
| 11 | ### Installation |
| 12 | |
| 13 | ```bash |
| 14 | npm install clanker-sdk viem |
| 15 | # or |
| 16 | yarn add clanker-sdk viem |
| 17 | # or |
| 18 | pnpm add clanker-sdk viem |
| 19 | ``` |
| 20 | |
| 21 | ### Environment Setup |
| 22 | |
| 23 | Create a `.env` file with your private key: |
| 24 | |
| 25 | ```bash |
| 26 | PRIVATE_KEY=0x...your_private_key_here |
| 27 | ``` |
| 28 | |
| 29 | ### Basic Token Deployment |
| 30 | |
| 31 | ```typescript |
| 32 | import { Clanker } from 'clanker-sdk'; |
| 33 | import { createPublicClient, createWalletClient, http, type PublicClient } from 'viem'; |
| 34 | import { privateKeyToAccount } from 'viem/accounts'; |
| 35 | import { base } from 'viem/chains'; |
| 36 | |
| 37 | const PRIVATE_KEY = process.env.PRIVATE_KEY as `0x${string}`; |
| 38 | const account = privateKeyToAccount(PRIVATE_KEY); |
| 39 | |
| 40 | const publicClient = createPublicClient({ |
| 41 | chain: base, |
| 42 | transport: http(), |
| 43 | }) as PublicClient; |
| 44 | |
| 45 | const wallet = createWalletClient({ |
| 46 | account, |
| 47 | chain: base, |
| 48 | transport: http(), |
| 49 | }); |
| 50 | |
| 51 | const clanker = new Clanker({ wallet, publicClient }); |
| 52 | |
| 53 | const { txHash, waitForTransaction, error } = await clanker.deploy({ |
| 54 | name: 'My Token', |
| 55 | symbol: 'TKN', |
| 56 | image: 'ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi', |
| 57 | tokenAdmin: account.address, |
| 58 | metadata: { |
| 59 | description: 'My awesome token', |
| 60 | }, |
| 61 | context: { |
| 62 | interface: 'Clanker SDK', |
| 63 | }, |
| 64 | vanity: true, |
| 65 | }); |
| 66 | |
| 67 | if (error) throw error; |
| 68 | |
| 69 | const { address: tokenAddress } = await waitForTransaction(); |
| 70 | console.log('Token deployed at:', tokenAddress); |
| 71 | ``` |
| 72 | |
| 73 | ## Core Capabilities |
| 74 | |
| 75 | ### 1. Token Deployment |
| 76 | |
| 77 | Deploy tokens with full customization including metadata, social links, and pool configuration. |
| 78 | |
| 79 | **Basic deployment:** |
| 80 | - Token name, symbol, and image (IPFS) |
| 81 | - Description and social media links |
| 82 | - Vanity address generation |
| 83 | - Custom pool configurations |
| 84 | |
| 85 | **Reference:** [references/deployment.md](references/deployment.md) |
| 86 | |
| 87 | ### 2. Vault (Token Vesting) |
| 88 | |
| 89 | Lock a percentage of tokens with lockup and vesting periods: |
| 90 | |
| 91 | ```typescript |
| 92 | vault: { |
| 93 | percentage: 10, // 10% of token supply |
| 94 | lockupDuration: 2592000, // 30 days cliff (in seconds) |
| 95 | vestingDuration: 2592000, // 30 days linear vesting |
| 96 | recipient: account.address, |
| 97 | } |
| 98 | ``` |
| 99 | |
| 100 | **Reference:** [references/vesting.md](references/vesting.md) |
| 101 | |
| 102 | ### 3. Airdrops |
| 103 | |
| 104 | Distribute tokens to multiple addresses using Merkle tree proofs: |
| 105 | |
| 106 | ```typescript |
| 107 | import { createAirdrop, registerAirdrop } from 'clanker-sdk/v4/extensions'; |
| 108 | |
| 109 | const { tree, airdrop } = createAirdrop([ |
| 110 | { account: '0x...', amount: 200_000_000 }, |
| 111 | { account: '0x...', amount: 50_000_000 }, |
| 112 | ]); |
| 113 | |
| 114 | // Include in deployment |
| 115 | airdrop: { |
| 116 | ...airdrop, |
| 117 | lockupDuration: 86_400, // 1 day |
| 118 | vestingDuration: 86_400, // 1 day |
| 119 | } |
| 120 | ``` |
| 121 | |
| 122 | **Reference:** [references/airdrops.md](references/airdrops.md) |
| 123 | |
| 124 | ### 4. Rewards Configuration |
| 125 | |
| 126 | Configure trading fee distribution: |
| 127 | |
| 128 | ```typescript |
| 129 | rewards: { |
| 130 | recipients: [ |
| 131 | { |
| 132 | recipient: account.address, |
| 133 | admin: account.address, |
| 134 | bps: 5000, // 50% of fees |
| 135 | token: 'Both', // Receive both tokens |
| 136 | }, |
| 137 | { |
| 138 | recipient: '0x...', |
| 139 | admin: '0x...', |
| 140 | bps: 5000, // 50% of fees |
| 141 | token: 'Both', |
| 142 | }, |
| 143 | ], |
| 144 | } |
| 145 | ``` |
| 146 | |
| 147 | #### Token Type Options |
| 148 | |
| 149 | Choose which tokens each recipient receives from trading fees: |
| 150 | |
| 151 | | Token Type | Description | |
| 152 | |------------|-------------| |
| 153 | | `'Clanker'` | Receive only the deployed token | |
| 154 | | `'Paired'` | Receive only the paired token (e.g., WETH) | |
| 155 | | `'Both'` | Receive both tokens | |
| 156 | |
| 157 | #### Default Bankr Interface Fee |
| 158 | |
| 159 | When deploying via Bankr, use this default rewards configuration with 20% interface fee: |
| 160 | |
| 161 | ```typescript |
| 162 | // Bankr interface fee recipient |
| 163 | const BANKR_INTERFACE_ADDRESS = '0xF60633D02690e2A15A54AB919925F3d038Df163e'; |
| 164 | |
| 165 | rewards: { |
| 166 | recipients: [ |
| 167 | { |
| 168 | recipient: account.address, // Creator |
| 169 | admin: account.address, |
| 170 | bps: 8000, // 80% to creator |
| 171 | token: 'Paired', // Receive paired token (WETH) |
| 172 | }, |
| 173 | { |
| 174 | recipient: BANKR_INTERFACE_ADDRESS, // Bankr interface |
| 175 | admin: BANKR_INTERFACE_ADDRESS, |
| 176 | bps: 2000, // 20% to Bankr |
| 177 | token: 'Paired', // Receive paired token (WETH) |
| 178 | }, |
| 179 | ], |
| 180 | } |
| 181 | ``` |
| 182 | |
| 183 | **Reference:** [references/rewards.md](references/rewards.md) |
| 184 | |
| 185 | ### 5. Dev Buy |
| 186 | |
| 187 | Include an initial t |