githubEdit

btcSmart Contracts

Contract Addresses

  • LPLaunch: 0x120A3961590f887A99C2E144b89Ab904740697d1

  • LPLaunchState: 0xd3D4702d2D6D8E18B6B9c3C829194e3C06061697

  • LiquidityManager: 0x6cAb1674ea5392bB357B011024D3dB18ba6c4030

  • Hooks: 0xB301A7ec48412E31dCCdD7cE0Eb37711a87ac0cc

  • LPLaunchData: 0xba65D9F9B6dc4531F8eB6582794ACF546e39c0B4

  • Uniswap Contracts:

    • State View: 0xa3c0c9b65bad0b08107aa264b0f3db444b867a71

    • Position Manager: 0x7c5f5a4bbd8fd63184577525326123b519429bdc

    • Pool Manager: 0x498581ff718922c3f8e6a244956af099b2652b2b

    • Universal Router: 0x6ff5693b99212da76ad316178a184ab56d299b43

Contract Overview

The LiqCoin platform relies on three primary contracts:

  • LPLaunch: Manages coin launches, fundraising, and liquidity pool creation.

  • LPLaunchState: Stores coin metadata and launch configurations.

  • LiquidityManager: Handles liquidity pool interactions with Uniswap v4.

  • LPLaunchData: referral relationships, referral reward data, and claim feature.

Key functionalities include:

  • createLaunch: Initiates a new coin launch with specified parameters.

  • invest: Allows users to contribute ETH to a launch.

  • divest: Enables investors to exit before launch completion.

  • removeLiquidity: Withdraws liquidity after the lockup period.

  • claimFees: Claims accumulated LP fees.

Community Scripting Guide

To interact with LiqCoin contracts, developers can use JavaScript with ethers.js. Below is an example script demonstrating how to call the main functions. Ensure you have a provider (e.g., Infura, Alchemy) and a wallet with ETH on the Base mainnet.

Contract ABI

The script uses the following ABI, which includes the necessary functions and events for interacting with the LPLaunch contract. You can listen for events like CreateLaunch, Invest, Divest, RemoveLiquidity, and ClaimFees to monitor transaction outcomes.

For the complete ABI definitions of these contracts, visit our GitHub ABI Repository.

https://github.com/LiqCoin/abis?tab=readme-ov-filearrow-up-right

Prerequisites:

  • Install ethers.js: npm install ethers.

  • Replace YOUR_INFURA_KEY and YOUR_PRIVATE_KEY with your credentials.

  • Obtain the contract ABI from the compiled contract or use a tool like Hardhat.

  • Ensure the wallet has sufficient ETH for gas and transaction fees.

GraphQL : Use the GraphQL endpoint (https://api.studio.thegraph.com/query/55427/liqcoin-sepolia/version/latestarrow-up-right) to query launch data, such as active launches, funding progress, and LP details.

Last updated