Skip to main content
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

The v5 client is in 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 error means nothing was sent, so you can try again.
  • After the launch is sent, deploy returns no top-level error. waitForTransaction returns the launch or its error.
  • With a creator buy for another recipient, transferTxHash is the transfer. If the transfer fails, the result has transferError and failedStep, and the token exists.
An error whose data.rawName is SEND_UNCERTAIN means the send itself failed, so the launch can exist. Check the wallet’s transactions before you call deploy again, because a second call launches a second token.
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.routeData or the buildBuyRoute option.
  • Elysium has no HYPE/USDC pool, so a USDC creator buy there also needs devBuy.routeData or buildBuyRoute. A HYPE creator buy needs no route.
  • The SDK simulates the launch and sets the minimum output 5% below the quote. Set devBuySlippagePercent in the second argument of deploy to change it.
  • The contract sends the bought tokens to the caller. If devBuy.recipient or tokenAdmin is another address, deploy sends them in a second transaction and returns transferTxHash.

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) needs clanker-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 getTokenRewards marks that slot with rewardIsCreator. Use proposeCreatorRightsTransfer and acceptCreatorRightsTransfer to change it, or safeTransferCreatorRights to move it to a contract.
  • Holders check dividends with withdrawableDividends({ token, holder }) and claim up to 64 tokens at once with claimDividends({ tokens }).
  • getPoolConfig({ token }) reads a launch’s settings, and getTaxRates({ token, isBuy }) reads the tax a trade pays now, including the anti-snipe fee. Its rates use a 1e24 scale, so 1% is 10n ** 22n.
  • Each write has matching get…Transaction and …Simulate methods.

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.