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

sync gateway / gateway staging -> main #166

Merged
merged 34 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c6bca57
(feat) Interact directly with the pool in Uniswap connector
VPashkov Jun 21, 2023
01fb1ff
fix/ Update version in package.json
nikspz Jun 26, 2023
7db9f23
Merge pull request #139 from hummingbot/fix-Update-version-in-package…
nikspz Jun 26, 2023
5d5dd22
Bump socket.io-parser from 4.2.2 to 4.2.4
dependabot[bot] Jun 26, 2023
31c8890
Merge branch 'development' into feat/uniswap_direct_pool_interation
nikspz Jun 27, 2023
6416491
Merge pull request #136 from VPashkov/feat/uniswap_direct_pool_intera…
fengtality Jul 2, 2023
82f1d43
(fix) change uniswap to default not to use route
fengtality Jul 2, 2023
b0342e4
Merge pull request #142 from hummingbot/fix/uniswap-default-quoter
fengtality Jul 2, 2023
0ddfe23
refactor chains
vic-en Jul 5, 2023
842e056
Merge branch 'development' into feat/chain_refactor
fengtality Jul 5, 2023
f16856e
Merge branch 'development' into dependabot/npm_and_yarn/socket.io-par…
nikspz Jul 6, 2023
48d66f3
Merge pull request #141 from hummingbot/dependabot/npm_and_yarn/socke…
nikspz Jul 6, 2023
6d25afd
Merge branch 'development' into feat/chain_refactor
nikspz Jul 6, 2023
8971533
Merge pull request #147 from vic-en/feat/chain_refactor
fengtality Jul 6, 2023
1bf611e
Update CONTRIBUTING.md
david-hummingbot Jul 10, 2023
c59e5c2
dont use router in uniswaplp
fengtality Jul 11, 2023
f0486b5
remove commented code
fengtality Jul 13, 2023
8d63bb2
replace workflow lists path
fengtality Jul 13, 2023
f053f2d
Merge pull request #149 from hummingbot/contribution-guidelines
fengtality Jul 13, 2023
23edc3f
fix folder link
fengtality Jul 13, 2023
5ef5f27
Merge branch 'development' into feat/test-uniswaplp-fix
fengtality Jul 14, 2023
2230acf
Merge pull request #153 from hummingbot/feat/test-uniswaplp-fix
nikspz Jul 14, 2023
5ec7cad
(feat) copy lists upon startup
fengtality Jul 15, 2023
ce7ddd1
delete_zig_zag_defikingdoms
nikspz Jul 17, 2023
9acb7e0
remove zigzag
nikspz Jul 17, 2023
d2ee22d
remove zigzag config
nikspz Jul 17, 2023
0c5ab3e
remove zigzag configs
nikspz Jul 17, 2023
3a28f3b
Merge pull request #160 from hummingbot/feat/copy-lists
fengtality Jul 17, 2023
b3c6834
Merge branch 'development' into development
fengtality Jul 17, 2023
39f62e7
(fix) remove defikingdoms lib
fengtality Jul 17, 2023
f834a3e
Merge pull request #162 from hummingbot/fix/remove-zigzag-defikingdoms
fengtality Jul 17, 2023
fa51a8d
Merge pull request #163 from hummingbot/development
nikspz Jul 18, 2023
6022430
fix/ Update package.json version to 1.18.0 on staging
nikspz Jul 24, 2023
46a3622
Merge pull request #171 from hummingbot/fix-Update-package.json-versi…
nikspz Jul 24, 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
5 changes: 3 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ jobs:
- name: Build project
run: yarn build

