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

Classes

LegacyCreatorFees

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:146 Legacy Creator Fee Claims for Clanker v0–v3.1 on Base.

Example

Constructors

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:150 LegacyCreatorFees

Properties

Methods

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:229 Claim legacy creator fees. Promise< | { error: undefined; txHash: `0x${string}`; } | { error: ClankerError; txHash: undefined; }> Transaction hash or error
Defined in: src/legacyFeeClaims/claimCreatorFees.ts:205 Simulate claiming legacy creator fees. Promise< | SimulateContractReturnType<Abi | readonly unknown[], string, readonly unknown[], Chain | undefined, undefined, undefined, undefined, readonly [never], undefined> | { error: ClankerError; }> Simulation result or error
Defined in: src/legacyFeeClaims/claimCreatorFees.ts:170 Get a transaction config for claiming legacy creator fees. LegacyClaimTransactionConfig Transaction config
Defined in: src/legacyFeeClaims/claimCreatorFees.ts:184 Get a transaction config for claiming via meta-locker (some v0 tokens). LegacyClaimTransactionConfig Transaction config

LegacyFeeClaims

Defined in: src/legacyFeeClaims/index.ts:264 SDK for claiming legacy fees from Clanker v0-v3.1 tokens. Creators of Clankers v0-v3.1 can claim their returned fees by interacting with the ClankerSafeErc20Spender contract. Creators have three main actions:
  1. Initialize their ownership of the token’s fees, with optional ability to set a different admin key
  2. Update the admin key that can trigger claims
  3. Claim the generated fees for their token

Constructors

Defined in: src/legacyFeeClaims/index.ts:268 LegacyFeeClaims

Properties

Methods

Defined in: src/legacyFeeClaims/index.ts:285 Build a Base-only transaction for claiming legacy fees (v0-v3.1). Promise<LegacyClaimTx> Transaction object with { kind, to, data, value? } View full generated declaration (402 lines) Defined in: src/legacyFeeClaims/index.ts:484 Get an abi-typed transaction for initializing token creator ownership. This must be called once per token by the original creator to claim ownership of the token’s fees. During this call, the creator can optionally set a different admin key to manage the token’s rewards. View full generated declaration (402 lines) Abi transaction config
Defined in: src/legacyFeeClaims/index.ts:425 Estimate claimable Uniswap v3 LP fees for a legacy position on Base. Promise<LegacyClaimableFees> Claimable fees with position owner, token0, token1, amount0, amount1
Defined in: src/legacyFeeClaims/index.ts:794 Get the stored creator address for a token. Returns the address that is authorized to claim fees for this token. Returns zero address if the token creator has not been initialized yet. Promise<`0x${string}`> The creator address for the token
Defined in: src/legacyFeeClaims/index.ts:812 Get the current Merkle root used for verifying token creator proofs. This is used internally by the contract to verify initialization proofs. Promise<`0x${string}`> The current token creator Merkle root View full generated declaration (402 lines) Defined in: src/legacyFeeClaims/index.ts:688 Get an abi-typed transaction for claiming token creator fees. This allows the authorized creator to transfer all accumulated fees from the Safe wallet to any recipient address. Only callable by the authorized creator for the specified token. View full generated declaration (402 lines) Abi transaction config View full generated declaration (402 lines) Defined in: src/legacyFeeClaims/index.ts:590 Get an abi-typed transaction for updating the token creator admin address. This allows the current creator to change the address that can trigger claims. Only callable by the current creator address for the specified token. View full generated declaration (402 lines) Abi transaction config
Defined in: src/legacyFeeClaims/index.ts:552 Initialize token creator ownership to enable fee claims. This must be called once per token by the original creator. The proof must be obtained from the Clanker team or frontend. During initialization, you can optionally set a different admin address to manage future claims. Promise< | { error: undefined; txHash: `0x${string}`; } | { error: ClankerError; txHash: undefined; }> Transaction hash or error
Defined in: src/legacyFeeClaims/index.ts:510 Simulate initializing token creator ownership. Promise<any> The simulated output
Defined in: src/legacyFeeClaims/index.ts:758 Claim token creator fees by transferring them from the Safe to a recipient. This transfers all accumulated fees for your token to the specified recipient. Only callable by the authorized creator address for the token. Note: Not all Clanker tokens can be sent to the zero address. If you get an error, consider sending to 0x000000000000000000000000000000000000dEaD instead. Promise< | { error: undefined; txHash: `0x${string}`; } | { error: ClankerError; txHash: undefined; }> Transaction hash or error
Defined in: src/legacyFeeClaims/index.ts:714 Simulate claiming token creator fees. Promise<any> The simulated output
Defined in: src/legacyFeeClaims/index.ts:651 Update the token creator admin address. This allows you to change which address can trigger fee claims for your token. Only callable by the current creator address. Promise< | { error: undefined; txHash: `0x${string}`; } | { error: ClankerError; txHash: undefined; }> Transaction hash or error
Defined in: src/legacyFeeClaims/index.ts:613 Simulate updating the token creator admin address. Promise<any> The simulated output

Interfaces

MerkleProofResult

Defined in: src/legacyFeeClaims/index.ts:839 Result of merkle proof generation

Properties


TokenCreatorEntry

Defined in: src/legacyFeeClaims/index.ts:831 Interface for token creator entries in the CSV data

Properties

Type Aliases

