These are the contracts for Razor network.
- Install truffle
- Install openzeppelin
npm i openzeppelin-solidity
- Run ganache-cli
ganache-cli -s 0 -i 420 -a 30 -l 7000000
- Run tests
truffle test
- For bigSchelling.js large number of accounts are required
ganache-cli -s 0 -i 420 -a 101 -l 7000000
- For testing with cli, set blocktime
ganache-cli -s 0 -i 420 -a 30 -b 5 -l 7000000
- Deploy on ganache
truffle migrate --reset
- create .secret file with mnemonic of the private key used to deploy on rinkeby
- Deploy on görli (.secret file must be present with mnemonic of the private key used to deploy)
truffle migrate --network goerli --reset
- For test coverage,
npm install --save-dev solidity-coverage
npm run coverage
truffle migrate --reset --network goerli
sh copy-build.sh
cd ../cli && git add . && git commit -m 'redeploy' && git push
cd ../synthetic-assets
- Change the delegator address in
synthetic-assets/migrations/2_deploy.js
truffle migrate --reset --network goerli
git add . && git commit -m 'redeploy' && git push
cd ../dashboard
git add . && git commit -m 'redeploy' && git push
- In remote server:
cd cli && git pull
pm2 stop all
- Run first 5 lines in file cli/misc/deploy.sh for stakers to stake
pm2 start all
once staked
Contract addresses can be found here