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

gateway sync / gateway development -> staging for release version 1.19.0 #189

Merged
merged 95 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
8cbe5d5
Bump word-wrap from 1.2.3 to 1.2.4
dependabot[bot] Jul 20, 2023
e42e42f
fix issue with unrecognised tokens
vic-en Jul 23, 2023
bfe5d42
refactor evm connectors to use checksumed address
vic-en Jul 23, 2023
6cfee79
Merge branch 'development' of https://github.com/vic-en/gateway into …
vic-en Jul 23, 2023
d253e02
fix/ Update package.json version
nikspz Jul 24, 2023
8ffb349
Merge pull request #170 from hummingbot/fix/-Update-package.json
nikspz Jul 24, 2023
6286857
Merge pull request #166 from hummingbot/staging
nikspz Jul 24, 2023
0ea5f8c
Merge branch 'development' into fix/uniswap_token_address
fengtality Jul 24, 2023
d272192
Merge pull request #169 from vic-en/fix/uniswap_token_address
fengtality Jul 25, 2023
6df1fe6
Merge branch 'main' into dependabot/npm_and_yarn/word-wrap-1.2.4
fengtality Jul 25, 2023
f11afd0
Merge branch 'development' into dependabot/npm_and_yarn/word-wrap-1.2.4
fengtality Jul 25, 2023
195573b
Merge pull request #165 from hummingbot/dependabot/npm_and_yarn/word-…
fengtality Jul 25, 2023
a336752
add docker workflow
david-hummingbot Jul 26, 2023
00c1e3f
add docker_build_tags
david-hummingbot Jul 26, 2023
045c8f5
Uniswap unhandled error and duplicate values for USDC.e on ui
Jul 27, 2023
643eb53
Uniswap unhandled error and duplicate values for USDC.e on ui
isreallee82 Jul 27, 2023
a0a34f9
update gateway collection api
Jul 27, 2023
33760b0
Name chenges Bridsed to Bridged
isreallee82 Jul 27, 2023
7b4b992
(feat) add UI for gateway version)
Jul 31, 2023
248cf3c
Merge pull request #178 from hummingbot/update-postman
rapcmia Aug 1, 2023
8338655
Merge branch 'development' into add_gateway_version
nikspz Aug 1, 2023
087e36f
Merge branch 'development' into development
isreallee82 Aug 2, 2023
b89018d
Merge pull request #181 from hummingbot/add_gateway_version
rapcmia Aug 3, 2023
515b408
Merge branch 'development' into development
nikspz Aug 3, 2023
54c7bc8
Refactor arbitrum_one to arbitrum
isreallee82 Aug 3, 2023
47b7990
Merge branch 'development' into feat/arbitrum_refactor
isreallee82 Aug 3, 2023
1cc4a6e
(feat) add tezos chain support
OjusWiZard May 2, 2023
3e9efa5
(feat) add sign from tezos wallet
OjusWiZard May 3, 2023
1da6dba
(fix) chainId type in Tezos TokenInfo
OjusWiZard May 8, 2023
1966d7e
(fix): add missing gasLimitTransaction in Tezosish
OjusWiZard May 9, 2023
52d5e73
(fix) update manualGasPrice
OjusWiZard May 14, 2023
304324f
(fix) update tokens
OjusWiZard Jun 20, 2023
120cf78
(feat) add /nextNonce route
OjusWiZard Jun 20, 2023
7105f66
(fix) API bug fixes and improve compactibility
OjusWiZard Jun 20, 2023
c1133b9
(fix) update test for new compactibility
OjusWiZard Jun 20, 2023
5557cce
(feat) add tezos chain support
OjusWiZard May 2, 2023
240a19c
(fix): add missing gasLimitTransaction in Tezosish
OjusWiZard May 9, 2023
7f386a8
(fix) update test for new compactibility
OjusWiZard Jun 20, 2023
11dba37
(fix) refactor tezos controller
OjusWiZard Jul 11, 2023
f9a36db
(fix) solve dependency conflict
OjusWiZard Jul 12, 2023
819cf80
(feat) add getTokens in Tezos controller
OjusWiZard Jul 12, 2023
137c04a
(fix) gasUsed significance according to eth
OjusWiZard Jul 12, 2023
8f43267
(fix) add custom validateTezosTokenSymbols
OjusWiZard Jul 13, 2023
6cb1d3e
(fix) higher counter error in new taquito version
OjusWiZard Jul 13, 2023
27fa133
(fix) optimise getTokenAllowance
OjusWiZard Jul 13, 2023
31bfa18
(refactor) token list path
OjusWiZard Jul 13, 2023
d9eaa0d
(feat) add missing test for new getTokens route
OjusWiZard Jul 13, 2023
dfaa111
(feat) add tezos chain support
OjusWiZard May 2, 2023
c18e6a2
(fix) solve dependency conflict
OjusWiZard Jul 12, 2023
512caa4
(feat) add plenty connector support
OjusWiZard Jun 21, 2023
3e18ae5
(fix) CTEZ capitalization bug
OjusWiZard Jun 21, 2023
4b99e6a
(feat) add plenty tests
OjusWiZard Jun 21, 2023
9b4c288
(cleanup) comments in plenty.controller.ts
OjusWiZard Jun 23, 2023
1cc356b
(feat) add plenty routes and controllers tests
OjusWiZard Jun 23, 2023
e19cfd7
(fix) update Plenty router contract
OjusWiZard Jul 7, 2023
4ba0677
(chore) add debug logs
OjusWiZard Jul 7, 2023
f5ef81a
(feat) add plenty connector support
OjusWiZard Jun 21, 2023
853e23b
(cleanup) remove lpTokenSupply from pools
OjusWiZard Jul 12, 2023
c89f274
(fix) optimize pool contract fetching
OjusWiZard Jul 12, 2023
40dcc08
(fix) optimize pricing API using analytics API
OjusWiZard Jul 12, 2023
04f12dc
(fix) half the allowedSlippage
OjusWiZard Jul 12, 2023
fa68ed7
(fix) remove ghostnet from plenty config
OjusWiZard Jul 13, 2023
0c84026
(fix) plenty trading type to AMM
OjusWiZard Jul 13, 2023
210e219
(fix) update failing tests according to new config
OjusWiZard Jul 13, 2023
489dc70
(fix) optimise plentyBuyTrade paths
OjusWiZard Jul 13, 2023
eb036ab
remove zigzag
nikspz Jul 17, 2023
2433d6c
(feat) add tezos chain support
OjusWiZard May 2, 2023
6602b27
(fix) solve dependency conflict
OjusWiZard Jul 12, 2023
72b9ec2
(fix) failing /poll test
OjusWiZard Jul 17, 2023
464c203
(fix) failing build from controller
OjusWiZard Jul 17, 2023
765b702
(fix) failing testcase after rebase
OjusWiZard Aug 6, 2023
6adbffa
Merge pull request #182 from isreallee82/feat/arbitrum_refactor
nikspz Aug 7, 2023
65bbe02
arbitrum_one_coingecko to arbitrum_coingecko
isreallee82 Aug 7, 2023
8795cc3
Merge branch 'development' into development
isreallee82 Aug 7, 2023
3afcafc
Merge pull request #177 from isreallee82/development
nikspz Aug 7, 2023
3e1b3e6
Merge branch 'development' into feat/plenty
nikspz Aug 15, 2023
b661636
Bump protobufjs from 6.11.3 to 6.11.4
dependabot[bot] Aug 15, 2023
6e05e42
(fix) add tezos validation message for private key
OjusWiZard Aug 18, 2023
6de1997
Merge branch 'development' into fix/gateway-workflow
fengtality Aug 20, 2023
5b489d3
Merge pull request #176 from hummingbot/fix/gateway-workflow
fengtality Aug 20, 2023
9504cba
Merge branch 'development' into feat/plenty
fengtality Aug 20, 2023
3ebf3c7
Merge pull request #156 from OjusWiZard/feat/plenty
fengtality Aug 20, 2023
7d019b1
move bronze tests to own dir
fengtality Aug 20, 2023
7e4fa28
change ethereum tests from /network to /chain
fengtality Aug 20, 2023
0433c92
fix swagger docs
fengtality Aug 20, 2023
0322050
fix tests for AVAX and BSC
fengtality Aug 20, 2023
369b617
update routes for bronze connector tests
fengtality Aug 20, 2023
88c364a
fixed eth controller tests
fengtality Aug 21, 2023
5e61d1f
(fixed clob tests
fengtality Aug 21, 2023
6bcfb9b
fixed network test
fengtality Aug 21, 2023
5424ce5
move clob tests to test-bronze
fengtality Aug 21, 2023
f2e86ae
update github workflow
fengtality Aug 21, 2023
285a9d5
Merge pull request #188 from hummingbot/fix/gateway-tests
rapcmia Aug 22, 2023
bbdcc5c
Merge branch 'development' into dependabot/npm_and_yarn/protobufjs-6.…
fengtality Aug 23, 2023
e898263
Merge pull request #186 from hummingbot/dependabot/npm_and_yarn/proto…
fengtality Aug 23, 2023
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
47 changes: 47 additions & 0 deletions .github/workflows/docker_build_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Push Docker image

on:
pull_request:
types: [closed]
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.9.1
with:
version: latest

- name: Login to DockerHub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4.1.1
with:
context: .
push: true
tags: hummingbot/gateway:latest
platforms: linux/amd64,linux/arm64
build-args: |
BRANCH=${{ github.ref }}
COMMIT=${{ github.sha }}
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
cache-from: type=registry,ref=hummingbot/gateway:latest
cache-to: type=inline

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
37 changes: 37 additions & 0 deletions .github/workflows/docker_build_tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and push Docker images on release

on:
release:
types: [published, edited]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.7.0

- name: Login to DockerHub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract tag name
id: get_tag
run: echo ::set-output name=VERSION::version-${GITHUB_REF#refs/tags/v}

- name: Build and push
uses: docker/build-push-action@v4.1.1
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: hummingbot/gateway:${{ steps.get_tag.outputs.VERSION }}
17 changes: 1 addition & 16 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,14 @@ jobs:
cp -rf src/templates/* conf
sed -i 's|/home/gateway/conf/lists/|conf/lists/|g' ./conf/*.yml
sed -i 's/https:\/\/rpc.ankr.com\/eth_goerli/http:\/\/127.0.0.1:8545\//g' ./conf/ethereum.yml
sed -i 's/https:\/\/arbitrum-rinkeby.infura.io\/v3/http:\/\/127.0.0.1:8545\//g' ./conf/ethereum.yml
sed -i 's/https:\/\/rpc.ankr.com\/optimism/http:\/\/127.0.0.1:8545\//g' ./conf/ethereum.yml
sed -i 's/https:\/\/rpc.ankr.com\/avalanche/http:\/\/127.0.0.1:8545\//g' ./conf/avalanche.yml
sed -i 's/https:\/\/rpc.ankr.com\/avalanche_fuji/http:\/\/127.0.0.1:8545\//g' ./conf/avalanche.yml
sed -i 's/https:\/\/rpc.ankr.com\/polygon_mumbai/http:\/\/127.0.0.1:8545\//g' ./conf/polygon.yml
sed -i 's/https:\/\/rpc.ankr.com\/harmony/http:\/\/127.0.0.1:8545\//g' ./conf/harmony.yml
sed -i 's/https:\/\/api.s0.b.hmny.io/http:\/\/127.0.0.1:8545\//g' ./conf/harmony.yml
sed -i 's/https:\/\/rpc.ankr.com\/bsc/http:\/\/127.0.0.1:8545\//g' ./conf/binance-smart-chain.yml
sed -i 's/https:\/\/rpc.ankr.com\/bsc_testnet_chapel/http:\/\/127.0.0.1:8545\//g' ./conf/binance-smart-chain.yml
sed -i 's/https:\/\/cosmos-testnet-rpc.allthatnode.com:26657/http:\/\/127.0.0.1:8545\//g' ./conf/cosmos.yml
sed -i 's/https:\/\/cosmos-mainnet-rpc.allthatnode.com:26657/http:\/\/127.0.0.1:8545\//g' ./conf/cosmos.yml
sed -i 's/https:\/\/evm-t3.cronos.org/http:\/\/127.0.0.1:8545\//g' ./conf/cosmos.yml
sed -i 's/https:\/\/evm.cronos.org/http:\/\/127.0.0.1:8545\//g' ./conf/cosmos.yml

- name: Run unit test coverage
if: github.event_name == 'pull_request'
shell: bash
run: |
git fetch --all -q
git checkout -b $GITHUB_SHA
DIFF_FILES=`git diff --name-only origin/$GITHUB_BASE_REF ./src/`
./node_modules/.bin/jest --listTests --findRelatedTests ${DIFF_FILES//$'\n'/ }
NODE_OPTIONS=--max-old-space-size=10240 node ./node_modules/.bin/jest --runInBand --coverage --findRelatedTests ${DIFF_FILES//$'\n'/ }
NODE_OPTIONS=--max-old-space-size=10240 node ./node_modules/.bin/jest --runInBand --coverage ./test/
# git diff origin/$GITHUB_BASE_REF | yarn diff-test-coverage -c ./coverage/lcov.info -t lcov -b 50 -l 60

docker_build_and_push:
Expand Down
132 changes: 110 additions & 22 deletions docs/swagger/chain-routes.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,54 @@
paths:
/chain/nonce:
post:
/chain/config:
get:
tags:
- 'chain'
summary: 'Get the current nonce for the provided private key'
operationId: 'nonce'
consumes:
summary: 'Returns configuration options for a chain'
produces:
- 'application/json'
responses: '200'

/chain/status:
get:
tags:
- 'chain'
summary: 'Returns status of the chain'
produces:
- 'application/json'
responses: '200'

/chain/tokens:
get:
tags:
- 'chain'
summary: 'Returns a list of tokens available on a chain'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
- in: 'query'
name: 'chain'
required: true
schema:
$ref: '#/definitions/NonceRequest'
type: 'string'
example: 'ethereum'
- in: 'query'
name: 'network'
required: true
type: 'string'
example: 'goerli'
- in: 'query'
name: 'tokenSymbols'
required: false
responses:
'200':
schema:
$ref: '#/definitions/NonceResponse'

/chain/nextNonce:
$ref: '#/definitions/TokensResponse'
/chain/allowances:
post:
tags:
- 'chain'
summary: 'Get the next nonce for the provided private key'
operationId: 'nonce'
summary: 'Get ERC20 allowances for an address on a chain'
operationId: 'allowances'
consumes:
- 'application/json'
produces:
Expand All @@ -35,18 +58,19 @@ paths:
name: 'body'
required: true
schema:
$ref: '#/definitions/NonceRequest'
$ref: '#/definitions/AllowancesRequest'
responses:
'200':
schema:
$ref: '#/definitions/NonceResponse'

/chain/allowances:
$ref: '#/definitions/AllowancesResponse'


/chain/balances:
post:
tags:
- 'chain'
summary: 'Get the ERC20 allowances for a spender on a given private key'
operationId: 'allowances'
summary: 'Get balances for an address on a chain'
operationId: 'balances'
consumes:
- 'application/json'
produces:
Expand All @@ -56,11 +80,12 @@ paths:
name: 'body'
required: true
schema:
$ref: '#/definitions/AllowancesRequest'
$ref: '#/definitions/BalancesRequest'
responses:
'200':
schema:
$ref: '#/definitions/AllowancesResponse'
$ref: '#/definitions/BalancesResponse'

/chain/approve:
post:
tags:
Expand Down Expand Up @@ -118,3 +143,66 @@ paths:
- 'application/json'
responses:
'200'

/chain/poll:
post:
tags:
- 'chain'
summary: 'Poll the status of a transaction on a chain'
operationId: 'poll'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
required: true
schema:
$ref: '#/definitions/PollRequest'
responses:
'200':
schema:
$ref: '#/definitions/PollResponse'

/chain/nonce:
post:
tags:
- 'chain'
summary: 'Get the current nonce for the provided private key'
operationId: 'nonce'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
required: true
schema:
$ref: '#/definitions/NonceRequest'
responses:
'200':
schema:
$ref: '#/definitions/NonceResponse'

/chain/nextNonce:
post:
tags:
- 'chain'
summary: 'Get the next nonce for the provided private key'
operationId: 'nonce'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
required: true
schema:
$ref: '#/definitions/NonceRequest'
responses:
'200':
schema:
$ref: '#/definitions/NonceResponse'
32 changes: 14 additions & 18 deletions docs/swagger/swagger.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
swagger: '2.0'

info:
description: 'Gateway allows clients to interoperate with blockchains and DeFi protocols via a REST API. This allows for a language agnostic way to use official SDKs for blockchains.'
version: '1.0.0'
title: 'gateway'
contact:
email: 'dev@hummingbot.io'
description: 'API middleware that lets Hummingbot clients interact with standardized DEX API endpoints on various blockchain networks'
version: '1.18.0'
title: 'Hummingbot Gateway'
license:
name: 'Apache 2.0'
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
Expand All @@ -14,25 +12,23 @@ host: 'localhost:15888'

tags:
- name: 'system'
description: 'Get information about the currently running Gateway program'
- name: 'network'
description: 'Get information about specific networks'
description: 'System endpoints'
- name: 'wallet'
description: 'Manage private keys available for use in Gateway'
description: 'Wallet endpoints'
- name: 'chain'
description: 'Blockchain network endpoints'
- name: 'amm'
description: 'Interact with AMM decentralized exchanges'
description: 'AMM DEX swap endpoints'
- name: 'amm/liquidity'
description: 'AMM DEX liquidity provision endpoints'
- name: 'clob'
description: 'Interact with CLOB spot decentralized exchanges'
description: 'CLOB spot DEX endpoints'
- name: 'clob/perp'
description: 'Interact with CLOB perpetual decentralized exchanges'
- name: 'amm/liquidity'
description: 'Interact with AMM LP contracts'
- name: 'chain'
description: 'Interact with primary chain properties'
description: 'CLOB perpetual DEX endpoints'

schemes:
- 'http'

externalDocs:
description: 'Find out more about gateway'
url: 'https://github.com/hummingbot/hummingbot'
description: 'Gateway Docs'
url: 'https://hummingbot.org/gateway'
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"@pangolindex/sdk": "^1.1.0",
"@perp/sdk-curie": "^1.16.0",
"@sushiswap/sdk": "^5.0.0-canary.116",
"@taquito/rpc": "^17.0.0",
"@taquito/signer": "^17.0.0",
"@taquito/taquito": "^17.0.0",
"@tinymanorg/tinyman-js-sdk": "^3.0.0",
"@traderjoe-xyz/sdk-v2": "^2.0.5",
"@types/fs-extra": "^9.0.13",
Expand Down Expand Up @@ -151,4 +154,4 @@
"resolutions": {
"web3-utils": "1.7.3"
}
}
}
Loading