- name: Replace testnet nodeURL for local hardhat node
- name: Replace testnet nodeURL and lists path
run: |
mkdir conf db
cp -r src/templates/* conf
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
Expand Down
136 changes: 45 additions & 91 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
# Contribution Guidelines

## General workflow
## General Workflow

1. Fork the [hummingbot/gateway](https://github.com/hummingbot/gateway) repository.
1. Fork the `hummingbot/gateway` repository.
2. Create a new branch from the `development` branch in your fork.
3. Make commits to your branch.
4. When you have finished with your fix / feature / connector / documentation:
3. Commit your changes to your branch.
4. Once you've completed your fix, feature, connector, or documentation:

- Rebase upstream changes into your branch
- Create a pull request to the `development` branch
- Include a description of your changes
- Ensure to **Allow edits by maintainers** before submitting the pull request
- Rebase upstream changes into your branch.
- Create a pull request to the `development` branch.
- Include a detailed description of your changes.
- Ensure to `allow edits by maintainers` before submitting the pull request.

5. Your code changes will be reviewed/tested by Hummingbot Foundation's engineering and QA teams.
6. Fix any changes requested by your reviewers and testers, and push your fixes as a single new commit.
7. Once the pull request has been approved, it will be merged by a member of the Hummingbot Foundation team.
5. Your code changes will be reviewed and tested by the Foundation QA team.
6. Address any changes requested by your reviewer, fix issues raised, and push your fixes as a single new commit.
7. Once the pull request has been reviewed and accepted, it will be merged by a member of the Hummingbot Foundation team.

**NOTE:** Tests are very important. Submit tests if your pull request contains new, testable behavior. See [Unit test coverage](#unit-test-coverage) for more information.
**Note:** Tests are crucial. If your pull request contains new, testable behavior, please submit tests. Refer to the 'Unit Test Coverage' section for more information.

## Detailed workflow
## Detailed Workflow

### 1. Fork the repository
### 1. Fork the Repository

Use GitHub's interface to make a fork of the repo, add the Gateway repo as an upstream remote, and fetch upstream data:
Use GitHub's interface to fork the repo, add the Hummingbot repo as an upstream remote, and fetch upstream data:

```
```bash
git remote add upstream https://github.com/hummingbot/gateway.git
git fetch upstream
```

### 2. Creating your branch
### 2. Create Your Branch

Create your local branch and should follow this naming convention:
Create your local branch following this naming convention:

- feat/ ...
- fix/ ...
- refactor/ ...
- doc/ ...
- feat/...
- fix/...
- refactor/...
- doc/...

Create and switch to a new local branch called `feat/[branch_name]` based on `development` of the remote `upstream`.
Create and switch to a new local branch called feat/[branch_name] based on the development branch of the remote upstream:

```
```bash
git checkout -b feat/[branch_name] upstream/development
```

### 3. Commit changes to a branch
### 3. Commit Changes to Your Branch

Make commits to your branch. Prefix each commit like so:

Expand All @@ -54,89 +54,43 @@ Make commits to your branch. Prefix each commit like so:
- (cleanup) ...
- (doc) ...

Make changes and commits on your branch, and make sure that you only make relevant changes. If you find yourself making unrelated changes, create a new branch for those changes.
Commit messages should be written in the present tense, e.g., "(feat) add unit tests". The first line of your commit message should be a summary of what the commit changes, aiming for about 70 characters max. If you want to explain the commit in more depth, provide a more detailed description after a blank line following the first line.

Commit message guidelines:
### 4. Rebase Upstream Changes

- Commit messages should be written in the present tense, e.g. "(feat) add unit tests".
- The first line of your commit message should be a summary of what the commit changes. Aim for about 70 characters max. Remember: This is a summary, not a detailed description of everything that changed.
- If you want to explain the commit in more depth, following the first line should be blank and then a more detailed description of the commit. This can be as detailed as you want, so dig into details here and keep the first line short.

### 4. Rebase upstream changes

Once you are done making changes, you can begin the process of getting
your code merged into the main repo. Step 1 is to rebase upstream
changes to the `development` branch into yours by running this command
from your branch:
Rebase upstream changes to the development branch into yours by running this command from your branch:

```bash
git pull --rebase upstream development
```

This will start the rebase process. You must commit all of your changes
before doing this. If there are no conflicts, this should just roll all
of your changes back on top of the changes from upstream, leading to a
nice, clean, linear commit history.

If there are conflicting changes, git will start yelling at you part way
through the rebasing process. Git will pause rebasing to allow you to sort
out the conflicts. You do this the same way you solve merge conflicts,
by checking all of the files git says have been changed in both histories
and picking the versions you want. Be aware that these changes will show
up in your pull request, so try and incorporate upstream changes as much
as possible.

You pick a file by `git add`ing it - you do not make commits during a
rebase.

Once you are done fixing conflicts for a specific commit, run:
If there are conflicting changes, git will pause rebasing to allow you to sort out the conflicts. Once you are done fixing conflicts for a specific commit, run:

```bash
git rebase --continue
```

This will continue the rebasing process. Once you are done fixing all
conflicts you should run the existing tests to make sure you didn’t break
anything, then run your new tests (there are new tests, right?) and
make sure they work also.

If rebasing broke anything, fix it, then repeat the above process until
you get here again and nothing is broken and all the tests pass.

### 5. Create a pull request

Make a clear pull request from your fork and branch to the upstream `development`
branch, detailing exactly what changes you made and what feature this
should add. The clearer your pull request is the faster you can get
your changes incorporated into this repo.

It is important to check **Allow edits by maintainers** for the Hummingbot Foundation team to update your branch with `development` whenever needed.

If the development team requests changes, you should make more commits to your
branch to address these, then follow this process again from rebasing onwards.
Ensure all tests pass after rebasing.

Once you get back here, make a comment requesting further review and
someone will look at your code again. If it addresses the requests, it will
get merged, else, just repeat again.
### 5. Create a Pull Request

Thanks for contributing!
Create a clear pull request from your fork and branch to the upstream `development` branch, detailing your changes. Check 'Allow edits by maintainers' for the Foundation team to update your branch with development whenever needed.

## Unit test coverage
If the Foundation team requests changes, make more commits to your branch to address these, then follow this process again from rebasing onwards. Once you've addressed the requests, request further review.

It is required to present a minimum unit test coverage for the changes included in a pull request. Some components may be excluded from this validation. To calculate the diff-coverage locally on your computer, run `yarn tes:cov`.
## Unit Test Coverage

## Checklist:
A minimum of 75% unit test coverage is required for all changes included in a pull request. Some components may be excluded from this validation.

This is just to help you organize your process
To calculate the diff-coverage locally on your computer, run `yarn test:cov`.

- [ ] Did I create my branch from `development` (don't create new branches from existing feature branches)?
- [ ] Did I follow the correct naming convention for my branch?
- [ ] Is my branch focused on a single main change?
- [ ] Do all of my changes directly relate to this change?
- [ ] Did I rebase the upstream `development` branch after I finished all my
work?
- [ ] Did I write a clear pull request message detailing what changes I made?
- [ ] Did I get a code review?
- [ ] Did I make any requested changes from that code review?
## Checklist

If you follow all of these guidelines and make good changes, you should have no problem getting your changes merged in.
- Did I create my branch from `development` (don't create new branches from existing feature branches)?
- Did I follow the correct naming convention for my branch?
- Is my branch focused on a single main change?
- Do all of my changes directly relate to this change?
- Did I rebase the upstream development branch after I finished all my work?
- Did I write a clear pull request message detailing what changes I made?
- Did I get a code review?
- Did I make any requested changes from that code review?
73 changes: 0 additions & 73 deletions docs/swagger/algorand-routes.yml

This file was deleted.

36 changes: 26 additions & 10 deletions docs/swagger/evm-routes.yml → docs/swagger/chain-routes.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
paths:
/evm/nonce:
/chain/nonce:
post:
tags:
- 'evm'
- 'chain'
summary: 'Get the current nonce for the provided private key'
operationId: 'nonce'
consumes:
Expand All @@ -20,10 +20,10 @@ paths:
schema:
$ref: '#/definitions/NonceResponse'

/evm/nextNonce:
/chain/nextNonce:
post:
tags:
- 'evm'
- 'chain'
summary: 'Get the next nonce for the provided private key'
operationId: 'nonce'
consumes:
Expand All @@ -41,10 +41,10 @@ paths:
schema:
$ref: '#/definitions/NonceResponse'

/evm/allowances:
/chain/allowances:
post:
tags:
- 'evm'
- 'chain'
summary: 'Get the ERC20 allowances for a spender on a given private key'
operationId: 'allowances'
consumes:
Expand All @@ -61,10 +61,10 @@ paths:
'200':
schema:
$ref: '#/definitions/AllowancesResponse'
/evm/approve:
/chain/approve:
post:
tags:
- 'evm'
- 'chain'
summary: 'Create an ERC20 approval for a spender on an private key'
operationId: 'approve'
consumes:
Expand All @@ -82,10 +82,10 @@ paths:
schema:
$ref: '#/definitions/ApproveResponse'

/evm/cancel:
/chain/cancel:
post:
tags:
- 'evm'
- 'chain'
summary: 'Cancel transaction'
operationId: 'cancel'
consumes:
Expand All @@ -102,3 +102,19 @@ paths:
'200':
schema:
$ref: '#/definitions/CancelResponse'

/chain/transfer:
post:
tags:
- 'chain'
summary: 'Transfer balance'
parameters:
- in: 'body'
name: 'body'
required: true
schema:
$ref: '#/definitions/TransferRequest'
produces:
- 'application/json'
responses:
'200'
Loading
Loading