New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mezo-org/contracts

Package Overview
Dependencies
Maintainers
7
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mezo-org/contracts

Smart contracts powering the bridge to Mezo

  • 0.4.0-dev.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

mezo-portal Contracts

Smart contracts powering the bridge to Mezo

Development

Installation

This project uses pnpm as a package manager (installation documentation).

To install dependencies run:

pnpm install

Testing

$ pnpm test

Environment Setup

This project uses dotenv-safer, which provides environment variable checking. If there is a field in .env.example but not .env, execution will halt early with an error.

Both pnpm run deploy and pnpm test will automatically create a blank .env from the .env.example template, if .env does not exist.

To do this manually:

$ pnpm run prepare:env

Deploying

We deploy our contracts with hardhat-deploy via

$ pnpm run deploy [--network <network>]

Check the "networks" entry of hardhat.config.ts for supported networks.

Deploying to real chains will require configuring the .env environment, detailed in .env.example.

Examples:

In-Memory Hardhat (great for development)

pnpm run deploy

Sepolia

To deploy contracts on Sepolia run:

$ pnpm run deploy --network sepolia

Or, alternatively, manually trigger the Solidity workflow (this will not only deploy the contracts, but also update the values of TBTC_CONTRACT_ADDRESS, WBTC_CONTRACT_ADDRESS and PORTAL_CONTRACT_ADDRESS environment variables in the settings of Netlify builds deploying dApp and its previews).

Contract Addresses

The official mainnet and testnet contract addresses are listed below.

Mainnet

ContractAddress
tBTC0x18084fbA666a33d37592fA2633fD49a74DD93a88
Bridge (tBTC)0x5e4861a80B55f035D899f66772117F00FA0E8e7B
TBTCVault (tBTC)0x9C070027cdC9dc8F82416B2e5314E11DFb4FE3CD
WBTC0x2260fac5e5542a773aa44fbcfedf7c193bc2c599
Portal Proxy0xAB13B8eecf5AA2460841d75da5d5D861fD5B8A39
Portal Implementation0xD7097AF27b14e204564C057c636022fae346fE60
Portal ProxyAdmin0x260cA2abeF5d38181E2562F00FA92AD1DC681734
BitcoinDepositor Proxy0x1D50D75933b7b7C8AD94dbfb748B5756E3889C24
BitcoinDepositor Implementation0x04B94f55780682478c8D8329368AAAfD320F4D32
BitcoinDepositor ProxyAdmin0x66cE24B68D9fEb092Bc8E6C47C0FA318e48F1267

Sepolia

ContractAddress
tBTC0x517f2982701695D4E52f1ECFBEf3ba31Df470161
Bridge (tBTC)0x9b1a7fE5a16A15F2f9475C5B231750598b113403
TBTCVault (tBTC)0xB5679dE944A79732A75CE556191DF11F489448d5
WBTC (mock)0xdc5558c2873C6375d5a90551c9D0F853794D357D
Portal Proxy0x6978E3e11b8Bc34ea836C1706fC742aC4Cb6b0Db
Portal Implementation0x5581c79ac00164D04De090eB72A9B0B08f89643d
Portal ProxyAdmin0x9Aa2e895ABb717822fb72FEeb64010dB6739D720
BitcoinDepositor Proxy0x7205535961649C4F94e1b4BAfBe26d23e2bbDd84
BitcoinDepositor Implementation0x6617C61355cA32141950B8F6610C40C613CA7F38
BitcoinDepositor ProxyAdmin0x93c4E8eB2813FD3C13254C31B43a30a9ca9693eC
MezoBridge Proxy0x3a3BaE133739f92a885070DbF3300d61B232497C
MezoBridge Implementation0x2de0566A26B74DcD501Ff5c3b213Bf5a01aC3aC1
MezoBridge ProxyAdmin0xAB940Ce533883a521F467B872a8eD699311c7d86

Rebasing and Fee-on-Transfer Deposit Tokens

The smart contracts are incompatible with rebasing and fee-on-transfer tokens. Such tokens must not be added as supported tokens for deposits to the Portal contract.

This check should be a part of the checklist for the governance when adding new supported tokens.

FAQs

Package last updated on 23 Jan 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc