Techman34 / sgn-contract

Mainchain smart contracts for Celer State Guardian Network (SGN)

Home Page:https://www.celer.network/celercore/sgn/architecture.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SGN contracts

CircleCI

Mainchain smart contracts for Celer State Guardian Network (SGN)

Test locally

  1. Install NodeJS v10.

  2. Install the node dependencies:

npm install
  1. Install truffle and ganache-cli (sudo permission might be needed):
npm install -g truffle ganache-cli
  1. Run ganache-cli:
ganache-cli --gasLimit 8000000 --accounts 20
  1. Use truffle to run tests:
truffle test

Prepare artifact JSON files for sgn-explorer

  1. Compile the contracts:
npx truffle migrate
  1. Edit the "networks" field in the artifact JSON files. Eg. build/contracts/DPos.json.

  2. Copy the artifacts to the sgn-explorer directory:

cp build/contracts/CELRToken.json build/contracts/DPoS.json build/contracts/SGN.json <path-to-sgn-explorer-repo>/src/contracts

About

Mainchain smart contracts for Celer State Guardian Network (SGN)

https://www.celer.network/celercore/sgn/architecture.html

License:GNU General Public License v3.0


Languages

Language:Go 68.6%Language:JavaScript 18.0%Language:Solidity 12.9%Language:Shell 0.4%Language:Makefile 0.0%