sgn-contract

module
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2020 License: GPL-3.0

README

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

Directories

Path Synopsis
bindings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL