Socket
Book a DemoInstallSign in
Socket

@0xmonaco/contracts

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xmonaco/contracts

Smart contract ABIs and addresses for the Monaco protocol. This package provides the interface definitions and deployed addresses for all Monaco protocol contracts.

0.1.1
latest
npmnpm
Version published
Weekly downloads
26
-83.33%
Maintainers
2
Weekly downloads
 
Created
Source

@0xmonaco/contracts

Smart contract ABIs and addresses for the Monaco protocol. This package provides the interface definitions and deployed addresses for all Monaco protocol contracts.

Note: This package currently only contains the Vault contract. Additional contracts will be added as they are deployed.

Installation

npm install @0xmonaco/contracts

Usage

Contract Addresses and ABIs

Access contract addresses and ABIs for different networks:

import { CONTRACT_ADDRESSES, CONTRACT_ABIS } from "@0xmonaco/contracts";

// Get contract addresses for Atlantic-2 testnet (chain ID 1328)
const atlanticAddresses = CONTRACT_ADDRESSES[1328];
const { vault: vaultAddress } = atlanticAddresses;

// Get contract addresses for Pacific-1 mainnet (chain ID 1329) - Coming Soon
// const pacificAddresses = CONTRACT_ADDRESSES[1329];

// Create contract instances using viem
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  chain: {
    id: 1328, // Atlantic-2 testnet
    name: "atlantic-2",
    rpcUrls: {
      default: { http: ["https://evm-rpc.testnet.sei.io"] },
      public: { http: ["https://evm-rpc.testnet.sei.io"] },
    },
  },
  transport: http(),
});

// Example of creating a contract instance
const vaultContract = {
  address: vaultAddress,
  abi: CONTRACT_ABIS.vault,
  client,
};

Contract Overview

Core Protocol Contracts

Vault

  • Manages user balances and deposits
  • Handles token transfers for trades
  • Ensures secure fund management

Note: Additional contracts (CLOB, Order Book, State, Symphony Adapter) will be documented as they are deployed and integrated.

Network Support

The package currently supports the following networks:

  • Atlantic-2 (Testnet)

    • Chain ID: 1328
    • Used for testing and development
  • Pacific-1 (Mainnet)

    • Chain ID: 1329
    • Production environment (Coming Soon)

Contract Addresses

Each network has the following contracts deployed:

interface ContractAddresses {
  /** Vault contract for managing user balances */
  vault: string;
}

Token Configuration

The package provides token configurations for different networks:

import { TESTNET_TOKENS } from "@0xmonaco/contracts";

// Access testnet tokens
const mockUSDC = TESTNET_TOKENS.MockUSDC;
const mockMTK = TESTNET_TOKENS.MockMTK;

// Use token information
console.log(`MockUSDC address: ${mockUSDC.address}`);
console.log(`MockUSDC decimals: ${mockUSDC.decimals}`);

Available Tokens

Testnet (Atlantic-2)

  • MockUSDC: 0x6A86dA986797D59A839D136dB490292Cd560C131 (6 decimals)
  • MockMTK: 0x428F82f1ECa4AA6f6c75D77cBd2a9ceB94cde343 (18 decimals)

ABI Reference

The package exports a consolidated CONTRACT_ABIS object:

import { CONTRACT_ABIS } from "@0xmonaco/contracts";

const clobAbi = CONTRACT_ABIS.clob;
const vaultAbi = CONTRACT_ABIS.vault;

Available ABIs in CONTRACT_ABIS:

  • vault: Vault contract interface

Development

Adding New Contracts

  • Create a new file in src/abis/ for the contract ABI
  • Export the ABI as a named constant
  • Add the export to src/abis/index.ts
  • Add the contract address to CONTRACT_ADDRESSES in src/index.ts

Updating Contract Addresses

When deploying new contracts:

  • Update the addresses in src/index.ts
  • Update the network documentation if needed
  • Consider adding a migration guide for users

Best Practices

  • Keep ABIs up to date with deployed contracts
  • Document any breaking changes
  • Maintain backward compatibility when possible
  • Test contract interactions on testnet before mainnet deployment

FAQs

Package last updated on 28 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.