Skip to content

Commit

Permalink
Update truffle and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
morrigan committed Apr 2, 2019
1 parent f29e652 commit 4df7815
Show file tree
Hide file tree
Showing 6 changed files with 4,912 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"env": {
"node": true,
"es6": true
},
"rules": {
"max-len": [2, 100, 8]
}
}
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ FROM node:carbon-alpine
RUN apk add --update git python make g++ && \
rm -rf /tmp/* /var/cache/apk/*

RUN npm install -g truffle@4.1.13

WORKDIR /usr/app

# Install node dependencies - done in a separate step so Docker can cache it.
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "solidity-node-docker-starter",
"description": "Starter project for developing solidity smart contracts with NodeJs as backend server",
"version": "0.0.1",
"description": "Starter project for developing Solidity smart contracts with Truffle and Node.JS as a backend server",
"version": "0.1.0",
"repository": "git@github.com:NodeFactoryIo/solidity-node-docker-starter.git",
"contributors": [
"Marin Petrunić <marin@nodefactory.io>",
"Belma gutlić <belma@nodefactory.io"
"Belma Gutlić <belma@nodefactory.io>"
],
"license": "MIT",
"scripts": {
Expand All @@ -18,11 +18,10 @@
"dependencies": {
"babel-runtime": "^6.26.0",
"dotenv": "^5.0.1",
"eth-gas-reporter": "^0.1.9",
"eth-gas-reporter": "^0.1.12",
"express": "^4.16.3",
"nodemon": "^1.17.4",
"truffle-contract": "^3.0.5",
"web3": "^0.20.6"
"truffle": "^5.0.10"
},
"devDependencies": {
"babel-core": "^6.26.3",
Expand All @@ -37,7 +36,7 @@
"mocha-multi-reporters": "^1.1.7",
"runjs": "^4.3.2",
"sinon": "^5.0.4",
"solhint": "^1.2.1",
"solhint": "^2.0.0",
"truffle-hdwallet-provider": "^1.0.6"
},
"babel": {
Expand Down
12 changes: 6 additions & 6 deletions tasks/contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ export function deploy(env) {
if (!env) {
env = 'development';
}
run(`docker-compose run --rm backend truffle migrate --network ${env}`);
run(`docker-compose run --rm backend node_modules/.bin/truffle migrate --network ${env}`);
}

export function redeploy(env) {
if (!env) {
env = 'development';
}
run(
`docker-compose run --rm backend truffle migrate --reset --network ${env}`
`docker-compose run --rm backend node_modules/.bin/truffle migrate --reset --network ${env}`
);
}

export function compile() {
run(
'docker-compose run --no-deps --rm backend truffle "compile --all"'
'docker-compose run --no-deps --rm backend node_modules/.bin/truffle "compile --all"'
);
}

Expand All @@ -39,19 +39,19 @@ export function test(testName) {
}
solhint();
run(
`docker-compose run --rm backend truffle test ${testName}`
`docker-compose run --rm backend node_modules/.bin/truffle test ${testName}`
);
}

help(
deploy,
'Run all missing migrations to deploy contracts' +
' to ethereum network. Command accepts param with id of network'
' to Ethereum network. Command accepts param with id of network'
);
help(
redeploy,
'Run all migrations again to deploy contracts ' +
'to ethereum network. Command accepts param with id of network'
'to Ethereum network. Command accepts param with id of network'
);
help(
compile,
Expand Down
7 changes: 7 additions & 0 deletions truffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ module.exports = {
network_id: 3,
},
},

compilers: {
solc: {
version: '0.4.24',
},
},

mocha: {
useColors: true,
reporter: 'mocha-multi-reporters',
Expand Down
Loading

0 comments on commit 4df7815

Please sign in to comment.