feat/refactor - Osmosis Connector Refactor (and Cosmos Chain Support)#559
Open
chesoft wants to merge 11 commits intohummingbot:developmentfrom
Open
feat/refactor - Osmosis Connector Refactor (and Cosmos Chain Support)#559chesoft wants to merge 11 commits intohummingbot:developmentfrom
chesoft wants to merge 11 commits intohummingbot:developmentfrom
Conversation
…from functional tests into mock tests. Also check against README.md if anything missing with provider implementation method.
Contributor
Author
|
Failing check comes from tests-that-aren't-mine. I've retested a clean hummingbot/gateway:development branch and am getting the same, so I'm innocent here. @fengtality Pinging you here `Summary of all failing tests FAIL test/connectors/pancakeswap/universal-router.test.ts (24.052 s) ● UniversalRouterService › quote result structure › should return properly structured quote result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A description of the changes proposed in the pull request:
Re-adds Osmosis connector and Cosmos chain. Note that all chain routes go through Osmosis/RPC.
One line change required in HBOT main: hummingbot/connector/gateway/common_types.py
class Chain(Enum):
Notable changes (required for cosmjs support):
1/2
tsconfig.json
"target": "ESNext",
"module": "nodenext",
"isolatedModules": true,
"moduleResolution": "nodenext",
For the rest of the project, the only change the above requires is using full relative imports when calling import() within functions eg.
const { quoteSwap } = await import('./quoteSwap.js');
^ Just added ".js" to import string
2/2
For jest, NODE_OPTIONS --experimental-vm-modules (for ESM, added into package.json scripts)
I really tried to find a way to avoid changing these, but cosmjs needs proper ESM support and short of forking cosmjs into my own NPM (again), there's no way to do so. Happy to be shown wrong.
Added packages:
@chain-registry/types @cosmjs/amino @cosmjs/cosmwasm-stargate @osmonauts/math @osmonauts/utils @cosmjs/tendermint-rpc @cosmjs/stargate @cosmjs/encoding @cosmjs/proto-signing@0.32.3 osmojs osmo-query @cosmjs/cosmwasm-stargate bignumber.js
Tests performed by the developer:
Full end to end tests on all functions, plus mocked tests using generated JSON. See attached file (apparently .ts not supported so added into zip)
osmosis.testnojest.zip
Tips for QA testing:
I added example entries for vscode launch.json into README.md for other poor sods who actually debug stuff.
test:cov requires NODE_OPTIONS --max-old-space-size=16000 or higher.