Skip to main content

Getting Started with Testing

The MMS API is deployed on testnet for testing and integration. For the chain ID, contract addresses, and subgraph URLs, please refer to the Addresses & Networks page.

API Breaking Changes

Breaking Changes: Parameter structures have changed. Update your integration before testing.

Contract Parameter Changes

MakeOrderParams

struct MakeOrderParams {
  BookId id;
  Tick tick;
  uint256 quoteAmount;
- address provider;
  address referrer;
}

LimitOrderParams

struct LimitOrderParams {
  BookId takeBookId;
  BookId makeBookId;
  uint256 limitPrice;
  Tick tick;
  uint256 quoteAmount;
- address makeProvider;
- address makeReferrer;
- address takeProvider;
  address referrer;
}

TakeOrderParams

struct TakeOrderParams {
  BookId id;
  uint256 limitPrice;
  uint256 quoteAmount;
  uint256 maxBaseAmount;
- address provider;
  address referrer;
}

SpendOrderParams

struct SpendOrderParams {
  BookId id;
  uint256 limitPrice;
  uint256 baseAmount;
  uint256 minQuoteAmount;
- address provider;
  address referrer;
}

CancelOrderParams

struct CancelOrderParams {
  OrderId id;
  uint256 leftQuoteAmount;
- address owner;
}

Vault API Changes

- uint256 locked = vault.getLockedAssets(user);
+ uint256 locked = vault.lockedBalances(user);

Subgraph Schema Changes

  • Added referrer field to: Order, OpenOrder, Take.

Migration Steps

  1. Remove all provider parameters from order calls
  2. Update LimitOrderParams to use takeBookId, makeBookId, and limitPrice
  3. Remove owner parameter from cancel calls
  4. Replace vault.getLockedAssets(user) with vault.lockedBalances(user)
  5. limitOrderParams gets single referrer, not makeReferrer and takeReferrer

Important Testing Information

Contract Verification

All contracts have been verified in the block explorer to facilitate testing. You can easily inspect contract code, read contract state, and verify transaction details directly in the explorer.

USDC (Mock Token)

USDC is a mock ERC20 token with a public open mint function. You can freely mint USDC tokens for testing purposes without any restrictions. To mint USDC:
  1. Navigate to the USDC contract in the explorer
  2. Connect your wallet
  3. Call the mint function with your address and desired amount

Mirror Tokens

Mirror tokens work differently from USDC. Mirror tokens need to be issued by 1st and cannot be minted directly by users. To obtain mirror tokens for testing:
  • Contact 1st with your wallet address and the desired amount for each mirror token you need
  • Mirror tokens will be issued to your specified address

Listed Trading Pairs

By default, there are 5 listed pairs available for testing, all starting with no trading activity.
Each pair has 2 books - one for each side of the market. This means there are 10 books total across the 5 pairs.

Token Decimals and Pricing

Important: Token decimals affect how ticks translate to real prices.
  • mRTKN6: 6 decimals (same as typical USDC)
  • Other mirror tokens: 18 decimals
When working with ticks and prices, remember that the decimal difference between base and quote tokens affects the price calculation. For more information on how ticks work, see the Ticks concept page.