Clanker
Clanker is a token launchpad on Base that uses the clanker-sdk
for token deployment. The launch process involves generating a configuration with
clankerConfigFor, encoding the function call data with
encodeFunctionData, and submitting a viem transaction.
The new token address is detected from a Transfer event in the transaction logs.
Chain
Base (Ethereum L2)
Key Details
| Property | Value |
|---|---|
| SDK | clanker-sdk |
| Launch Flow | clankerConfigFor → encodeFunctionData → viem tx |
| Token Standard | ERC-20 |
| Address Detection | Transfer event in transaction logs |
| Private Key Format | Hex with 0x prefix |
Setup
import { createSkills, getSkill } from "dex-skills";
const skills = createSkills({
wallets: {
base: {
privateKey: "0x-prefixed-hex-private-key",
rpcUrl: "https://mainnet.base.org",
},
},
});
const clanker = getSkill(skills, "clanker"); Launch a Token
Under the hood, dex-skills generates the Clanker configuration, encodes the contract call data, submits the transaction via viem, and parses the Transfer event from the receipt to extract the deployed token address.
const result = await clanker.launch({
name: "Clanker Token",
symbol: "CLNK",
description: "A token launched on Clanker via dex-skills.",
imageUrl: "https://example.com/token-logo.png",
initialBuyAmount: "0.001",
links: {
twitter: "https://x.com/clankertoken",
telegram: "https://t.me/clankertoken",
website: "https://clankertoken.xyz",
},
});
console.log("Token address:", result.tokenAddress);
console.log("Transaction:", result.txHash); Launch Parameters
| Parameter | Type | Description |
|---|---|---|
| name * | string | Display name of the token. |
| symbol * | string | Token ticker symbol. |
| description | string | Description of the token. |
| imageUrl | string | URL to the token image. Must be publicly accessible. |
| initialBuyAmount | string | Amount of ETH to spend on an initial buy immediately after launch. |
| links | object | Social links object with optional keys: twitter, telegram, website. |
Query Token Info
const token = await clanker.getTokenInfo("0xTokenContractAddress...");
console.log("Name:", token.name);
console.log("Symbol:", token.symbol);
console.log("Total Supply:", token.totalSupply);
console.log("Market Cap:", token.marketCap); List Tokens
const tokens = await clanker.listTokens({
limit: 20,
sortBy: "createdAt",
sortOrder: "desc",
});
for (const token of tokens) {
console.log(token.symbol, token.tokenAddress);
} Buy Tokens
Purchase tokens on Clanker by specifying the token address, ETH amount, and optional slippage.
const result = await clanker.buy({
tokenAddress: "0xTokenContractAddress...",
amount: "0.01",
slippage: 5,
});
console.log("Tx Hash:", result.txHash);
console.log("Tokens received:", result.tokenAmount); Sell Tokens
Sell tokens on Clanker by specifying the token address and amount of tokens to sell.
const result = await clanker.sell({
tokenAddress: "0xTokenContractAddress...",
amount: "1000000",
slippage: 5,
});
console.log("Tx Hash:", result.txHash);
console.log("ETH received:", result.nativeAmount); Get Trending
const trending = await clanker.getTrending({
category: "gainers",
limit: 20,
});
for (const token of trending) {
console.log(token.symbol, token.marketCap);
} Supported Methods
| Method | Supported |
|---|---|
| launch() | Yes |
| getTokenInfo() | Yes |
| listTokens() | Yes |
| buy() | Yes |
| sell() | Yes |
| getTrending() | Yes |
| getTradeHistory() | No |
| getHolders() | No |
| estimatePrice() | No |
Platform Notes
clankerConfigFor,
which is then encoded into calldata with
encodeFunctionData
and sent as a standard EVM transaction. dex-skills manages this entire pipeline.
0x prefix.
Supported Social Links
| Field | Description |
|---|---|
| Twitter/X profile URL | |
| telegram | Telegram group or channel URL |
| website | Project website URL |
| discord | Discord server invite URL |