Skip to content

0xPolygon/pos-contracts

This branch is 3 commits ahead of main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 19, 2024
3ebd71a · Dec 19, 2024
Dec 18, 2024
Mar 26, 2024
Sep 10, 2024
Nov 14, 2024
Feb 1, 2024
Sep 16, 2024
Dec 19, 2024
Feb 1, 2024
Dec 18, 2024
Feb 1, 2024
Feb 12, 2018
Sep 16, 2024
Sep 10, 2024
Feb 1, 2024
Feb 1, 2024
Feb 1, 2024
Feb 1, 2024
Aug 6, 2018
Sep 19, 2023
Feb 1, 2024
Apr 12, 2018
Oct 14, 2024
Feb 1, 2024
Nov 9, 2024
Sep 10, 2024
Nov 9, 2024
Nov 9, 2024
Feb 1, 2024

Repository files navigation

Matic contracts

Build Status

Ethereum smart contracts that power the Matic Network.

Development

Install dependencies with

npm install

Setup git hooks

pre-commit install

Prepare templates

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

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

Generate interfaces

npm run generate:interfaces

Build

forge build

Testing

Run forge upgrade forktest

forge test

Run unit tests

Main chain and side chain

  • Main chain

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

  • Start Matic side chain. Requires docker.
npm run bor:simulate
  • Stop with
npm run bor:stop
  • If you want a clean chain, this also deletes your /data folder containing the chain state.
npm run bor:clean

Run tests

Run Hardhat test

npm test:hardhat

Coverage

Run coverage with

npm run coverage

Contact

For more discussions, please head to the R&D Discord