Skip to content

Commit

Permalink
Add start:chain script and update migration
Browse files Browse the repository at this point in the history
This is in the interest of making local development easier to automate.

The `start:chain` script runs /scripts/start_blockchain.sh, which starts
a local instance of ganache with keys pre-defined in
ganache-accounts.json
  • Loading branch information
gichiba committed Apr 16, 2019
1 parent fa077ce commit baae282
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions migrations/4_nifty_minter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ const VoluntaryCarbonUnit = artifacts.require('./VoluntaryCarbonUnit.sol');
// eslint-disable-next-line no-unused-vars
module.exports = async (deployer) => {
const vcu = await VoluntaryCarbonUnit.deployed();
await vcu.addMinter('0xa24491d6378e843D7fe84bf20C589cFc5aC77562');
await vcu.addMinter('0x6D758C3A656869bbb9431b6c67E500d24a838959');
await vcu.addMinter('0xb77d57f4959eafa0339424b83fcfaf9c15407461');
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"lint:js:fix": "npx eslint . --fix",
"lint:sol": "npx solhint --max-warnings 0 \"contracts/**/*.sol\"",
"coverage": "npx solidity-coverage",
"migrate:local": "npx truffle migrate --network local --reset && cp build/contracts/* app/src/contracts/",
"start:chain": "scripts/start_blockchain.sh",
"migrate:local": "npx truffle migrate --network local --compile-all --reset && cp build/contracts/* app/src/contracts/",
"migrate:rinkeby": "npx truffle migrate --network rinkeby --reset && cp build/contracts/* app/src/contracts/",
"migrate:kovan": "npx truffle migrate --network kovan --reset && cp build/contracts/* app/src/contracts/",
"deploy": "npx truffle deploy",
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_blockchain.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Start local test network
ganache-cli --acctKeys "./ganache-accounts.json" --noVMErrorsOnRPCResponse --gasLimit 6721975 \
ganache-cli -v --acctKeys "./ganache-accounts.json" --gasLimit 6721975 \
--account="0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae, 100000000000000000000" \
--account="0xe9aebe8791ad1ebd33211687e9c53f13fe8cca53b271a6529c7d7ba05eda5ce2, 100000000000000000000" \
--account="0x6f36842c663f5afc0ef3ac986ec62af9d09caa1bbf59a50cdb7334c9cc880e65, 100000000000000000000" \
Expand Down

0 comments on commit baae282

Please sign in to comment.