Git Product home page Git Product logo

genesis-contracts's Introduction

genesis-contracts

Setup genesis

Setup genesis whenever contracts get changed

1. Install dependencies and submodules

$ npm install
$ git submodule init
$ git submodule update

2. Compile Matic contracts

$ cd matic-contracts
$ npm install
$ node scripts/process-templates.js --bor-chain-id <bor-chain-id>
$ npm run truffle:compile
$ cd ..

3. Generate Bor validator set sol file

Following command will generate BorValidatorSet.sol file from BorValidatorSet.template file.

# Generate bor validator set using stake and balance
# Modify validators.json before as per your need
$ node generate-borvalidatorset.js --bor-chain-id <bor-chain-id> --heimdall-chain-id <heimdall-chain-id>

4. Compile contracts

$ npm run truffle:compile

5. Configure Block times

To add custom block time and associated block no.s in genesis, edit the blocks.js file

6. Generate genesis file

Following command will generate genesis.json file from genesis-template.json file.

# Generate genesis file
$ node generate-genesis.js --bor-chain-id <bor-chain-id> --heimdall-chain-id <heimdall-chain-id>

7. Run Tests

$ npm run testrpc
$ npm test

genesis-contracts's People

Contributors

0xashish avatar 0xsharma avatar anshalshukla avatar atvanguard avatar ayushkaul avatar gatsbyz avatar gretzke avatar jdkanani avatar marcello33 avatar raneet10 avatar simondos avatar temaniarpit27 avatar vaibhavchellani avatar zeroekkusu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.