Interfaces

MemezPool

It represents a Memez Pool.

export interface MemezPool<T> {
  objectId: string;
  poolType: string;
  curveType: string;
  memeCoinType: string;
  usesTokenStandard: boolean;
  ipxMemeCoinTreasury: string;
  metadata: Record<string, string>;
  migrationWitness: string;
  progress: string;
  stateId: string;
  dynamicFieldDataId: string;
  curveState: T;
}
  • objectId: The Sui Object id of this pool.

  • poolType: The struct tag of the pool.

  • curveType: It denotes the possible variants of the pool. E.g. Stable, Auction and Pump.

  • memeCoinType: The struct tag of the Meme coin.

  • usesTokenStandard: Denotes if the pool uses the token standard.

  • ipxMemeCoinTreasury: The id of the Meme coin Treasury.

  • metadata: A map of the meme coin metadata.

  • migrationWitness: The struct tag of the migrator witness. It shows to which DEX the pool is going to migrate to.

  • progress: The current status of the pool. E.g. Bonding, Migrating or Migrated.

  • stateId: The id of of the state object to fetch the inner state.

  • dynamicFieldDataId: The id of the dynamic field holding the inner state.

  • curveState: The inner state related to the variant.

PumpState

Represents the state of the Pump Pool that will be saved in the property curveState in the Memez Pool.

export interface PumpState {
  devPurchase: bigint;
  liquidityProvision: bigint;
  migrationFee: bigint;
  virtualLiquidity: bigint;
  targetSuiLiquidity: bigint;
  suiBalance: bigint;
  memeBalance: bigint;
  burnTax: number;
  swapFee: number;
}
  • devPurchase: The coins bought by the developer.

  • liquidityProvision: The amount of meme coin that will be added liquidity.

  • migrationFee: The payment in Sui that will be charged during migration.

  • virtualLiquidity: The virtual Sui liquidity to set a floor price.

  • targetSuiLiquidity: The amount of Sui required to migrate.

  • suiBalance: The current amount of Sui in the pool.

  • memeBalance: The amount of meme coin in the pool.

  • burnTax: The burn tax percentage in bips.

  • swapTax: The swap fee percentage in bips.

Network

An enum referring to the current network being used.

export enum Network {
  Mainnet = 'mainnet',
  Testnet = 'testnet',
}
  • Mainnet: Sui Network main net

  • Testnet: Sui Network test net.

Packages

An object containing the packages to interact with Memez.

export const PACKAGES = {
  [Network.Mainnet]: {
    MEMEZ_FUN: normalizeSuiAddress('0x0'),
    ACL: normalizeSuiAddress('0x0'),
    VESTING: normalizeSuiAddress('0x0'),
    MEMEZ_MIGRATOR: normalizeSuiAddress('0x0'),
  },
  [Network.Testnet]: {
    MEMEZ_FUN: normalizeSuiAddress(
      '0x3996f5555301c5431b04696aeb762d6e17ab067d1e81232c5eddc2cc3907d843'
    ),
    ACL: normalizeSuiAddress(
      '0xc201002dcf8e7b1e1850e2420980d5a7aae14bdfabc7b1e186c9a0ee749aa384'
    ),
    VESTING: normalizeSuiAddress(
      '0x8f5393f347cdc7afb58bedec29853904c8e625fd5a23109563f851f127bce450'
    ),
    MEMEZ_MIGRATOR: normalizeSuiAddress(
      '0xca0cd5448f4876f24d3e93c57637bd868ac6aec0d8bb69f658272d67a4ebf35f'
    ),
  },
};
  • MEMEZ_FUN: The address of the core Memez package.

  • ACL: The package of the Memez admin package.

  • VESTING: The package of the vesting package of Memez package.

  • MEMEZ_MIGRATOR: The package of the migrator.

Shared Objects

An object containing the shared objects to interact with Memez. Each object has a mutable and immutable reference for optimization purposes.

export const SHARED_OBJECTS: Record<Network, MemezFunSharedObjects> = {
  [Network.Mainnet]: {
    ACL: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
    VERSION: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
    CONFIG: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
    MIGRATOR_LIST: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId('0x0'),
        initialSharedVersion: '1',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
  } as const,
  [Network.Testnet]: {
    ACL: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0x27c31f7aa73c46084fd2aa6cbef85f959e9e1027b69cbdd9a0ed6fdd0bf37b38'
        ),
        initialSharedVersion: '129657854',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0x27c31f7aa73c46084fd2aa6cbef85f959e9e1027b69cbdd9a0ed6fdd0bf37b38'
        ),
        initialSharedVersion: '129657854',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
    MIGRATOR_LIST: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0xff217d90604362cdd6db15d340222b5fd19751f77476a877a0e1c44a686cec03'
        ),
        initialSharedVersion: '129657868',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0xff217d90604362cdd6db15d340222b5fd19751f77476a877a0e1c44a686cec03'
        ),
        initialSharedVersion: '129657868',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
    VERSION: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0x7b4207b87ed6dee6ee5dfc26dea4dcb4295618b7c2cb0258b3fdaf1b27406b6b'
        ),
        initialSharedVersion: '129657868',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0x7b4207b87ed6dee6ee5dfc26dea4dcb4295618b7c2cb0258b3fdaf1b27406b6b'
        ),
        initialSharedVersion: '129657868',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
    CONFIG: {
      IMMUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0xad9bffb261f1271a0430f74c3d4321d6db4e9f6a96df95e31398bb4fe5074567'
        ),
        initialSharedVersion: '129657868',
        mutable: false,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
      MUT: Inputs.SharedObjectRef({
        objectId: normalizeSuiObjectId(
          '0xad9bffb261f1271a0430f74c3d4321d6db4e9f6a96df95e31398bb4fe5074567'
        ),
        initialSharedVersion: '129657868',
        mutable: true,
      }) as ReturnType<typeof Inputs.SharedObjectRef>,
    },
  } as const,
};
  • ACL: Shared object holding the current whitelisted admins.

  • VERSION: Shared object containing the latest version of the package.

  • CONFIG: Shared object contain all different configurations:

    • Fees

    • Pump State

    • Stable State

    • Auction State

  • MIGRATION_LIST: Shared object contain the allowed migrators.

Config Keys

The configuration supports various values per integrator. For example the fees for Recrd and Default keys will have different values. This is set by the admin.

export const CONFIG_KEYS = {
  [Network.Mainnet]: {
    DEFAULT: '',
  },
  [Network.Testnet]: {
    DEFAULT: `${PACKAGES[Network.Testnet].MEMEZ_FUN}::memez_config::DefaultKey`,
  },
} as const;
  • DEFAULT: This is key to get the default parameters.

Migrator Witnesses

Record of the current allowed migrators.

export const MIGRATOR_WITNESSES = {
  [Network.Mainnet]: {
    TEST: '',
  },
  [Network.Testnet]: {
    TEST: `${PACKAGES[Network.Testnet].MEMEZ_MIGRATOR}::test_migrator::Witness`,
  },
} as const;
  • TEST: Currently we have a test migrator that returns the balances.

Last updated