Skip to content

Commit d706eb5

Browse files
committed
test.sh && various fixes
1 parent f3bfd30 commit d706eb5

File tree

5 files changed

+10
-48
lines changed

5 files changed

+10
-48
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
build
22
node_modules
33
yarn-error.log
4-
/.DS_Store
4+
.DS_Store
55
npm-debug.log
66
addresses.json
77
package-lock.json

Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
FROM node:6
1+
FROM node:8
22

3-
WORKDIR /code
4-
5-
ADD . /code
6-
7-
RUN npm install -g truffle
3+
RUN npm install

README.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@ Includes contracts, migrations, tests, user interface and webpack build pipeline
1313

1414
## Install
1515

16-
### Truffle
16+
### Dependencies
1717
```bash
18-
npm i -g truffle
18+
npm install
1919
```
2020

21-
### Ethereum
22-
You can choose between Parity or local testrpc
21+
### Test
22+
2323

24-
### testRPC
25-
```bash
26-
npm install -g ethereumjs-testrpc
27-
```
2824

2925
### Parity
3026
**Parity requires Rust version 1.19.0 to build**
@@ -70,14 +66,6 @@ npm install -g ethereumjs-testrpc
7066
cp /target/release/parity /usr/local/bin
7167
```
7268

73-
74-
## Build
75-
1. First `cd dao && npm i`
76-
2. `truffle compile` and run on separated tab `parity` or `testrpc`
77-
3. `truffle migrate` to deploy the contracts onto your network of choice (default "development").
78-
5. `truffle test`
79-
80-
8169
## Usage
8270

8371
You can choose of using web3 with Python and Javascript

test.sh

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,4 @@
11
#!/usr/bin/env bash
22

3-
trap cleanup EXIT
4-
5-
cleanup() {
6-
if [ -n "$testrpc_pid" ] && ps -p $testrpc_pid > /dev/null; then
7-
kill -9 $testrpc_pid
8-
fi
9-
}
10-
11-
testrpc_running() {
12-
nc -z localhost 8545
13-
}
14-
15-
if testrpc_running; then
16-
echo "Using existing testrpc"
17-
else
18-
echo "testrpc is running "
19-
node_modules/.bin/testrpc > /dev/null &
20-
testrpc_pid=$!
21-
fi
22-
23-
node_modules/.bin/truffle compile --all "$@"
24-
node_modules/.bin/truffle migrate --reset "$@"
3+
npm i
254
node_modules/.bin/truffle test "$@"
26-
cd py && python main.py

truffle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module.exports = {
88
provider: () => {
99
return new HDWalletProvider(mnemonic, host)
1010
},
11-
gas: 4700000,
12-
network_id: "*" // Match any network id
11+
gas: 127000,
12+
network_id: "42" // Match any network id
1313
}
1414
},
1515
}

0 commit comments

Comments
 (0)