dex-skills v0.1.0

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 clankerConfigForencodeFunctionData → viem tx
Token Standard ERC-20
Address Detection Transfer event in transaction logs
Private Key Format Hex with 0x prefix

Setup

Initialize dex-skills for Clanker
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.

Launch Example
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

Get 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

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.

Buy Example
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.

Sell Example
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

Trending Tokens
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

Transfer Event Detection
After the launch transaction is mined, Clanker does not return the token address directly. Instead, dex-skills parses the transaction receipt for a Transfer event, which contains the newly deployed token contract address. This detection is handled automatically.
Viem Transaction Pipeline
Clanker uses viem for transaction construction and submission. The SDK generates the configuration via clankerConfigFor, which is then encoded into calldata with encodeFunctionData and sent as a standard EVM transaction. dex-skills manages this entire pipeline.
Private Key Format
Clanker operates on Base, an EVM chain. Private keys must be in hex format with the 0x prefix.

Supported Social Links

Field Description
twitter Twitter/X profile URL
telegram Telegram group or channel URL
website Project website URL
discord Discord server invite URL