ClaimLegacyCreatorFeesInput

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:108 Input for claiming legacy creator fees. For v2/v3/v3.1: Only token and version are required. For v0/v1: Additional lockerParams are required.

Type Declaration


LegacyClaimableFees

Defined in: src/legacyFeeClaims/index.ts:245 Result of estimating claimable fees

Properties


LegacyClaimArgs

Defined in: src/legacyFeeClaims/index.ts:199 Input arguments for building a legacy fee claim transaction

Properties


LegacyClaimFeesInput

Defined in: src/legacyFeeClaims/index.ts:219

Deprecated

Use LegacyClaimArgs instead

LegacyClaimFeesTransaction

Defined in: src/legacyFeeClaims/index.ts:240

Deprecated

Use LegacyClaimTx instead

LegacyClaimTransactionConfig

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:83 Transaction config for legacy fee claiming. Compatible with walletClient.writeContract()

Properties


LegacyClaimTx

Defined in: src/legacyFeeClaims/index.ts:232 Transaction output for legacy fee claims

Properties


LegacyClaimTxKind

Defined in: src/legacyFeeClaims/index.ts:224 Transaction kind for legacy fee claims

LegacyTokenType

Defined in: src/legacyFeeClaims/index.ts:55 Legacy token type labels for v0–v3.1

LegacyVersion

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:31

LockerParams

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:93 v0/v1 locker params - required for versions 0 and 1

Properties

Variables

BASE_CHAIN_ID

Defined in: src/legacyFeeClaims/index.ts:27 Base chain ID

CLANKER_FACTORIES_BASE

Defined in: src/legacyFeeClaims/index.ts:43 Clanker factories on Base (v0–v3.1)

Type Declaration


ClankerClaimRewardsAbi

Defined in: src/legacyFeeClaims/index.ts:61

ClankerTokenDeployerAbi

Defined in: src/legacyFeeClaims/index.ts:94

EXPECTED_MERKLE_ROOT

Defined in: src/legacyFeeClaims/index.ts:921 Get the expected merkle root for the current dataset. This is the root that should be set in the contract.

LEGACY_FACTORIES

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:23 Clanker factory addresses on Base by version

Type Declaration


LEGACY_FEE_CLAIMS_ADDRESS

Defined in: src/legacyFeeClaims/index.ts:185 Contract address for ClankerSafeErc20Spender on Base network

LockerCollectFeesAbi

Defined in: src/legacyFeeClaims/index.ts:71

MetaLockerCollectFeesAbi

Defined in: src/legacyFeeClaims/index.ts:84

NonfungiblePositionManagerCollectAbi

Defined in: src/legacyFeeClaims/index.ts:137

NonfungiblePositionManagerOwnerOfAbi

Defined in: src/legacyFeeClaims/index.ts:104

NonfungiblePositionManagerPositionsAbi

Defined in: src/legacyFeeClaims/index.ts:114

UNISWAP_V3_BASE

Defined in: src/legacyFeeClaims/index.ts:34 Uniswap V3 addresses on Base

Type Declaration

Functions

getClaimLegacyCreatorFeesTransaction()

Defined in: src/legacyFeeClaims/claimCreatorFees.ts:279 Get a transaction config for claiming legacy creator fees.

Parameters

Returns

LegacyClaimTransactionConfig Transaction config

Example


getClaimLegacyFeesTransaction()

Defined in: src/legacyFeeClaims/index.ts:1012 Build a claim transaction for legacy Clanker v0–v3.1 fees on Base.
  • v2/v3/v3.1: call factory.claimRewards(token)
  • v0/v1: call locker.collectFees(recipient, tokenId) or metaLocker.collectFees(tokenId)

Parameters

Returns

Promise<LegacyClaimTx> Transaction object with { kind, to, data, value? }

getInitializeTokenCreatorTransaction()

View full generated declaration (402 lines) Defined in: src/legacyFeeClaims/index.ts:934 Get a transaction config for initializing token creator ownership.

Parameters

Returns

View full generated declaration (402 lines) Transaction config

getLegacyClaimableFees()

Defined in: src/legacyFeeClaims/index.ts:1154 Estimate claimable Uniswap V3 LP fees for a legacy position on Base. Reads ownerOf(positionId) and simulates collect() to get the claimable amounts.

Parameters

Returns

Promise<LegacyClaimableFees> Claimable fees with positionOwner, token0, token1, amount0, amount1

getTokenCreatorMerkleProof()

Defined in: src/legacyFeeClaims/index.ts:855 Build a merkle tree from token-creator entries and get a proof for a specific token.

Parameters

Returns

MerkleProofResult | null Merkle proof result or null if token not found

getTokenCreatorTransferTransaction()

View full generated declaration (402 lines) Defined in: src/legacyFeeClaims/index.ts:981 Get a transaction config for claiming token creator fees.

Parameters

Returns

View full generated declaration (402 lines) Transaction config

getUpdateTokenCreatorTransaction()

View full generated declaration (402 lines) Defined in: src/legacyFeeClaims/index.ts:958 Get a transaction config for updating the token creator admin address.

Parameters

Returns

View full generated declaration (402 lines) Transaction config

parseTokenCreatorCSV()

Defined in: src/legacyFeeClaims/index.ts:902 Parse CSV content into token-creator entries.

Parameters

Returns

TokenCreatorEntry[] Array of token-creator entries