Skip to content

maticnetwork/contracts

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
September 20, 2021 17:12
April 30, 2021 23:19
September 2, 2021 10:02
March 15, 2021 21:34
fix
October 7, 2021 12:33
February 12, 2018 23:42
February 12, 2018 23:42
April 24, 2020 16:14
April 24, 2020 16:14
April 12, 2018 13:31
January 20, 2022 22:39
September 1, 2021 06:58
September 2, 2021 10:02

Matic contracts

Build Status

Ethereum smart contracts that power the Matic Network.

Install dependencies with

npm install

Compile

bor-chain-id for Mainnet = 137 bor-chain-id for TestnetV4 (Mumbai) = 80001

npm run template:process -- --bor-chain-id <bor-chain-id>
npm run truffle:compile

Start main chain and side chain

  • Start Main chain
npm run testrpc
  • Start Matic side chain. Requires docker.
npm run bor:simulate
  • If you ran a bor instance before, a dead docker container might still be lying around, clean it with
npm run bor:clean
  • Run a bor (our matic chain node) instance.

Deploy Contracts

  • For local development
npm run truffle:migrate
  • For a properly initialized set of contracts, follow the instructions here.

Run tests

npm test