> For the complete documentation index, see [llms.txt](https://docs.interestprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.interestprotocol.com/overview/sui/memez.gg/memez.fun/sdk/interfaces.md).

# Interfaces

## <mark style="color:yellow;">MemezPool</mark>

**It represents a Memez Pool.**

```typescript
export interface MemezPool<T> {
  objectId: string;
  poolType: string;
  curveType: string;
  memeCoinType: string;
  quoteCoinType: string;
  publicKey: string | null;
  ipxMemeCoinTreasury: string;
  metadata: Record<string, string>;
  migrationWitness: string;
  progress: string;
  stateId: string;
  developer: string;
  curveState: T;
}
```

* <mark style="color:yellow;">**objectId:**</mark> The Sui Object id of this pool.
* <mark style="color:yellow;">**poolType:**</mark> The struct tag of the pool.
* <mark style="color:yellow;">**curveType:**</mark> It denotes the possible variants of the pool. E.g. Stable, Auction and Pump.
* <mark style="color:yellow;">**memeCoinType:**</mark> The struct tag of the Meme coin.
* <mark style="color:yellow;">**quoteCoinType:**</mark> The struct tag of the Quote coin.
* <mark style="color:yellow;">**publicKey:**</mark> Protected pools have a public key to verify agaisnt the signatures submitted via pump function.
* <mark style="color:yellow;">**ipxMemeCoinTreasury:**</mark> The id of the Meme coin Treasury.
  * [Check out the IPX Treasury standard](/overview/sui/ipx-coin-standard.md)
* <mark style="color:yellow;">**metadata:**</mark> A map of the meme coin metadata.
* <mark style="color:yellow;">**migrationWitness**</mark>**:** The struct tag of the migrator witness. It shows to which DEX the pool is going to migrate to.
* <mark style="color:yellow;">**progress:**</mark> The current status of the pool. E.g. Bonding, Migrating or Migrated.
* <mark style="color:yellow;">**stateId:**</mark> The id of of the state object to fetch the inner state.
* <mark style="color:yellow;">**developer:**</mark> The address of the user that can claim dev first purchase and earn post bonding fees.
* <mark style="color:yellow;">**curveState:**</mark> The inner state related to the variant.

## <mark style="color:yellow;">PumpState</mark>

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

```typescript
export interface PumpState {
  devPurchase: bigint;
  liquidityProvision: bigint;
  migrationFee: number;
  virtualLiquidity: bigint;
  targetQuoteLiquidity: bigint;
  quoteBalance: bigint;
  memeBalance: bigint;
  burnTax: number;
  memeSwapFee: number;
  quoteSwapFee: number;
  allocation: Allocation;
  memeReferrerFee: number;
  quoteReferrerFee: number;
}
```

* <mark style="color:yellow;">**devPurchase:**</mark> The coins bought by the developer.
* <mark style="color:yellow;">**liquidityProvision:**</mark> The amount of meme coin that will be added liquidity.
* <mark style="color:yellow;">**migrationFee:**</mark> The payment in Sui that will be charged during migration.
* <mark style="color:yellow;">**virtualLiquidity:**</mark> The virtual Sui liquidity to set a floor price.
* <mark style="color:yellow;">**targetQuoteLiquidity:**</mark> The amount of Quote coin required to migrate.
* <mark style="color:yellow;">**quoteBalance:**</mark> The current amount of Quote coin in the pool.
* <mark style="color:yellow;">**memeBalance:**</mark> The amount of meme coin in the pool.
* <mark style="color:yellow;">**burnTax:**</mark> The burn tax percentage in bps.
* <mark style="color:yellow;">**memeSwapFee:**</mark> The meme coin swap fee percentage in bps.
* <mark style="color:yellow;">**quoteSwapFee:**</mark> The Quote coin swap fee percentage in bps.
* <mark style="color:yellow;">**memeReferrerFee:**</mark> The meme coin referral fee percentage in bps.
* <mark style="color:yellow;">**quoteReferrerFee:**</mark> The Quote coin referral fee percentage in bps
* <mark style="color:yellow;">**allocation:**</mark> Balance of meme coins to be sent o stake holders after migration.

## <mark style="color:yellow;">Network</mark>

**An enum referring to the current network being used.**

```typescript
export enum Network {
  Mainnet = 'mainnet',
  Testnet = 'testnet',
}
```

* <mark style="color:yellow;">**Mainnet:**</mark> Sui Network main net
* <mark style="color:yellow;">**Testnet:**</mark> Sui Network test net.

## <mark style="color:yellow;">Packages</mark>

**An object containing the packages to interact with Memez.**

{% hint style="warning" %}
Testnet packages are out of date. Please use mainnet packages only!
{% endhint %}

```typescript
export const PACKAGES = {
  [Network.TESTNET]: {
    MEMEZ_FUN: {
      original: normalizeSuiAddress(
        '0xcad2e05e9771c6b1aad35d4f3df42094d5d49effc2a839e34f37ae31dc373fe7'
      ),
      latest: normalizeSuiAddress(
        '0xcad2e05e9771c6b1aad35d4f3df42094d5d49effc2a839e34f37ae31dc373fe7'
      ),
    },
    MEMEZ: {
      original: normalizeSuiAddress(
        '0x17209c541f1a372b811a42eaf95e62cd1eb46127e438f052432bd1c2318bc1c9'
      ),
      latest: normalizeSuiAddress(
        '0x17209c541f1a372b811a42eaf95e62cd1eb46127e438f052432bd1c2318bc1c9'
      ),
    },
    VESTING: {
      original: normalizeSuiAddress(
        '0xbc838799ce0c571fddb5c650adae05ed141070501558743f2f28d2d3fbede8d6'
      ),
      latest: normalizeSuiAddress(
        '0xbc838799ce0c571fddb5c650adae05ed141070501558743f2f28d2d3fbede8d6'
      ),
    },
    TEST_MEMEZ_MIGRATOR: {
      original: normalizeSuiAddress(
        '0x1e15037693e28af09771953ec8179d104fff7a225e5a5d1a65034a3636451026'
      ),
      latest: normalizeSuiAddress(
        '0x1e15037693e28af09771953ec8179d104fff7a225e5a5d1a65034a3636451026'
      ),
    },
    MEMEZ_WITNESS: {
      original: normalizeSuiAddress(
        '0x6083aeb2d22514d0e849fdde75b60c7d0f857facefb3b2d7d2e975b78d8a0c75'
      ),
      latest: normalizeSuiAddress(
        '0x6083aeb2d22514d0e849fdde75b60c7d0f857facefb3b2d7d2e975b78d8a0c75'
      ),
    },
    INTEREST_ACL: {
      original: normalizeSuiAddress(
        '0x32ffaa298a6d6528864bf2b32acfcb7976a95e26dcc24e40e2535c0551b9d68a'
      ),
      latest: normalizeSuiAddress(
        '0x32ffaa298a6d6528864bf2b32acfcb7976a95e26dcc24e40e2535c0551b9d68a'
      ),
    },
    XPUMP_MIGRATOR: {
      original: normalizeSuiAddress('0x0'),
      latest: normalizeSuiAddress('0x0'),
    },
    WALLET: {
      original: normalizeSuiAddress('0x0'),
      latest: normalizeSuiAddress('0x0'),
    },
    ROUTER: {
      original: normalizeSuiAddress('0x0'),
      latest: normalizeSuiAddress('0x0'),
    },
    IPX_COIN_STANDARD: {
      original: normalizeSuiAddress('0x0'),
      latest: normalizeSuiAddress('0x0'),
    },
  },
  [Network.MAINNET]: {
    MEMEZ_FUN: {
      original: normalizeSuiAddress(
        '0x779829966a2e8642c310bed79e6ba603e5acd3c31b25d7d4511e2c9303d6e3ef'
      ),
      latest: normalizeSuiAddress(
        '0x7e6aa6e179466ab2814425a780b122575296d011119fa69d27f289f5a28814bd'
      ),
    },
    MEMEZ: {
      original: normalizeSuiAddress(
        '0x6101835e1df12852440c3ad3f079130e31702fe201eb1e3b77d141a0c6a58539'
      ),
      latest: normalizeSuiAddress(
        '0x6101835e1df12852440c3ad3f079130e31702fe201eb1e3b77d141a0c6a58539'
      ),
    },
    VESTING: {
      original: normalizeSuiAddress(
        '0x1a184ecf7d0652f8f1285a3b0b2e644bf86ae1742317fcdaa9b11a7f3a30bd70'
      ),
      latest: normalizeSuiAddress(
        '0x1a184ecf7d0652f8f1285a3b0b2e644bf86ae1742317fcdaa9b11a7f3a30bd70'
      ),
    },
    TEST_MEMEZ_MIGRATOR: {
      original: normalizeSuiAddress(
        '0x4078fe9f8e60191b1ec85d4092b4ec070736dd7c4a3b0c69b1f121c4c6aee910'
      ),
      latest: normalizeSuiAddress(
        '0x4078fe9f8e60191b1ec85d4092b4ec070736dd7c4a3b0c69b1f121c4c6aee910'
      ),
    },
    MEMEZ_WITNESS: {
      original: normalizeSuiAddress(
        '0x6e38cc853e404376b1dc969178aee2c81799cf23af7171e74e492f6786db1cbe'
      ),
      latest: normalizeSuiAddress(
        '0x6e38cc853e404376b1dc969178aee2c81799cf23af7171e74e492f6786db1cbe'
      ),
    },
    INTEREST_ACL: {
      original: normalizeSuiAddress(
        '0xb877fe150db8e9af55c399b4e49ba8afe658bd05317cb378c940344851125e9a'
      ),
      latest: normalizeSuiAddress(
        '0xb877fe150db8e9af55c399b4e49ba8afe658bd05317cb378c940344851125e9a'
      ),
    },
    XPUMP_MIGRATOR: {
      original: normalizeSuiAddress(
        '0x7ec68f4115dc2944426239b13ce6804dd9971b24069fb4efe88360d29b17f0ce'
      ),
      latest: normalizeSuiAddress(
        '0xd4fd7ef75d33f92be5bd11f8cbd06cd15b8df68c6f5016fac6700808de0ff76e'
      ),
    },
    WALLET: {
      original: normalizeSuiAddress(
        '0x21700f31d563949214e0411f22a3cf64928f6a3e5b3c13f830a30d6884fe135b'
      ),
      latest: normalizeSuiAddress(
        '0x21700f31d563949214e0411f22a3cf64928f6a3e5b3c13f830a30d6884fe135b'
      ),
    },
    ROUTER: {
      original: normalizeSuiAddress(
        '0x07cb654d8ae22bd18fff08f322d99fdf9d1673712812329b127430b155dc44ff'
      ),
      latest: normalizeSuiAddress(
        '0x07cb654d8ae22bd18fff08f322d99fdf9d1673712812329b127430b155dc44ff'
      ),
    },
    IPX_COIN_STANDARD: {
      original: normalizeSuiAddress(
        '0xa204bd0d48d49fc7b8b05c8ef3f3ae63d1b22d157526a88b91391b41e6053157'
      ),
      latest: normalizeSuiAddress(
        '0xa204bd0d48d49fc7b8b05c8ef3f3ae63d1b22d157526a88b91391b41e6053157'
      ),
    },
  },
} as const;
```

* <mark style="color:yellow;">**MEMEZ\_FUN:**</mark> The address of the Memez launchpad package.
* <mark style="color:yellow;">**MEMEZ:**</mark> The address of the OTW Memez package.
* <mark style="color:yellow;">**INTEREST\_ACL:**</mark> The package of the Memez admin package.
* <mark style="color:yellow;">**VESTING:**</mark> The package of the vesting package of Memez package.
* <mark style="color:yellow;">**MEMEZ\_MIGRATOR:**</mark> The package of the migrator.&#x20;
* <mark style="color:yellow;">**MEMEZ\_WITNESS:**</mark> A package containing the configuration witnesses.
* <mark style="color:yellow;">**XPUMP\_MIGRATOR:**</mark> The Blast.fun migrator package.
* <mark style="color:yellow;">**WALLET:**</mark> The Memez wallet package to avoid bricking wallets.
* <mark style="color:yellow;">**ROUTER:**</mark> The Memez router package that creates wallets for referrers when buying and selling.
* <mark style="color:yellow;">**IPX\_COIN\_STANDARD:**</mark> The IPX coin standard that allowed protected access to update coin metadata and supply.

## <mark style="color:yellow;">Shared Objects</mark>

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

```typescript
export const SHARED_OBJECTS = {
  [Network.TESTNET]: {
    ACL: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0xc8502b2e13ce57165218abaacd36850c7ea70a5ef4c0b80053eb0f6aaf1d338e'
      ),
      initialSharedVersion: '395367236',
      mutable,
    }),
    VERSION: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0x4662e671861a4cb72ee0fe03193e3dd62645465f7cc61ce13422c8384bc8af46'
      ),
      initialSharedVersion: '395367301',
      mutable,
    }),
    CONFIG: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0x0c8812c7ab6ae0a900a015c7db0048b20dad072c10faaef4759610a7ada97a73'
      ),
      initialSharedVersion: '395367301',
      mutable,
    }),
    XPUMP_MIGRATOR_CONFIG: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId('0x0'),
      initialSharedVersion: '0',
      mutable,
    }),
    WALLET_REGISTRY: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId('0x0'),
      initialSharedVersion: '0',
      mutable,
    }),
  },
  [Network.MAINNET]: {
    ACL: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0x091bd217c6030076a8a97673e3b9f74e0f48bc3035dcb5d5daaf50a8a2d40b7f'
      ),
      initialSharedVersion: '549909164',
      mutable,
    }),
    VERSION: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0x2319e3e76dfad73d8f4684bdbf42be4f32d8ce4521dd61becc8261dc918d82c0'
      ),
      initialSharedVersion: '597477043',
      mutable,
    }),
    CONFIG: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0x9c665993f61a902475b083036da75240aa203bb874ebce4031810b589e485a61'
      ),
      initialSharedVersion: '597477043',
      mutable,
    }),
    XPUMP_MIGRATOR_CONFIG: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0x6ac620306c77e9fb452123b8832b56cb4ec7f9bb638e42d3c6eeecdf173a9498'
      ),
      initialSharedVersion: '603610952',
      mutable,
    }),
    WALLET_REGISTRY: ({ mutable }: { mutable: boolean }) => ({
      objectId: normalizeSuiObjectId(
        '0xc6ed6d218aff361ed293ba3eaf2805772275c9dc87f650a0f8df9c80471c5fbe'
      ),
      initialSharedVersion: '611022341',
      mutable,
    }),
  },
} as const;
```

* <mark style="color:yellow;">**ACL:**</mark> Shared object holding the current whitelisted admins.
* <mark style="color:yellow;">**VERSION:**</mark> Shared object containing the latest version of the package.
* <mark style="color:yellow;">**CONFIG:**</mark> Shared object contain all different configurations:
  * Fees
  * Migration Witnesses
  * Quote coins
  * Public Key
  * Pump State
  * Stable State
  * Auction State
* <mark style="color:yellow;">**XPUMP\_MIGRATOR\_CONFIG:**</mark> The Blast.fun migrator configuration shared object.
* <mark style="color:yellow;">**WALLET\_REGISTRY:**</mark> The Memez wallet shared object. It ensures, there is only one wallet per address.

## <mark style="color:yellow;">Config Keys</mark>

**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.**

```typescript
export const CONFIG_KEYS = {
  [Network.Mainnet]: {
    MEMEZ: '',
    XPUMP: ''
  },
  [Network.Testnet]: {
    MEMEZ: `${PACKAGES[Network.MAINNET].MEMEZ_WITNESS.original}::memez_witness::Memez`,
    XPUMP:
      '0x5afcb4c691bd3af2eb5de4c416b2ed501e843e81209f83ce6928bc3a10d0205c::xpump::ConfigKey',
  },
} as const;
```

* <mark style="color:yellow;">**MEMEZ:**</mark> This is the memez configuration.
* <mark style="color:yellow;">**XPUMP:**</mark> This is the Blast.fun configuration.

## <mark style="color:yellow;">Migrator Witnesses</mark>

**Record of the current allowed migrators.**

```typescript
export const MIGRATOR_WITNESSES = {
  [Network.TESTNET]: {
    TEST: `${PACKAGES[Network.TESTNET].TEST_MEMEZ_MIGRATOR.original}::dummy::Witness`,
    XPUMP: `${PACKAGES[Network.TESTNET].XPUMP_MIGRATOR.original}::xpump_migrator::Witness`,
  },
  [Network.MAINNET]: {
    TEST: `${PACKAGES[Network.MAINNET].TEST_MEMEZ_MIGRATOR.original}::dummy::Witness`,
    XPUMP: `${PACKAGES[Network.MAINNET].XPUMP_MIGRATOR.original}::xpump_migrator::Witness`,
  },
} as const;
```

* <mark style="color:yellow;">**TEST:**</mark> Currently we have a test migrator that returns the balances for testing purposes.
* <mark style="color:yellow;">**XPUMP:**</mark> The Blast.fun migrator witness.
