Skip to main content
clanker-sdk
clanker-sdk / index

Enumerations

FeeConfigs

Defined in: src/constants.ts:122

Enumeration Members


PoolPositions

Defined in: src/constants.ts:45

Enumeration Members

Interfaces

AirdropEntry

Defined in: src/utils/merkleTree.ts:4

Properties


AllowlistEntry

Defined in: src/utils/presale-allowlist.ts:14 Represents an allowlist entry with an address and allowed ETH amount

Properties


AllowlistProof

Defined in: src/utils/presale-allowlist.ts:24 Allowlist proof structure for contract calls

Properties

Type Aliases

Chain

Defined in: src/utils/clankers.ts:365

ClankerDeployment

Defined in: src/utils/clankers.ts:75

Type Parameters

Properties


Clankers

Defined in: src/utils/clankers.ts:361

ClankerTokenV3

Defined in: src/config/clankerTokenV3.ts:100

ClankerTokenV4

Defined in: src/config/clankerTokenV4.ts:278

DeployTokenOptions

Defined in: src/deployment/deploy.ts:46

Properties


RelatedV3_1

Defined in: src/utils/clankers.ts:48

Properties


RelatedV4

Defined in: src/utils/clankers.ts:53

Properties


Type

Defined in: src/utils/clankers.ts:363

Variables

A0X_ADDRESS

Defined in: src/constants.ts:22

ANON_ADDRESS

Defined in: src/constants.ts:19

BSC_USDT_ADDRESS

Defined in: src/constants.ts:28 USDT (Binance-Peg BSC-USD) on BSC – 18 decimals

CB_BTC_ADDRESS

Defined in: src/constants.ts:21

Chains

Defined in: src/utils/clankers.ts:366

CLANKER_ADDRESS

Defined in: src/constants.ts:18

ClankerDeployments

Defined in: src/utils/clankers.ts:369 All deployments of Clanker

CLANKERS

View full generated declaration (21,586 lines) Defined in: src/utils/clankers.ts:87

Type Declaration


DEFAULT_SUPPLY

Defined in: src/constants.ts:43

DEGEN_ADDRESS

Defined in: src/constants.ts:16

FEE_CONFIGS

Defined in: src/constants.ts:128

HIGHER_ADDRESS

Defined in: src/constants.ts:20

NATIVE_ADDRESS

Defined in: src/constants.ts:17

POOL_POSITIONS

Defined in: src/constants.ts:58

robinhood

Defined in: src/utils/chains/robinhood.ts:4

Type Declaration


ROBINHOOD_BLOCK_GAS_LIMIT

Defined in: src/utils/chains/robinhood.ts:29 Robinhood Chain block gas limit (2^50).

ROBINHOOD_WETH_ADDRESS

Defined in: src/utils/chains/robinhood.ts:32 Canonical WETH on Robinhood Chain (non-standard; not the OP predeploy).

WBNB_ADDRESS

Defined in: src/constants.ts:25 WBNB (Wrapped BNB) on BSC - use for BNB/BNB token pairs

WETH_ADDRESSES

Defined in: src/constants.ts:30

Functions

clankerConfigFor()

Defined in: src/utils/clankers.ts:385 Get a specific clanker deployment.

Type Parameters

Parameters

Returns

T | undefined The deployment if it exists.

createAllowlistMerkleTree()

Defined in: src/utils/presale-allowlist.ts:46 Create a Merkle tree from allowlist entries

Parameters

Returns

Object containing the Merkle tree, root, and formatted entries

Example


createMerkleTree()

Defined in: src/utils/merkleTree.ts:20

Parameters

Returns


encodeAirdropData()

Defined in: src/utils/merkleTree.ts:58

Parameters

Returns

`0x${string}`

encodeAllowlistInitializationData()

Defined in: src/utils/presale-allowlist.ts:114 Encode allowlist initialization data for starting a presale with a merkle root

Parameters

Returns

`0x${string}` Encoded bytes for the allowlistInitializationData parameter

Example


encodeAllowlistProofData()

Defined in: src/utils/presale-allowlist.ts:132 Encode allowlist proof data for buying into a presale with proof

Parameters

Returns

`0x${string}` Encoded bytes for the proof parameter

Example


findVanityAddress()

Defined in: src/services/vanityAddress.ts:21

Parameters

Returns

Promise<{ salt: `0x${string}`; token: `0x${string}`; }>

findVanityAddressV4()

Defined in: src/services/vanityAddress.ts:64

Parameters

Returns

Promise<{ salt: `0x${string}`; token: `0x${string}`; }>

getAllowedAmountForBuyer()

Defined in: src/utils/presale-allowlist.ts:213 Get the allowed amount for a specific buyer in a presale

Parameters

Returns

Promise<bigint> The allowed amount in wei (returns max uint256 if allowlist is disabled)

getAllowlistAddress()

Defined in: src/utils/presale-allowlist.ts:162 Get the allowlist contract address for a specific chain

Parameters

Returns

`0x${string}` | undefined The allowlist contract address, or undefined if not available on this chain

getAllowlistInfo()

Defined in: src/utils/presale-allowlist.ts:175 Get allowlist information for a presale

Parameters

Returns

Promise<{ enabled: boolean; merkleRoot: `0x${string}`; presaleOwner: `0x${string}`; }> Allowlist data including presale owner, merkle root, and enabled status

getAllowlistMerkleProof()

Defined in: src/utils/presale-allowlist.ts:83 Get a Merkle proof for a specific address in the allowlist

Parameters

Returns

`0x${string}`[] Array of proof hashes

Example


getMerkleProof()

Defined in: src/utils/merkleTree.ts:40

Parameters

Returns

`0x${string}`[]

getTickFromMarketCap()

Defined in: src/utils/market-cap.ts:7 Calculate starting tick and spacing for a token pooled against ETH.

Parameters

Returns

Tick information for the pool

getTickFromMarketCapStable()

Defined in: src/utils/market-cap.ts:53 Calculate the tick for a desired market cap priced in a stablecoin with an arbitrary number of decimals.

Parameters

Returns

number The tick value rounded down to the nearest tickSpacing Formula:
  • Total supply: 100B tokens (10^11 * 10^18 = 10^29)
  • Price per token = (marketCap * 10^stableDecimals) / 10^29
  • tick = log(price) / log(1.0001)

getTickFromMarketCapUSDC()

Defined in: src/utils/market-cap.ts:35 Calculate the tick for a desired market cap in USDC (6 decimals)

Parameters

Returns

number The tick value rounded to the nearest tickSpacing Formula:
  • Total supply: 100B tokens (10^11 * 10^18 with decimals = 10^29)
  • USDC: 6 decimals (10^6)
  • Price per token = (marketCap * 10^6) / 10^29 = marketCap / 10^23
  • tick = log(price) / log(1.0001)

predictTokenAddressV4()

Defined in: src/services/vanityAddress.ts:102 Predict the token address for a V4 deployment with a custom salt using CREATE2. The Clanker contract uses: keccak256(abi.encode(tokenAdmin, salt)) as the actual CREATE2 salt.

Parameters

Returns

`0x${string}` The predicted token address

verifyBuyerAllowance()

Defined in: src/utils/presale-allowlist.ts:244 Helper to verify if a buyer is allowed to purchase a specific amount

Parameters

Returns

Promise<{ allowedAmountEth: number; allowedAmountWei: bigint; isAllowed: boolean; }> Object with isAllowed boolean and allowedAmount in ETH