From e6d08413028a21b5d655eb19f5029fba3591049a Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 11:04:17 +0100 Subject: [PATCH 01/10] auto reformat --- .travis.yml | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54240e5..8387e3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,41 +1,41 @@ dist: xenial # https://docs.travis-ci.com/user/reference/xenial/ language: node_js cache: - directories: - - "node_modules" - - "augmint-contracts/node_modules" + directories: + - "node_modules" + - "augmint-contracts/node_modules" before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2 - - export PATH="$HOME/.yarn/bin:$PATH" - - export BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" - - yarn global add greenkeeper-lockfile@1 + - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2 + - export PATH="$HOME/.yarn/bin:$PATH" + - export BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" + - yarn global add greenkeeper-lockfile@1 install: - - | - if [[ $BRANCH == "greenkeeper/"* ]]; then - echo Greenkeeper build using .yarnrc.greenkeeper; cp .yarnrc.greenkeeper .yarnrc; yarn install; - else - echo Normal build using .yarnrc and --frozen-lockfile option; yarn install --frozen-lockfile; - fi - - cd augmint-contracts && yarn install && cd .. + - | + if [[ $BRANCH == "greenkeeper/"* ]]; then + echo Greenkeeper build using .yarnrc.greenkeeper; cp .yarnrc.greenkeeper .yarnrc; yarn install; + else + echo Normal build using .yarnrc and --frozen-lockfile option; yarn install --frozen-lockfile; + fi + - cd augmint-contracts && yarn install && cd .. before_script: - - greenkeeper-lockfile-update - - yarn ganache:run > ganache.out & - - yarn contracts:migrate + - greenkeeper-lockfile-update + - yarn ganache:run > ganache.out & + - yarn contracts:migrate script: - - yarn test + - yarn test # discord webhooks hack until this is released: https://github.com/travis-ci/travis-tasks/pull/71 after_script: greenkeeper-lockfile-upload after_success: - - wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh - - chmod +x send.sh - - ./send.sh success $DISCORD_WEBHOOK_URL + - wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - ./send.sh success $DISCORD_WEBHOOK_URL after_failure: - - wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh - - chmod +x send.sh - - ./send.sh failure $DISCORD_WEBHOOK_URL + - wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - ./send.sh failure $DISCORD_WEBHOOK_URL env: - global: - # GH_TOKEN for greenkeeper - - secure: SSgqXUNxvwXsEz2WuY72oqhIy+OOKCtuFejf6vPODnY+eGxYIZIskganepdJmZkFF0EklPi44D3DNnm1yeQNuSrExC1Fq49qiHRhRsa22soY2JrvXsGHA8x3tbZ4FxexYzb7p4Ej75TlAb2F9kRr+r9M0eqq/pD4IjdT9Zy05E7zodXxANmGbct6DsYyqSvxyHeH5cYsK33HA8UmrIbose2VHjGwvPI4T64LxEEla9mnWDLmN5gmLNYPglUWckJlRwXRGOyswedO7FI1P2xk+e3nByYpE+SI0KLKnth9I5PBYTwrPU7Uy2JeGM8bpZK86tRSeMvFb5pn5h0sW14TWQdzlUpaXDI8/+o1m9BrgTIC38fw3VMm5Vo/EWZXG9zm1A56hVHf7NJkWeOC2KoPsCwCAViOKLMsErCfa+xOf2E+/JzvUpS78DiMmgouuzQ59NKU6BhMUsHDBcQNP5YS8sIRYedtEfsO9O4iwx5BG3+izs5zHEiJ1vUN8ACOa3TJ0/PKbGSgZx8lmLW8dRJw9P1i1N5LSH5X/xuAd/b1HbiM4ItkCq28WKVlQRUlqO+WYcOYdbNMQ4u6Xs+8gqdC2zGwaZ7YBMr2lcXKxJtrYHx4b95WCw7iBVWwuA5zXDDiAFpvCjV/etJ+i0GplqFL1ziFZ3Nb2R7wGezak0LffSc= - # DISCORD_WEBHOOK_URL - - secure: dswuM6gVOnYKsYjsyF3lqO1vRExc4WivTXoGW2/37zF73S51yLICrhLzSkHe77CN5pLZHAbhkTZLpqfFmsTdnpiq3d3epBpG/B18If/I4w39eyUiYiyPJb8T+9PHBuf9HLNzAI9Lv+HZErokzG2sLya9gbiTV/Em3QY/8+5FLw2jf4wOkzmWV4Bxfh8Fxul0vR+R4UcX6FF77GboW7Fpk958TpkQYYBwt439TW47fix6/pHzKqvwQX5UhjI0tcixecP9/PR7mZPDZN/G3ISPCc7BpHZzHt87CfUZJBKmz+8smGWhhUyyfcFbwqt9hG+yVjqoZqXSIDmN5sG0jJvWISSPo3wlPdjKTKiPCElIrvNJBKesB5cfVFHAoIrI53bNPdoSFwhkyzcZ6s2V1LqgQnRYq+MqPtH1X4vi7+715+t17ULcB7depXYhH1d/gf60O0CSw5U903d0Ev7lWaWOfZocZjxHt/3ah1ZrgtWmKgn8Yc+2HO04Fsl7+Ntvk5/MzjGJDaqNtOk+2Ocf7CSu5R9AY1ofNsjyq0+V+n2JvlCkOR8P0MJ6oYORrjIFi0NwTVV53NT+2eigahtZqOzZfLSKR8ibWxOtIFtljL5RoN+eiDWiZO79FfNTxTP7Ok4uGKImmrYZwzhnFW29rWsonzFwyllMLhjteiL7bgO8gTo= + global: + # GH_TOKEN for greenkeeper + - secure: SSgqXUNxvwXsEz2WuY72oqhIy+OOKCtuFejf6vPODnY+eGxYIZIskganepdJmZkFF0EklPi44D3DNnm1yeQNuSrExC1Fq49qiHRhRsa22soY2JrvXsGHA8x3tbZ4FxexYzb7p4Ej75TlAb2F9kRr+r9M0eqq/pD4IjdT9Zy05E7zodXxANmGbct6DsYyqSvxyHeH5cYsK33HA8UmrIbose2VHjGwvPI4T64LxEEla9mnWDLmN5gmLNYPglUWckJlRwXRGOyswedO7FI1P2xk+e3nByYpE+SI0KLKnth9I5PBYTwrPU7Uy2JeGM8bpZK86tRSeMvFb5pn5h0sW14TWQdzlUpaXDI8/+o1m9BrgTIC38fw3VMm5Vo/EWZXG9zm1A56hVHf7NJkWeOC2KoPsCwCAViOKLMsErCfa+xOf2E+/JzvUpS78DiMmgouuzQ59NKU6BhMUsHDBcQNP5YS8sIRYedtEfsO9O4iwx5BG3+izs5zHEiJ1vUN8ACOa3TJ0/PKbGSgZx8lmLW8dRJw9P1i1N5LSH5X/xuAd/b1HbiM4ItkCq28WKVlQRUlqO+WYcOYdbNMQ4u6Xs+8gqdC2zGwaZ7YBMr2lcXKxJtrYHx4b95WCw7iBVWwuA5zXDDiAFpvCjV/etJ+i0GplqFL1ziFZ3Nb2R7wGezak0LffSc= + # DISCORD_WEBHOOK_URL + - secure: dswuM6gVOnYKsYjsyF3lqO1vRExc4WivTXoGW2/37zF73S51yLICrhLzSkHe77CN5pLZHAbhkTZLpqfFmsTdnpiq3d3epBpG/B18If/I4w39eyUiYiyPJb8T+9PHBuf9HLNzAI9Lv+HZErokzG2sLya9gbiTV/Em3QY/8+5FLw2jf4wOkzmWV4Bxfh8Fxul0vR+R4UcX6FF77GboW7Fpk958TpkQYYBwt439TW47fix6/pHzKqvwQX5UhjI0tcixecP9/PR7mZPDZN/G3ISPCc7BpHZzHt87CfUZJBKmz+8smGWhhUyyfcFbwqt9hG+yVjqoZqXSIDmN5sG0jJvWISSPo3wlPdjKTKiPCElIrvNJBKesB5cfVFHAoIrI53bNPdoSFwhkyzcZ6s2V1LqgQnRYq+MqPtH1X4vi7+715+t17ULcB7depXYhH1d/gf60O0CSw5U903d0Ev7lWaWOfZocZjxHt/3ah1ZrgtWmKgn8Yc+2HO04Fsl7+Ntvk5/MzjGJDaqNtOk+2Ocf7CSu5R9AY1ofNsjyq0+V+n2JvlCkOR8P0MJ6oYORrjIFi0NwTVV53NT+2eigahtZqOzZfLSKR8ibWxOtIFtljL5RoN+eiDWiZO79FfNTxTP7Ok4uGKImmrYZwzhnFW29rWsonzFwyllMLhjteiL7bgO8gTo= From 9b93aab0d12213a70011d659ce285047cef2a632 Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 11:12:49 +0100 Subject: [PATCH 02/10] Removed augmint-contracts submodule --- .gitmodules | 3 --- augmint-contracts | 1 - 2 files changed, 4 deletions(-) delete mode 160000 augmint-contracts diff --git a/.gitmodules b/.gitmodules index 6000fc4..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "augmint-contracts"] - path = augmint-contracts - url = https://github.com/Augmint/augmint-contracts.git diff --git a/augmint-contracts b/augmint-contracts deleted file mode 160000 index 34af567..0000000 --- a/augmint-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 34af567ef85fec99aec900668de6653a0b8ba979 From 68cd3e68b76f5b95f2e73d67b393b68bc341101f Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 11:46:08 +0100 Subject: [PATCH 03/10] use docker --- .travis.yml | 7 +-- docs/developmentEnvironment.md | 84 +++++++++++++++++----------------- package.json | 6 +-- 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8387e3f..a81a551 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ dist: xenial # https://docs.travis-ci.com/user/reference/xenial/ language: node_js +services: + - docker cache: directories: - "node_modules" @@ -19,12 +21,11 @@ install: - cd augmint-contracts && yarn install && cd .. before_script: - greenkeeper-lockfile-update - - yarn ganache:run > ganache.out & - - yarn contracts:migrate + - yarn ganache:start > /dev/null & script: - yarn test -# discord webhooks hack until this is released: https://github.com/travis-ci/travis-tasks/pull/71 after_script: greenkeeper-lockfile-upload +# discord webhooks hack until this is released: https://github.com/travis-ci/travis-tasks/pull/71 after_success: - wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh - chmod +x send.sh diff --git a/docs/developmentEnvironment.md b/docs/developmentEnvironment.md index 754ec22..b41c6f1 100644 --- a/docs/developmentEnvironment.md +++ b/docs/developmentEnvironment.md @@ -2,104 +2,102 @@ ## Install -These instructions are about the dev environment for rates feeder (oracle) development. +Instructions about the dev environment setup for Ratesfeeder development. + For contracs development see [augmint-contracts repo](https://github.com/Augmint/augmint-contracts) + For UI development see [augmint-web repo](https://github.com/Augmint/augmint-web) ### OSX / Linux 1. [Git](https://git-scm.com/download) -1. [Ethereum CLI](https://www.ethereum.org/cli) -1. Install [nodejs](https://nodejs.org/en/download/) - _tested with v10.15.3_ - or install nodejs with [n node version manager](https://github.com/tj/n): +1. [nodejs](https://nodejs.org/en/download/) + NB: check supported node version in [package.json](../package.json) + + Installing nodejs with [n node version manager](https://github.com/tj/n): ``` npm install -g n - n 10.15.3 + n ``` -1. Install yarn if you don't have it: `npm install -g yarn@1.13.0` +1. Yarn: `npm install -g yarn@` + NB: check required yarn version in [package.json](../package.json) + +1. [Docker cli](https://hub.docker.com/search/?type=edition&offering=community) + 1. ``` - git clone https://github.com/Augmint/augmint-ratesfeeder.git --recurse-submodules + git clone https://github.com/Augmint/augmint-ratesfeeder.git cd augmint-ratesfeeder yarn install - cd augmint-contracts - git checkout master - yarn install ``` ### Windows -_Note: It is recommended to use PowerShell (win+X => powershell)_ +_Note: windows install was not tested since a while, update on it is welcome_ -1. [Git Bash](https://git-for-windows.github.io/) (required for truffle & yarn start) +1. [Git Bash](https://git-for-windows.github.io/) 1. [Git](https://git-scm.com/download) (if you haven't installed it as part of Git Bash in previous step) -1. [Ethereum CLI](https://www.ethereum.org/cli) - including development tools -1. [Node Version Manager(NVM)](https://github.com/coreybutler/nvm-windows/releases) -1. [nodejs](https://nodejs.org/en/download/) +1. [nodejs](https://nodejs.org/en/download/) + NB: check supported node version in [package.json](../package.json) - or install nodejs with [Node Version Manager(NVM)](https://github.com/coreybutler/nvm-windows/releases): + Installing nodejs with [Node Version Manager(NVM)](https://github.com/coreybutler/nvm-windows/releases): ``` - nvm install 10.15.3 + nvm install nvm use 10.15.3 ``` -1. Install yarn if you don't have it: `npm install -g yarn` -1. Get the source code: +1. Yarn: `npm install -g yarn@` + NB: check required yarn version in [package.json](../package.json) + +1. [Docker cli](https://hub.docker.com/search/?type=edition&offering=community) + +1. in Git bash: ``` - git clone https://github.com/Augmint/augmint-ratesfeeder.git --recurse-submodules + git clone https://github.com/Augmint/augmint-ratesfeeder.git cd augmint-ratesfeeder yarn install - cd augmint-contracts - git checkout master - yarn install ``` _If python already installed but npm does not find it: npm --add-python-to-path='true' --debug install --global windows-build-tools (as administrator)_ ## Launch -### 1. Update to latest augmint-ratesfeeder +### Update to latest augmint-ratesfeeder ``` git pull yarn install # if there were any node package changes in packages.json ``` -### 2. Update to latest augmint contract - -``` -cd augmint-contracts -git checkout master -git pull -yarn install # if there were any node package changes in packages.json -``` +### Tests -### 3. Tests +1. Start ganache-cli (formerly testrpc) -1. Start ganache-cli (formerly testrpc) - `yarn contracts:runmigrate` - or - `yarn ganache:run` and in separate console: - `yarn contracts:migrate` + ``` + yarn ganache:start + ``` -1. Run tests +2. Run tests ``` yarn test ``` -### 4. Feeding +### Feeding #### Local -1. `yarn contracts:runmigrate` -1. when migrate finished, in a separate console: `yarn start` +``` +yarn ganache:start +``` -or for production +``` +yarn start +``` #### Production (rinkeby or mainnet) diff --git a/package.json b/package.json index 96101e3..149c1ac 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "test": "yarn cross-env NODE_ENV=test NODE_PATH=. mocha '{src/**/*.test.js,test/**/*.js}' --exit", "test:augmintjs": "yarn cross-env NODE_ENV=test NODE_PATH=. mocha 'src/augmintjs/**/*.test.js' --exit", "contracts:migrate": "cd augmint-contracts && yarn migrate", - "ganache:run": "cd augmint-contracts && yarn ganache:run", - "contracts:runmigrate": "cd augmint-contracts && yarn runmigrate" + "ganache:start": "docker start ganache || docker run --name ganache -p 8545:8545 augmint/contracts:v1.0.4 --db ./dockerLocalchaindb --gasLimit 0x47D5DE --gasPrice 1000000000 --networkId 999 -m \"hello build tongue rack parade express shine salute glare rate spice stock\"", + "ganache:stop": "docker stop ganache" }, "greenkeeper": { "ignore": [ @@ -61,4 +61,4 @@ "url": "https://github.com/Augmint/augmint-ratesfeeder/issues" }, "homepage": "https://github.com/Augmint/augmint-ratesfeeder#readme" -} +} \ No newline at end of file From e3c282012ee16ec734d7cdde89f3171d5301d163 Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 11:57:28 +0100 Subject: [PATCH 04/10] no more augmint-contracts submodule --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a81a551..d833544 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,6 @@ install: else echo Normal build using .yarnrc and --frozen-lockfile option; yarn install --frozen-lockfile; fi - - cd augmint-contracts && yarn install && cd .. before_script: - greenkeeper-lockfile-update - yarn ganache:start > /dev/null & From 106f08721859effd0243cd2c7f4ae96f8d88a01d Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 11:58:01 +0100 Subject: [PATCH 05/10] add wait-on devdep --- package.json | 3 ++- yarn.lock | 71 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 149c1ac..45281de 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "eslint": "5.16.0", "mocha": "6.1.3", "nock": "10.0.6", - "sinon": "7.3.1" + "sinon": "7.3.1", + "wait-on": "3.2.0" }, "optionalDependencies": { "bufferutil": "4.0.1", diff --git a/yarn.lock b/yarn.lock index e44d1c6..33f5c32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -552,6 +552,11 @@ cookiejar@^2.1.1: resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== +core-js@^2.5.7: + version "2.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" + integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1493,6 +1498,16 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hoek@5.x.x: + version "5.0.4" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-5.0.4.tgz#0f7fa270a1cafeb364a4b2ddfaa33f864e4157da" + integrity sha512-Alr4ZQgoMlnere5FZJsIyfIjORBqZll5POhDsF4q64dPuJR6rNxXdDxtHSQq8OXRurhmx+PWYEE8bXRROY8h0w== + +hoek@6.x.x: + version "6.1.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-6.1.3.tgz#73b7d33952e01fe27a38b0457294b79dd8da242c" + integrity sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ== + http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: version "1.6.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" @@ -1715,6 +1730,13 @@ isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= +isemail@3.x.x: + version "3.2.0" + resolved "https://registry.yarnpkg.com/isemail/-/isemail-3.2.0.tgz#59310a021931a9fb06bbb51e155ce0b3f236832c" + integrity sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg== + dependencies: + punycode "2.x.x" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -1733,6 +1755,15 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" +joi@^13.0.0: + version "13.7.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-13.7.0.tgz#cfd85ebfe67e8a1900432400b4d03bbd93fb879f" + integrity sha512-xuY5VkHfeOYK3Hdi91ulocfuFopwgbSORmIwzcwHKESQhC7w1kD5jaVSPnqDxS2I8t3RZ9omCKAxNwXN5zG1/Q== + dependencies: + hoek "5.x.x" + isemail "3.x.x" + topo "3.x.x" + js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" @@ -1985,6 +2016,11 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + mkdirp-promise@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" @@ -2485,16 +2521,16 @@ punycode@2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= +punycode@2.x.x, punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - qs@6.5.2, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -2567,7 +2603,7 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== -request@^2.79.0: +request@^2.79.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -2643,6 +2679,11 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" +rx@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" + integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I= + rxjs@^6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" @@ -3076,6 +3117,13 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +topo@3.x.x: + version "3.0.3" + resolved "https://registry.yarnpkg.com/topo/-/topo-3.0.3.tgz#d5a67fb2e69307ebeeb08402ec2a2a6f5f7ad95c" + integrity sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ== + dependencies: + hoek "6.x.x" + tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" @@ -3226,6 +3274,17 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +wait-on@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-3.2.0.tgz#c83924df0fc42a675c678324c49c769d378bcb85" + integrity sha512-QUGNKlKLDyY6W/qHdxaRlXUAgLPe+3mLL/tRByHpRNcHs/c7dZXbu+OnJWGNux6tU1WFh/Z8aEwvbuzSAu79Zg== + dependencies: + core-js "^2.5.7" + joi "^13.0.0" + minimist "^1.2.0" + request "^2.88.0" + rx "^4.1.0" + web3-bzz@1.0.0-beta.36: version "1.0.0-beta.36" resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.0.0-beta.36.tgz#adb3fe7a70053eb7843e32b106792b01b482ef41" From cf5bd55cbb7c4495b67e6c812d83cfa647464c4c Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 12:01:12 +0100 Subject: [PATCH 06/10] wait for ganache to start --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d833544..7721be1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: fi before_script: - greenkeeper-lockfile-update - - yarn ganache:start > /dev/null & + - yarn ganache:start > /dev/null & wait-on http-get://localhost:8545 script: - yarn test after_script: greenkeeper-lockfile-upload From f04d480b7061b4f10ef53c6ad935a2e1a5511d91 Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 12:01:32 +0100 Subject: [PATCH 07/10] remove old script --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 45281de..970f8da 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "start:production": "yarn cross-env NODE_ENV=production NODE_PATH=. node ./src/runFeeder.js", "test": "yarn cross-env NODE_ENV=test NODE_PATH=. mocha '{src/**/*.test.js,test/**/*.js}' --exit", "test:augmintjs": "yarn cross-env NODE_ENV=test NODE_PATH=. mocha 'src/augmintjs/**/*.test.js' --exit", - "contracts:migrate": "cd augmint-contracts && yarn migrate", "ganache:start": "docker start ganache || docker run --name ganache -p 8545:8545 augmint/contracts:v1.0.4 --db ./dockerLocalchaindb --gasLimit 0x47D5DE --gasPrice 1000000000 --networkId 999 -m \"hello build tongue rack parade express shine salute glare rate spice stock\"", "ganache:stop": "docker stop ganache" }, From 0dd9e2cabc4116daab378345f043385309c41d48 Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 12:24:35 +0100 Subject: [PATCH 08/10] wait for ganache to launch --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7721be1..63f1745 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ install: fi before_script: - greenkeeper-lockfile-update - - yarn ganache:start > /dev/null & wait-on http-get://localhost:8545 + - yarn ganache:start > /dev/null & + - wait-on tcp://localhost:8545 # ganache script: - yarn test after_script: greenkeeper-lockfile-upload From 018a010e5ac13ba71290ae2c17e921ee8c900a15 Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 12:29:09 +0100 Subject: [PATCH 09/10] proper wait for ganache launch --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 63f1745..88e7388 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: before_script: - greenkeeper-lockfile-update - yarn ganache:start > /dev/null & - - wait-on tcp://localhost:8545 # ganache + - wait-on tcp:localhost:8545 # ganache script: - yarn test after_script: greenkeeper-lockfile-upload From 8f7ce2ff416869c94d5c2914050e2ccc32c9028c Mon Sep 17 00:00:00 2001 From: szerintedmi Date: Sat, 13 Apr 2019 13:29:26 +0100 Subject: [PATCH 10/10] ganache container to handle SIGINT (faster stop) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 970f8da..c48a847 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "start:production": "yarn cross-env NODE_ENV=production NODE_PATH=. node ./src/runFeeder.js", "test": "yarn cross-env NODE_ENV=test NODE_PATH=. mocha '{src/**/*.test.js,test/**/*.js}' --exit", "test:augmintjs": "yarn cross-env NODE_ENV=test NODE_PATH=. mocha 'src/augmintjs/**/*.test.js' --exit", - "ganache:start": "docker start ganache || docker run --name ganache -p 8545:8545 augmint/contracts:v1.0.4 --db ./dockerLocalchaindb --gasLimit 0x47D5DE --gasPrice 1000000000 --networkId 999 -m \"hello build tongue rack parade express shine salute glare rate spice stock\"", + "ganache:start": "docker start ganache || docker run --init --name ganache -p 8545:8545 augmint/contracts:v1.0.4 --db ./dockerLocalchaindb --gasLimit 0x47D5DE --gasPrice 1000000000 --networkId 999 -m \"hello build tongue rack parade express shine salute glare rate spice stock\"", "ganache:stop": "docker stop ganache" }, "greenkeeper": {