We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed925e2 commit f0b56bbCopy full SHA for f0b56bb
33 files changed
.eslintrc.js
@@ -37,18 +37,18 @@ module.exports = {
37
"jsonrpc", "timestamp", "uint256", "erc20", "bignumber", "lodash",
38
"arg", "npm", "seedrandom", "eql", "sinon", "yaml", "promisify",
39
"passcode", "geth", "rpc", "rpcmsg","stdev", "stochasm",
40
- "whitelist", "uint",
+ "whitelist", "uint", "passcodes", "keystore", "hdwallet",
41
42
// shorthand
43
"eth", "args", "util", "utils", "msg", "prev", "bal",
44
"init", "params", "mul", "async", "vals", "fns", "addrs",
45
"fns", "num", "dev", "pre","abi", "gte","rnd", "chk", "bals", "lte",
46
- "addr",
+ "addr", "conf",
47
48
// project-specific
49
"rebase", "gons", "frg", "rng", "blockchain", "minlot",
50
"redemptions", "rebased", "ganache", "ethclient",
51
- "bytecode", "Binance",
+ "bytecode", "Binance", "ethereum",
52
53
// names
54
"nithin",
.gitmodules
@@ -0,0 +1,3 @@
1
+[submodule "scripts/frg-ethereum-runners"]
2
+ path = scripts/frg-ethereum-runners
3
+ url = [email protected]:frgprotocol/frg-ethereum-runners.git
.travis.yml
@@ -3,14 +3,30 @@ sudo: false
language: node_js
4
node_js:
5
- "8"
6
+
7
cache:
8
directories:
9
- node_modules
10
11
+git:
12
+ submodules:
13
+ false
14
15
+addons:
16
+ apt:
17
+ sources:
18
+ - sourceline: 'ppa:ethereum/ethereum'
19
+ packages:
20
+ - ethereum
21
22
before_install:
- - ./scripts/setup_ci_env.sh
23
+ - git submodule update --init --recursive
24
+ - ./scripts/frg-ethereum-runners/ci-dep-install.sh
25
26
script:
27
- npm run lint
- - npm run test
28
+ - ./scripts/test.sh
29
30
notifications:
31
email:
32
- [email protected]
README.md
@@ -5,17 +5,21 @@ The μFragments protocol smart contracts on Ethereum.
# Getting started
```bash
-# Install dependencies
+# Install ethereum local blockchain(s) and associated dependencies
+./scripts/frg-ethereum-runners/dep-install.sh
+# Install project dependencies
npm install
```
# Useful scripts
``` bash
-# You can use the following commands to start/stop local ganache chain
-npm run blockchain:start
-npm run blockchain:stop
+# You can use the following commands to start/stop local chain
+npm run blockchain:[start|stop] [ganacheUnitTest|gethUnitTest]
# Lint code
npm run lint
# track gas utilization
npm run trackGasUtilization
migrations/1_initial_migration.js
@@ -1,24 +1,14 @@
const Migrations = artifacts.require('./Migrations.sol');
const _require = require('app-root-path').require;
const truffleConfig = _require('/truffle.js');
+const accounts = truffleConfig.accounts;
-module.exports = function (deployer, network, addresses) {
+module.exports = function (deployer, network) {
+ const deployerAccount = accounts[0];
const config = truffleConfig.networks[network];
-
const deploymentConfig = {
- gas: config.gas
+ gas: config.gas,
+ from: deployerAccount
};
- async function preDeploymentCalls () {
- if (config.passcode) {
- for (const account in config.passcode) {
- if (Object.prototype.hasOwnProperty.call(config.passcode, account)) {
- await web3.personal.unlockAccount(account, config.passcode[account], 0);
- deployer.logger.log('Unlocked account: ' + account);
- }
- deployer.then(preDeploymentCalls).then(() => deployer.deploy(Migrations, deploymentConfig));
+ deployer.deploy(Migrations, deploymentConfig);
migrations/2_deploy_contracts.js
@@ -7,8 +7,9 @@ const APP_ROOT_PATH = require('app-root-path');
const _require = APP_ROOT_PATH.require;
const generateYaml = _require('/util/yaml_generator');
-module.exports = function (deployer, network, accounts) {
const deployerAccount = accounts[0];
0 commit comments