-
Notifications
You must be signed in to change notification settings - Fork 45
[FEAT] Bumps to web3 v6, adds linters, adds tests (pending upstream merge) #55
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
base: main
Are you sure you want to change the base?
Conversation
| # checkout submodules | ||
| git submodule update --init --recursive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in the docs atm, might need to add the compile step too
| stringError = str('{}'.format(error)); | ||
| if "BAL#" in stringError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and whitespaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if this should be a submodule as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some history around this -- it used to be a standalone package, was briefly a submodule, then was directly thrown into the package when the previous maintainer said they had no plans to make any future updates. It seemed safer to just move it into balpy to have the freedom to update as needed.
That being said, I am not aware of anyone using it, and the packages do have some errors in them. I've had someone find some notable issues in the stable math library, and the way that the "pools" themselves are structured is incorrect.
At this point, it might just make sense to remove them entirely, at least for now. It probably doesn't sense to move these files forward knowing that they have accuracy/implementation issues
| requests="2.25.1" | ||
| eth-abi="2.1.1" | ||
| gql="2.0.0" | ||
| multicaller=">=0.0.0a10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
samples/batchSwaps/sorSwapSample.py
Outdated
| if not tokens: | ||
| raise ValueError("No tokens provided in swap") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is when the swap is not found in the router
| test: | ||
| poetry run pytest tests | ||
|
|
||
| all: fmt lint test No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consistent formatting and linting
| def test_get_pool_ids(): | ||
| get_pool_ids(TEST_NETWORK) | ||
|
|
||
|
|
||
| def test_get_pools(): | ||
| get_pools(TEST_NETWORK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests for the graph queries.
pyproject.toml
Outdated
| gql=">=2.0.0" | ||
| jstyleson=">=0.0.2" | ||
| web3="~6" | ||
| multicaller = {path = "../multicaller"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo use version number
[feat] ensured commit matches
feat: relaxed dependencies
feat: add apiEndpoint to balpy class
feat:fixed-ci-issues
…able fix:added-deployments-docs-table
Chore/fix swap data
Fix/swaps
feat: add get ticker graph query
Chore/bump multicaller
Bump multicaller
remove web3 middleware
This pr is to (Hopefully) bump balpy to web3.py > v5
There are a number of dependants which would need to be merged and released;
gerrrg/multicaller#1
I am very sorry about the size of this pr i got a little carried away.
However, it does accomplish few things and fixes a few bugs caught by the now introduced linters.
Features.
-> formatters to fix the incostent tabs and spaces issues, sort imports and format with black.
-> linters: -> autopep8
-> test suite: demonstrates functionality of the subgraph queries to allow for tests.
-> dev group for dependencies.
Probably a bit too aggressive i again apologies.