@lucoadam1/warp-launchpad-sdk
v1.0.2
Published
## Installation
Downloads
7
Readme
Warp Gate Dex SDK
Installation
Warp Gate Dex SDK is used to interact with Wrap Gate Dex Smart Contracts. It is available as an npm package.
Installation
npm install warpgate-launchpad-sdk
Usage
Importing the SDK
import { LaunchPadClient } from 'warpgate-launchpad-sdk';
const provider = new ethers.providers.JsonRpcProvider('https://rpc-mainnet.maticvigil.com/')
const signer = new ethers.Wallet('0x...', provider)
const client = new LaunchPadClient(signerOrProvider, "0x...Contract Address of LaunchPad")
Create a new LaunchPad
import { BigNumber, utils } from 'ethers';
client.createFixedSwapV2(
BigNumber.from(id), // auctionId
utils.formatBytes32String(signatureParams.name), // name
signatureParams.token0, // token0
signatureParams.token1, // token1
BigNumber.from(signatureParams.amountTotal0), // amountTotal0
BigNumber.from(signatureParams.amountTotal1), // amountTotal1
BigNumber.from(signatureParams.openAt), // openAt
BigNumber.from(signatureParams.closeAt), // closeAt
BigNumber.from(signatureParams.claimAt), // claimAt
BigNumber.from(0), // maxAmount1PerWallet
utils.formatBytes32String(""), // merkleroot
0, // releaseType
[], // releaseData
false, // enableAuctionHolder
true, // enableReserve
BigNumber.from(expiredTime), // expiredAt
signature // signature
)