For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ“œContract 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. Use dexIndex 0.

Trading Functions

buyTokens

Purchase tokens by sending HYPE. 1% fee applies (50/50 split: creator and protocol).

sellTokens

Sell tokens back to the bonding curve. 1% fee applies (50/50 split: creator and protocol). No approval required.

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.

Fee Functions

claimFees

Distributes accumulated fees for a token. Anyone can call; only the protocol and the token creator receive the 50/50 split. The caller does not receive fees.

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

Trading Events

TokensPurchased

TokensSold

Metadata Events

TokenMetadataUpdated

Data Structures

TokenMetadata

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

  • 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

Last updated