Pump API

Constructor

Allows the SDK to be initiated with custom data.

How to use:

import { getFullnodeUrl } from '@mysten/sui/client';
import {
  MemezPumpSDK,
  Network,
} from '@interest-protocol/memez-fun-sdk';

const payload = {
  network: Network.MAINNET,
  fullNodeUrl: getFullnodeUrl(Network.MAINNET),
};

const memezPump = new MemezPumpSDK(payload);

Arguments

newPumpPool

Creates a pool using the Pump invariant.

How to use:

Arguments

  • tx {object} - Sui client Transaction class to chain move calls.

  • creationSuiFee {object} - The Sui fee to create a MemezPool.

  • memeCoinTreasuryCap {string} - The meme coin treasury cap.

  • totalSupply {string | number | bigint} - The total supply of the meme coin.

  • isProtected {boolean} - Whether to use pool requires a server signature authorization for users to buy coins.

  • developer {string} - The address that can claim the dev meme coin purchase and collect post bonding fees on Bluefin.

  • firstPurchase {object} - A Sui coin object to place the first meme coin purchase.

  • metadata {object} - A record of the social metadata of the meme coin.

  • configurationKey {string} - The configuration key to use for the MemezPool.

  • migrationWitness {string} - The migration witness to use for the MemezPool.

  • stakeholders {string[]} - The addresses of the stakeholders. It can be empty or undefined.

  • quoteCoinType {string} - The quote coin type to use for the MemezPool.

  • burnTax {number} - The amount of meme coin that will be burnt during sales in basis points.

  • virtualLiquidity {string | number | bigint} - The initial virtual liquidity in the pool.

  • targetQuoteLiquidity {string | number | bigint} - The amount of Sui the pool needs to collect to migrate the coin.

  • liquidityProvision {number} - The percentage of meme coin that will be added as liquidity after migration. It is expressed in basis points.

Return

pump

Swaps quote coin for a meme coin in a pool.

How to use

Arguments

  • tx {object} - Sui client Transaction class to chain move calls.

  • pool {string | object} - The objectId of the MemezPool or the full parsed pool.

  • quoteCoin {object} - The quote coin to sell for the meme coin.

  • referrer {string | null} - The address of the referrer.

  • signature {string | null} - The server signature. It is required for protected pools.

  • minAmountOut {string | number | bigint} - The minimum amount of meme coin expected to be received.

Return

  • tx {object} - Sui client Transaction class to chain move calls.

  • memeCoin {object} - The meme coin bought.

dump

Swaps meme coin for quote coin in a pool.

How to use

Arguments

  • tx {object} - Sui client Transaction class to chain move calls.

  • pool {string | object} - The objectId of the MemezPool or the full parsed pool.

  • memeCoin {object} - The meme coin to sell for Sui coin.

  • referrer {string | null} - The address of the referrer.

  • minAmountOut {string | number | bigint} - The minimum amount of sui coin expected to be received.

Return

  • tx {object} - Sui client Transaction class to chain move calls.

  • quoteCoin {object} - The Quote coin bought.

devClaim

Allows the developer to claim the first purchased coins. It can only be done after the pool migrates.

How to use

Arguments

  • tx {object} - Sui client Transaction class to chain move calls.

  • pool {string | object} - The objectId of the MemezPool or the full parsed pool.

Return

  • tx {object} - Sui client Transaction class to chain move calls.

  • memeCoin {object} - The meme coin bought by the developer during deployment.

migrate

Migrates the pool to DEX based on the MigrationWitness.

How to use

Arguments

  • tx {object} - Sui client Transaction class to chain move calls.

  • pool {string | object} - The objectId of the MemezPool or the full parsed pool.

Return

  • tx {object} - Sui client Transaction class to chain move calls.

  • migrator {object} - The hot potato migrator containing the balances.

quotePump

Quotes the amount of meme coin received after selling the quote coin.

How to use

Arguments

  • pool {string | object} - The objectId of the MemezPool or the full parsed pool.

  • amount {string | number | bigint} - The amount of Sui being sold.

Return

  • memeAmountOut {bigint} - The amount of meme coin that will be received.

  • quoteFee {bigint} - The swap fee paid in the Quote coin.

  • memeFee {bigint} - The swap fee paid in Meme coin.

quoteDump

Quotes the amount of quote coin received after selling the meme coin.

How to use

Arguments

  • pool {string | object} - The objectId of the MemezPool or the full parsed pool.

  • amount {string | number | bigint} - The amount of Meme coin being sold.

Return

  • quoteAmountOut {bigint} - The amount of quote coin that will be received.

  • quoteFee {bigint} - The swap fee paid in the Quote coin.

  • memeFee {bigint} - The swap fee paid in Meme coin.

  • burnFee {bigint} - Burn fee in meme coin.

getPumpData

Returns the Pump configuration for a specific integrator using a configuration key.

How to use

Arguments

  • configurationKey {string} - The struct tag of a configuration key. E.g. package::module::Key

  • totalSupply {string | bigint | number} - The total supply of the meme coin. E.g. 1 Sui would be 1e9.

  • quoteCoin {string} - The total supply of the meme coin. E.g. 1 Sui would be 1e9.

Return

  • burnTax - The tax value of the burner in bps.

  • virtualLiquidity - The starting virtual liquidity in the pool in Sui.

  • targetQuoteLiquidity - The amount of quote required for the pool to migrate.

  • liquidityProvision - The amount of Meme coin that will be supplied to a DEX after migration.

Last updated

Was this helpful?