Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #87 from CoinAlpha/development
Browse files Browse the repository at this point in the history
release / sync dev -> master
  • Loading branch information
dennisocana committed Jun 8, 2021
2 parents 8100a1d + eecf4a4 commit 5bd8386
Show file tree
Hide file tree
Showing 49 changed files with 18,939 additions and 11,265 deletions.
6 changes: 2 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"presets": [
"@babel/preset-env"
]
}
"presets": ["@babel/preset-env"]
}
10 changes: 5 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
node_modules
npm-debug.log
.git
# Environment files
*.env
*.env.*
# except the example .env.example
!.env.example

# Configuration files
conf/*
# except the example conf/global_conf.yml.example
!conf/global_conf.yml.example

# Gateway API files
*.pem
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
83 changes: 0 additions & 83 deletions .env.example

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# turn off specific file for eslint
/*.js
/node_modules
21 changes: 12 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
module.exports = {
extends: 'standard',
extends: ['eslint:recommended', 'prettier'],
parser: 'babel-eslint',
plugins: ['prettier'],
env: {
node: true,
es6: true
},
rules: {
// disable semicolon check
semi: 'off',

// override default options for rules from base configurations
'comma-dangle': 'off',

// disable rules from base configurations
'no-console': 'off',
'comma-dangle': ['error', 'never'],
'no-multi-spaces': 'off',
'no-underscore-dangle': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'prettier/prettier': 'error',
semi: [2, 'always']
}
};
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ Desktop.ini
# IDEA files
.idea

# Environment files
*.env
*.env.*
# except the example .env.example
!.env.example
# Configuration files
conf/*
# except the example conf/global_conf.yml.example
!conf/global_conf.yml.example

# node installs
node_modules/
Expand All @@ -22,9 +21,12 @@ dist/

# misc
logs/
package-lock.json

# cert
*.pem
*.srl
*.key
*.crt
*.crt
*.log
*.lock
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
certs
*.md
*.yml
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "none",
"semi": true,
"singleQuote": true,
"tabWidth": 2
}
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.22.0-alpine
FROM node:12.13.0-alpine

# Add timezone database
RUN apk add --no-cache tzdata
Expand Down Expand Up @@ -26,9 +26,6 @@ RUN yarn install
# copy pwd file to container
COPY . .

# create empty env file
RUN touch .env

EXPOSE 5000

CMD ["yarn", "run", "start"]
CMD ["yarn", "run", "start"]
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Hummingbot Gateway is an open-source project that integrates cryptocurrency trad

We created hummingbot to promote **decentralized market-making**: enabling members of the community to contribute to the liquidity and trading efficiency in cryptocurrency markets.



## Getting Started

### Learn more about Hummingbot
Expand Down Expand Up @@ -46,3 +44,20 @@ Hummingbot Gateway was created and is maintained by CoinAlpha, Inc. We are [a gl
## Legal

- **License**: Hummingbot is licensed under [Apache 2.0](./LICENSE).

## Development

This repo uses `eslint` and `prettier`. When you run `git commit` it will trigger the `pre-commit` hook.
This will run `eslint` on the `src` and `test` directories.

You can lint before committing with:

```bash
yarn run lint
```

You can run the prettifier before committing with:

```bash
yarn run prettier
```
91 changes: 91 additions & 0 deletions conf/global_conf.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
CORE:
APPNAME: Hummingbot Gateway API
NODE_ENV: dev
PORT: 5000

# use only if ip whitelist is required for local or docker instance
# note that docker instance does not use 127.0.0.1 address
# ipv6 format for locahost ["::ffff:127.0.0.1", "::ffff:1", "fe80::1", "::1"]
IP_WHITELIST:

HUMMINGBOT_INSTANCE_ID:

# Celo

# Terra
# - mainnet: https://lcd.terra.dev
# - mainnet chain: columbus-4
# - testnet: https://tequila-lcd.terra.dev
# - testnet chain: tequila-0004
TERRA_LCD_URL:
TERRA_CHAIN:

# Ethereum
# - chain: mainnet, kovan, etc
# - rpc url: infura or other rpc url
# - token list: erc20 token list source (ref: https://tokenlists.org/)
ETHEREUM_CHAIN:
ETHEREUM_RPC_URL: "https://{chain}.infura.io/v3/{api_key}"
ETHEREUM_TOKEN_LIST_URL: https://wispy-bird-88a7.uniswap.workers.dev/?url=http://tokens.1inch.eth.link

# Balancer
# subgraph_chain
# Reference: https://docs.balancer.finance/sor/development#subgraph
# - mainnet: balancer
# - kovan: balancer-kovan
# Note: REACT_APP_SUBGRAPH_URL used by @balancer-labs/sor
REACT_APP_SUBGRAPH_URL: https://api.thegraph.com/subgraphs/name/balancer-labs/{subgraph_chain}

# exchange_proxy:
# Reference: https://docs.balancer.finance/smart-contracts/addresses
# - mainnet: 0x3E66B66Fd1d0b02fDa6C811Da9E0547970DB2f21
# - kovan: 0x4e67bf5bD28Dd4b570FBAFe11D0633eCbA2754Ec
EXCHANGE_PROXY:

# Uniswap
# Reference: https://uniswap.org/docs/v2/smart-contracts/router02/
# UniswapV2Router02 is deployed at 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D on the Ethereum mainnet, and the Ropsten, Rinkeby, Görli, and Kovan testnets.

# UNISWAP_V3_CORE is deployed at 0x1F98431c8aD98523631AE4a59f267346ea31F984 on the Ethereum mainnet, and the Ropsten, Rinkeby, Görli, and Kovan testnets.
# UNISWAP_V3_ROUTER is deployed at 0xE592427A0AEce92De3Edee1F18E0157C05861564 on the Ethereum mainnet, and the Ropsten, Rinkeby, Görli, and Kovan testnets.
# UNISWAP_V3_NFT_MANAGER is deployed at 0xC36442b4a4522E871399CD717aBDD847Ab11FE88 on the Ethereum mainnet, and the Ropsten, Rinkeby, Görli, and Kovan testnets.

UNISWAP_ROUTER: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
UNISWAP_V3_CORE: 0x1F98431c8aD98523631AE4a59f267346ea31F984
UNISWAP_V3_ROUTER: 0xE592427A0AEce92De3Edee1F18E0157C05861564
UNISWAP_V3_NFT_MANAGER: 0xC36442b4a4522E871399CD717aBDD847Ab11FE88
# allowed slippage for swap transactions
UNISWAP_ALLOWED_SLIPPAGE: 1.5
# restrict updating pairs that have no reserves or failed for 5 minutes
UNISWAP_NO_RESERVE_CHECK_INTERVAL: 300000
# cache info about pair for 1 second
UNISWAP_PAIRS_CACHE_TIME: 1000

# cert
CERT_PATH:
CERT_PASSPHRASE:

# logs
# default to ./logs if path is not set
LOG_PATH: ./logs

# GMT offset for logging (alpine docker image default to UTC timezone)
# -0800, -0500, +0200, +0800
GMT_OFFSET: +0800

# EthGasStation
# API key for defipulse.com gas station API
# Gas level you want to use for Ethereum transactions (fast, fastest, safeLow, average)
ENABLE_ETH_GAS_STATION: true
ETH_GAS_STATION_API_KEY:
ETH_GAS_STATION_GAS_LEVEL: fast
ETH_GAS_STATION_REFRESH_TIME: 60
MANUAL_GAS_PRICE: 100

# Balancer Config
BALANCER_MAX_SWAPS: 4


# Perpetual Finance Provider URL
# default: https://dai.poa.network , https://rpc.xdaichain.com, etc
XDAI_PROVIDER:
Loading

0 comments on commit 5bd8386

Please sign in to comment.