API Reference

Complete reference for all LiquidLaunch contract functions, events, and constants.

Contract Address

  • LiquidLaunch: 0xDEC3540f5BA6f2aa3764583A9c29501FeB020030

Functions

Token Creation

createToken

function createToken(
    string memory name,
    string memory symbol,
    string memory image_uri,
    string memory description,
    string memory website,
    string memory twitter,
    string memory telegram,
    string memory discord,
    uint8 dexIndex
) external payable returns (address tokenAddress)

Creates a new token with bonding curve trading. Any HYPE sent with this transaction will be automatically used to purchase tokens for the creator as anti-sniper protection.

Trading Functions

buyTokens

Purchase tokens by sending HYPE. 1% fee applies.

sellTokens

Sell tokens back to bonding curve. 1% fees applies. An approval is not required to sell tokens to the bonding curve.

Liquidity & Price Functions

getLiquidity

Get current virtual reserves for a token.

estimateBuy

Estimate tokens received for HYPE input (includes 1% fee deduction).

estimateSell

Estimate HYPE received for token input (includes 1% fee deduction).

Token Information

getTokenMetadata

Get complete token metadata and state.

getTokenCreator

Get the creator address for a token.

getTokenCount

Get total number of tokens created.

getPaginatedTokensWithMetadata

Get tokens and metadata with pagination.

Token State Functions

getTokenFrozenStatus

Check if token is frozen for bonding.

getTokenBondingStatus

Check if token has been bonded to DEX.

Bonding Functions

completeBonding

Graduate token to HyperSwap. Can be called by anyone once bonding curve completes and token is frozen.

Fee Functions

claimFees

Claim accumulated DEX fees. Only works for bonded tokens.

previewClaimFees

Preview fees available for claiming. Must be called using a static call.

getClaimedFeesAndBurnedTokens

Get total fees claimed and tokens burned for a token.

Events

Token Lifecycle

TokenCreated

TokenFrozen

TokenBonded

Trading Events

TokensPurchased

TokensSold

Fee Events

FeesClaimed

BondFeeCollected

Metadata Events

TokenMetadataUpdated

Data Structures

TokenMetadata

FrozenToken

Constants

Token Economics

Error Codes

General Errors

  • ZeroAddress(): Address cannot be zero

  • ZeroAmount(): Amount cannot be zero

  • EthTransferFailed(): ETH transfer failed

  • TokenTransferFailed(): Token transfer failed

  • InsufficientBalance(): Insufficient balance

Token Lifecycle Errors

  • TokenNotCreatedByFactory(): Token not created by this factory

  • TokenCreationFailed(): Token creation failed

  • TokenFrozen(): Token is frozen

  • TokenNotFrozen(): Token is not frozen

  • TokenAlreadyBonded(): Token already bonded

  • TokenNotFound(): Token not found

Trading Errors

  • TokenPurchaseFailed(): Token purchase failed

  • InsufficientLiquidity(): Insufficient liquidity

  • CreatorCannotSellYet(): Creator cannot sell yet (1-hour lock)

Authorization Errors

  • UnauthorizedMetadataUpdate(): Unauthorized metadata update

This reference covers all publicly accessible functions and events in the LiquidLaunch contract.

Last updated