clanker-sdk/v5 launches and manages Clanker v5 tokens. It uses the v4 method names, token fields and result format where the v5 contracts support them.
From clanker-sdk 5.0.0, the SDK launches v5 tokens only: the v3 and v4 launch methods throw. The v4 Clanker Class and the v3 Clanker Class still manage existing tokens.
Installation
clanker-sdk 5.0.0 and later. viem 2.49.3 or later is a peer dependency, so the SDK uses your project’s viem.
Launch a token
wallet and publicClient must use the same chain. deploy returns txHash, expectedAddress and waitForTransaction.
- A top-level
errormeans nothing was sent, so you can try again. - After the launch is sent,
deployreturns no top-levelerror.waitForTransactionreturns the launch or its error. - With a creator buy for another recipient,
transferTxHashis the transfer. If the transfer fails, the result hastransferErrorandfailedStep, and the token exists.
getDeployTransaction(token, { account }) builds the launch transaction without sending it.
Token fields
Token
Tax
dividends.share, burn and the integrator share together must not exceed 100. The rest of the tax after the Clanker fee goes to the reward recipients.
The Clanker fee is 10% of the tax, but at least 0.5% and at most 1% of the trade. At the default 1% tax, it is half the tax. While no holder meets minimumHolding, the dividend share goes to Clanker. Read the live policy with taxPolicy().
Pool, rewards and creator buy
v5 does not accept v4
fee, fees, salt, vault, airdrop, presale, sniperFees, other pool settings, locker or poolExtension, or the Both and Clanker reward tokens.
Creator buy
- The SDK picks the route for the native quote and for the stable quote of each chain. Another quote needs
devBuy.routeDataor thebuildBuyRouteoption. - Elysium has no HYPE/USDC pool, so a USDC creator buy there also needs
devBuy.routeDataorbuildBuyRoute. A HYPE creator buy needs no route. - The SDK simulates the launch and sets the minimum output 5% below the quote. Set
devBuySlippagePercentin the second argument ofdeployto change it. - The contract sends the bought tokens to the caller. If
devBuy.recipientortokenAdminis another address,deploysends them in a second transaction and returnstransferTxHash.
Chains
Launches are open on Base, BNB Chain, Monad, Robinhood Chain, X Layer, Arc and Elysium. Clanker no longer supports new launches on Ethereum, Arbitrum and Unichain. Their factories have launches turned off, so a launch there returns
Launches are not open on chain <id>. On Arc, the native coin is USDC.
Elysium
Elysium (chain ID 99901) needsclanker-sdk 5.1.0 or later. viem has no Elysium chain, so import elysium from clanker-sdk. Elysium has no public RPC, so pass your own RPC URL to both clients.
elysium.id is 99901, and clanker-sdk/v5 also exports it as ELYSIUM_CHAIN_ID. The token pairs with HYPE, and devBuy.ethAmount is in HYPE. ELYSIUM_USDC is the USDC pair address. In the CLI, use --chain elysium --rpc <url>.
Manage a token
The v5 client keeps the v4 method names. Each write returns{ txHash, error }.
- A claim pays the recipient’s whole balance in one currency, across all pools. An integrator claims with
claimRewards({ token, rewardRecipient: integrator }). - The admin of the creator slot follows creator rights, and
getTokenRewardsmarks that slot withrewardIsCreator. UseproposeCreatorRightsTransferandacceptCreatorRightsTransferto change it, orsafeTransferCreatorRightsto move it to a contract. - Holders check dividends with
withdrawableDividends({ token, holder })and claim up to 64 tokens at once withclaimDividends({ tokens }). getPoolConfig({ token })reads a launch’s settings, andgetTaxRates({ token, isBuy })reads the tax a trade pays now, including the anti-snipe fee. Its rates use a 1e24 scale, so 1% is10n ** 22n.- Each write has matching
get…Transactionand…Simulatemethods.
CLI
clanker-sdk deploy launches v5 tokens only. Without a name or symbol, it asks for each option. The rewards and token commands pick v4 or v5 for each token, and dividends available and dividends claim check and claim holder dividends.
Related
- Full v5 SDK reference: see
docs/v5.mdin the clanker-sdk repository. - Taxes, rewards and dividends: see Creator Rewards & Fees and Holder Dividends.
- Launches without the SDK: see API Deployments.
- The Admin page: see Managing a Token.