Smart contracts powering the bridge to Mezo
This project uses pnpm as a package manager (installation documentation).
To install dependencies run:
pnpm install
$ pnpm test
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
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
.
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).
The official mainnet and testnet contract addresses are listed below.
Contract | Address |
---|---|
tBTC | 0x18084fbA666a33d37592fA2633fD49a74DD93a88 |
Bridge (tBTC) | 0x5e4861a80B55f035D899f66772117F00FA0E8e7B |
TBTCVault (tBTC) | 0x9C070027cdC9dc8F82416B2e5314E11DFb4FE3CD |
WBTC | 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 |
Portal Proxy | 0xAB13B8eecf5AA2460841d75da5d5D861fD5B8A39 |
Portal Implementation | 0xeAAf2B9e90aA6400d83e07606F5F2A5432502216 |
Portal ProxyAdmin | 0x260cA2abeF5d38181E2562F00FA92AD1DC681734 |
BitcoinDepositor Proxy | 0x1D50D75933b7b7C8AD94dbfb748B5756E3889C24 |
BitcoinDepositor Implementation | 0x04B94f55780682478c8D8329368AAAfD320F4D32 |
BitcoinDepositor ProxyAdmin | 0x66cE24B68D9fEb092Bc8E6C47C0FA318e48F1267 |
Contract | Address |
---|---|
tBTC | 0x517f2982701695D4E52f1ECFBEf3ba31Df470161 |
Bridge (tBTC) | 0x9b1a7fE5a16A15F2f9475C5B231750598b113403 |
TBTCVault (tBTC) | 0xB5679dE944A79732A75CE556191DF11F489448d5 |
WBTC (mock) | 0xdc5558c2873C6375d5a90551c9D0F853794D357D |
Portal Proxy | 0x6978E3e11b8Bc34ea836C1706fC742aC4Cb6b0Db |
Portal Implementation | 0x7641f007de71e849c1b75A3e430e8CA13d4bF646 |
Portal ProxyAdmin | 0x9Aa2e895ABb717822fb72FEeb64010dB6739D720 |
BitcoinDepositor Proxy | 0x7205535961649C4F94e1b4BAfBe26d23e2bbDd84 |
BitcoinDepositor Implementation | 0x6617C61355cA32141950B8F6610C40C613CA7F38 |
BitcoinDepositor ProxyAdmin | 0x93c4E8eB2813FD3C13254C31B43a30a9ca9693eC |