maticnetwork / contracts

Smart contracts comprising the business logic of the Matic Network
https://matic.network
GNU General Public License v3.0
1.14k stars 506 forks source link
blockchain cryptocurrencies dapps decentralised-exchange ethereum payment scalability

[!WARNING] This repository is no longer in use, and has been migrated to https://github.com/0xPolygon/pos-contracts

Matic contracts

Build Status

Ethereum smart contracts that power the Matic Network.

Install dependencies with

npm install

Setup

pre-commit install

Compile

npm run template:process -- --bor-chain-id 15001

bor-chain-id should be:
local: 15001
Mainnet = 137
TestnetV4 (Mumbai) = 80001

Main chain and side chain

All tests are run against a fork of mainnet using Hardhat's forking functionality. No need to run any local chain!

npm run bor:simulate
npm run bor:stop
npm run bor:clean

Run tests

Run Hardhat test

npm test:hardhat

Run Foundry test

npm test:foundry

Coverage

Run coverage with

npm run coverage