Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.1.2 #91

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
da88f8b
rename matchMultipleOrdersTx to getMatchMultipleOrdersTx (and no async)
szerintedmi Apr 6, 2019
079634a
new augmintjs Rates class
szerintedmi Apr 6, 2019
3eb49b3
EthereumConnection props initial values + test
szerintedmi Apr 6, 2019
7dcd016
ethereumConnection getAccountNonce fx + test
szerintedmi Apr 6, 2019
4cf562d
Merge branch 'staging' into rates_to_augmintjs
Apr 6, 2019
9549d42
Merge branch 'staging' into rates_to_augmintjs
Apr 6, 2019
397e971
remove bnEthFiatRate param from getMatching orders (use current rates)
szerintedmi Apr 6, 2019
c1c9d53
some comment to JSDoc format (first pass)
szerintedmi Apr 6, 2019
b00e306
[tests] ratesfeeder test split & simplified basehelpers
szerintedmi Apr 6, 2019
77aa79b
[tests] make ratesfeeder test independent - ganache snapshots
szerintedmi Apr 6, 2019
bf8555f
prettier reformatting
szerintedmi Apr 7, 2019
a83597b
add eslint to devdeps
szerintedmi Apr 7, 2019
4ff5b04
remove globals from eslintrc
szerintedmi Apr 7, 2019
21322fe
add currency prop to Exchange class
szerintedmi Apr 7, 2019
bce18f3
getMatchingOrders default to safeBlockGasLimit
szerintedmi Apr 7, 2019
4fa4815
let prettier to do indent
szerintedmi Apr 7, 2019
77fb3eb
signAndSendMatchMultipleOrders and matchMultipleOrders
szerintedmi Apr 7, 2019
edd1af0
[test] snapshot fix
szerintedmi Apr 7, 2019
0c212a1
AugmintToken class
szerintedmi Apr 7, 2019
c700b64
have a global eslintrc and prettierrc
szerintedmi Apr 8, 2019
6088060
merge staging
szerintedmi Apr 8, 2019
42cd750
eslint directive
szerintedmi Apr 8, 2019
34f788b
Merge branch 'staging' into rates_to_augmintjs
szerintedmi Apr 8, 2019
49dda20
chore(package): update mocha to version 6.1.2
greenkeeper[bot] Apr 8, 2019
0246a25
chore(package): update lockfile yarn.lock
greenkeeper[bot] Apr 8, 2019
4ff6331
Merge pull request #77 from Augmint/rates_to_augmintjs
Apr 9, 2019
b42a491
Merge branch 'staging' into greenkeeper/mocha-6.1.2
Apr 9, 2019
2a5b854
update to contracts v1.0.5
szerintedmi Apr 11, 2019
82b6413
bump yarn version to match travis'
szerintedmi Apr 11, 2019
a408929
remove pusher-js
szerintedmi Apr 11, 2019
f43b8ac
add augmint-js package
szerintedmi Apr 11, 2019
a8f166b
remove local augmint-js and point to new package
szerintedmi Apr 11, 2019
3c5e282
Merge pull request #84 from Augmint/greenkeeper/mocha-6.1.2
Apr 11, 2019
90e9df1
Merge branch 'staging' into switch_to_augmintjs
Apr 11, 2019
c762a06
chore(package): update mocha to version 6.1.3
greenkeeper[bot] Apr 12, 2019
b5fdfe5
chore(package): update lockfile yarn.lock
greenkeeper[bot] Apr 12, 2019
5ececd5
Merge pull request #85 from Augmint/switch_to_augmintjs
phraktle Apr 12, 2019
f9becd3
pin yarn's exact version
Apr 12, 2019
39a1067
pin yarn version
Apr 12, 2019
a6d3f04
Merge pull request #87 from Augmint/bump-yarn-version
phraktle Apr 12, 2019
a1d0ec4
Merge branch 'staging' into greenkeeper/mocha-6.1.3
Apr 12, 2019
bd8775b
Merge pull request #86 from Augmint/greenkeeper/mocha-6.1.3
Apr 12, 2019
e6d0841
auto reformat
szerintedmi Apr 13, 2019
9b93aab
Removed augmint-contracts submodule
szerintedmi Apr 13, 2019
68cd3e6
use docker
szerintedmi Apr 13, 2019
e3c2820
no more augmint-contracts submodule
szerintedmi Apr 13, 2019
106f087
add wait-on devdep
szerintedmi Apr 13, 2019
cf5bd55
wait for ganache to start
szerintedmi Apr 13, 2019
f04d480
remove old script
szerintedmi Apr 13, 2019
0dd9e2c
wait for ganache to launch
szerintedmi Apr 13, 2019
018a010
proper wait for ganache launch
szerintedmi Apr 13, 2019
8f7ce2f
ganache container to handle SIGINT (faster stop)
szerintedmi Apr 13, 2019
35902f4
Merge pull request #89 from Augmint/docker
Apr 15, 2019
e3dd74a
cache fix
szerintedmi Apr 15, 2019
d5c48eb
yarn wait-on
szerintedmi Apr 15, 2019
7a5bfd7
Merge pull request #90 from Augmint/fix_travis
rszaloki Apr 15, 2019
da8002a
chore(package): update mocha to version 6.1.4
greenkeeper[bot] Apr 18, 2019
81124cb
chore(package): update lockfile yarn.lock
greenkeeper[bot] Apr 18, 2019
7f17833
Merge pull request #94 from Augmint/greenkeeper/mocha-6.1.4
szerintedmi Apr 27, 2019
2cb645f
fix: upgrade express from 4.16.4 to 4.17.1 (#112)
snyk-bot Sep 14, 2020
2b58831
fix: upgrade node-fetch from 2.3.0 to 2.6.0 (#111)
snyk-bot Sep 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": [
"eslint:recommended"
],
"parserOptions": {
"ecmaVersion": 2017
},
"env": {
"mocha": true,
"node": true,
"es6": true
},
"rules": {
"indent": "off",
"max-len": "off",
"radix": "off",
"no-unused-vars": "warn",
"no-console": "off"
}
}
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "augmint-contracts"]
path = augmint-contracts
url = https://github.com/Augmint/augmint-contracts.git
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"tabWidth": 4
}
58 changes: 29 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
dist: xenial # https://docs.travis-ci.com/user/reference/xenial/
language: node_js
cache:
directories:
- "node_modules"
- "augmint-contracts/node_modules"
services:
- docker
cache: yarn
before_install:
- 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
before_script:
- greenkeeper-lockfile-update
- yarn ganache:run > ganache.out &
- yarn contracts:migrate
- greenkeeper-lockfile-update
- yarn ganache:start > /dev/null &
- yarn wait-on tcp:localhost:8545 # ganache
script:
- yarn test
# discord webhooks hack until this is released: https://github.com/travis-ci/travis-tasks/pull/71
- yarn test
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
- ./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/G3ISPCc7BpHZzHt87Cf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0GplqFL1ziFZ3Nb2R7wGezak0LffSc=
# 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=
1 change: 0 additions & 1 deletion augmint-contracts
Submodule augmint-contracts deleted from 4b055a
84 changes: 41 additions & 43 deletions docs/developmentEnvironment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <node version, eg: 10.15.3>
```

1. Install yarn if you don't have it: `npm install -g [email protected]`
1. Yarn: `npm install -g yarn@<yarn version, e.g. 1.15.2>`
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 <node version number, eg: 10.15.3>
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@<yarn version, e.g. 1.15.2>`
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)

Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@
},
"engines": {
"node": "10.15.3",
"yarn": "1.13.0"
"yarn": "1.15.2"
},
"dependencies": {
"@augmint/js": "0.0.2",
"bignumber.js": "5.0.0",
"cross-env": "5.2.0",
"dotenv": "7.0.0",
"express": "4.16.4",
"express": "4.17.1",
"http-errors": "1.7.2",
"morgan": "1.9.1",
"node-fetch": "2.3.0",
"pusher-js": "4.4.0",
"node-fetch": "2.6.0",
"ulog": "2.0.0-beta.6",
"web3": "1.0.0-beta.36"
},
"devDependencies": {
"chai": "4.2.0",
"mocha": "6.1.1",
"eslint": "5.16.0",
"mocha": "6.1.4",
"nock": "10.0.6",
"sinon": "7.3.1"
"sinon": "7.3.1",
"wait-on": "3.2.0"
},
"optionalDependencies": {
"bufferutil": "4.0.1",
Expand All @@ -38,9 +40,8 @@
"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:run": "cd augmint-contracts && yarn ganache:run",
"contracts:runmigrate": "cd augmint-contracts && yarn runmigrate"
"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": {
"ignore": [
Expand All @@ -60,4 +61,4 @@
"url": "https://github.com/Augmint/augmint-ratesfeeder/issues"
},
"homepage": "https://github.com/Augmint/augmint-ratesfeeder#readme"
}
}
24 changes: 0 additions & 24 deletions src/.eslintrc

This file was deleted.

4 changes: 0 additions & 4 deletions src/.prettierrc

This file was deleted.

Loading