-
Notifications
You must be signed in to change notification settings - Fork 44
[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
Open
8ball030
wants to merge
100
commits into
balancer:main
Choose a base branch
from
8ball030:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
d3ccf9f
bumped to web6
8ball030 3ef2a33
[feat] deps
4218170
bumped to web3v6
8ball030 0656963
small improvements
8ball030 f858316
reverted testing changes
8ball030 0bcefb4
added test for graph
8ball030 1cc7137
[chore] ensured pep8 compliance
8ball030 5498b3e
[chore] ensured pep8 compliance
8ball030 e55ab2f
[chore] ensured pep8 compliance
8ball030 61c6efd
[chore] added dev deps group
8ball030 98bf435
[chore] added docs
8ball030 521fb53
added test for graph
8ball030 ebb6ac9
[feat] ensured commit matches
8ball030 baedb62
Merge pull request #1 from 8ball030/feat/syncing-changes-2
8ball030 8c1b44f
feat: added base
8ball030 dc7d0d7
feat: added base
8ball030 f845b54
feat: add apiEndpoint to balpy class
8ball030 ba00442
feat: relaxed dependencies
8ball030 c64e790
Merge pull request #3 from 8ball030/feat/improvments
8ball030 b83aa67
Merge pull request #4 from 8ball030/feat/stable
8ball030 c715f93
feat: relaxed dependencies
8ball030 c73beed
feat: updated for v3 api
4f57f1e
chore: relaxed deps
8af73de
Merge branch 'main' into feat/updated-upstream
8ball030 f3ad8d2
chore: regenerated poetry lock
0b5e9a1
Merge pull request #5 from 8ball030/feat/updated-upstream
8ball030 d00c791
feat:fixed import
5462bd7
chore: linters and api3 integration
ef17927
fix: retry to account for blocking
419b598
Merge branch 'main' into feat/updates
8ball030 a804c81
Merge pull request #6 from 8ball030/feat/updates
8ball030 86ef737
chore: removed unused code
4269105
chore: improve-balpy api response handling to advoid rpc
9dff00a
chore: improve copy of query
ea5392d
chore:workflows-and-github
d2cd8b0
Merge pull request #7 from 8ball030/feat/preparing-fork
8ball030 136d305
feat/ensured-passes-ci
55052fd
feat:tbump
b70a2be
Bump to 0.0.2
54743a2
Bump to 0.0.3
87f4759
feat:bumping
5e27278
Bump to 0.0.4
f0f4998
feat:bumping
294c3a8
Bump to 0.0.5
e75a06d
feat:added-common-checks
b1b3961
Bump to 0.0.6
2f0add9
feat:aligning-relase-versions
cfb4364
Bump to 0.0.7
db3bc9d
feat:refactor
0ee7aee
Merge pull request #8 from 8ball030/feat/extra-endpoints
8ball030 061fa7f
Bump to 0.0.8
4f9391b
Bump to 0.0.9
aaab40e
feat:Add MODE support in balpy
gauravlochab 5c4b104
chore:version update to 0.1.0 for release
gauravlochab f2083dd
feat: Add mode.json for various tasks
gauravlochab e34ffb4
fix: resolve ci issue for lockfile
gauravlochab 0cf7daa
Merge pull request #9 from 8ball030/feat/add-mode
8ball030 8562d02
fix:added-deployments-docs-table
335a7bf
Bump to 0.1.1
073d739
Bump to 0.1.1
9ba7dc3
feat: return batch swap call data
xiuxiuxar fcbfb5e
set SOR to find v2 swaps only and return only bytes32 poolids
xiuxiuxar 6bda2e7
revert to correct poolid logic, now that API returns v2 only
xiuxiuxar 6163eca
define sender and recipient for safe address compatibility
xiuxiuxar 476e400
remove unneeded code
xiuxiuxar 75c03aa
fix ci, bump versions
xiuxiuxar 5b3226d
bump ci poetry
xiuxiuxar 4f0911f
update lockfile
xiuxiuxar 1771c21
bump ci poetry
xiuxiuxar 377be32
feat:fixed-ci-issues
f0e3a4a
feat:fixed-ci-issues
f428ae1
feat:fixed-ci-issues
7635168
fix:lock-issues
3236b71
Merge branch 'main' into test-fixes
8ball030 e18f75d
fix:lock-issues
563b5ac
fix:linter-issues
aa22a72
Merge pull request #13 from 8ball030/test-fixes
8ball030 1585a71
Merge pull request #10 from 8ball030/feat/generate-deployments-docs-t…
8ball030 3c98d31
Merge branch 'fix/swaps' into chore/fix-swap-data
8ball030 86e1dbd
Merge pull request #12 from xiuxiuxar/chore/fix-swap-data
8ball030 ceeceaa
fix:relock-poetry
9f3ff95
chore:linters
44ebe20
Merge pull request #14 from 8ball030/fix/swaps
8ball030 7b3770a
feat: add get ticker graph query
xiuxiuxar c2d9936
Merge pull request #15 from xiuxiuxar/feat/add-ticker-query
8ball030 62bce53
Bump to 0.1.2
a716de5
feat:example-and-improvements
6ff2553
chore:linters
bae2c69
Bump to 0.1.3
969baff
feat:fixed-query-to-pin-protocol
371855b
Bump to 0.1.4
ae7f670
bump multicaller -> v0.3.0
xiuxiuxar dfd92a8
Merge branch 'main' into chore/bump-multicaller
xiuxiuxar b72f9c2
Merge pull request #17 from xiuxiuxar/chore/bump-multicaller
8ball030 d2bdf77
Merge pull request #18 from 8ball030/bump-multicaller
8ball030 4d310da
Bump to 0.1.5
85d53bc
remove web3 middleware
xiuxiuxar 1e99104
Merge pull request #19 from xiuxiuxar/chore/remove-web3-middleware
8ball030 a65aace
Bump to 0.1.6
4f52515
feat:fixing-deps
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Code Quality | ||
| # Controls when the action will run. | ||
| on: | ||
| # Triggers the workflow on push or pull request events but only for the master branch | ||
| push: | ||
| branches: [ master, main ] | ||
| pull_request: | ||
| branches: [ master, main ] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| check: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.11",] | ||
| poetry-version: ["2.0.1"] | ||
| os: [ubuntu-24.04,] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install and configure Poetry | ||
| uses: snok/install-poetry@v1 | ||
| with: | ||
| version: ${{ matrix.poetry-version }} | ||
| virtualenvs-create: true | ||
| installer-parallel: true | ||
| - name: Install | ||
| run: | | ||
| poetry install | ||
|
|
||
| - name: Format | ||
| run: | | ||
| make fmt | ||
|
|
||
| - name: Lint | ||
| run: | | ||
| make lint | ||
|
|
||
| - name: Tests | ||
| run: | | ||
| make test | ||
|
|
||
| - name: Lock | ||
| run: | | ||
| poetry lock | ||
|
|
||
| - name: Ensure lockfile is up to date | ||
| run: | | ||
| git diff --exit-code | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Publish package on main branch if it's tagged with 'v*' | ||
|
|
||
| name: release & publish workflow | ||
|
|
||
| # Controls when the action will run. | ||
| on: | ||
| # Triggers the workflow on push events but only for the master branch | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| # This workflow contains a single job called "release" | ||
| release: | ||
| name: Create Release | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python-versions: ["3.11"] | ||
|
|
||
| # Steps represent a sequence of tasks that will be executed as part of the job | ||
| steps: | ||
| - name: Get version from tag | ||
| id: tag_name | ||
| run: | | ||
| echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} | ||
| shell: bash | ||
|
|
||
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-versions }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install poetry | ||
|
|
||
| - name: Build wheels and source tarball | ||
| run: >- | ||
| poetry build | ||
|
|
||
| - name: create github release | ||
| id: create_release | ||
| uses: softprops/action-gh-release@v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
| with: | ||
| body: ${{ steps.changelog_reader.outputs.changes }} | ||
| files: dist/*.whl | ||
| draft: false | ||
| prerelease: false | ||
|
|
||
| - name: publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| user: __token__ | ||
| password: ${{ secrets.PYPI_API_TOKEN }} | ||
| skip_existing: true |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +0,0 @@ | ||
| from .balancerErrors import handleException | ||
| from balpy import balpy | ||
|
|
||
Submodule balancer-deployments
deleted from
3269cd
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| node_modules | ||
| dist |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module.exports = { | ||
| root: true, | ||
| parser: "@typescript-eslint/parser", | ||
| plugins: ["@typescript-eslint", "prettier", "mocha-no-only"], | ||
| extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
| rules: { | ||
| "comma-spacing": ["error", {before: false, after: true}], | ||
| "prettier/prettier": "error", | ||
| "mocha-no-only/mocha-no-only": ["error"], | ||
| }, | ||
| }; |
29 changes: 29 additions & 0 deletions
29
...er-deployments/.github/PULL_REQUEST_TEMPLATE/deployment-preparation-template.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Deployment preparation: <!-- Deployment title: contract or feature (e.g. `ManagedPool`) --> | ||
|
|
||
| <!-- Specify commit at which `build-info` was generated for this deployment --> | ||
|
|
||
| ## Deployment preparation tasks checklist: | ||
|
|
||
| - [ ] Deployments `README` is updated with the new task name and link | ||
| - [ ] Task `README` has a description and links to the artifacts | ||
| - [ ] `build-info` is updated with artifacts compiled at the specified commit | ||
| - [ ] Artifacts are generated from `build-info` | ||
| - [ ] New task has a working fork test <!-- This implies index and input scripts are correct --> | ||
|
|
||
| ## Deprecating old tasks checklist: <!-- Only if applicable --> | ||
|
|
||
| - [ ] Old task was moved to `deprecated/` directory | ||
| - [ ] Deployments `README` is updated: old task is moved to the 'deprecated' section, and links are updated with the `deprecated/` prefix | ||
| - [ ] Old task imports in `index.ts`, `input.ts` and fork tests are updated | ||
| - [ ] Old task `README` is updated with a warning sign, a link to the replacement task and a short description <!-- Explain why it was deprecated --> | ||
|
|
||
| ## Code checklist: | ||
|
|
||
| - [ ] The diff is legible and has no extraneous changes <!-- There shouldn't be any changes to code outside of the deployment task in this PR --> | ||
| - [ ] Complex code has been commented in tests and scripts | ||
| - [ ] Fork test block number and test cases are appropriate for this deployment | ||
| - [ ] The base branch is either `master`, or there's a description of how to merge | ||
|
|
||
| ## Issue Resolution | ||
|
|
||
| <!-- If this PR addresses an issue, note that here: e.g., Closes/Fixes/Resolves #1346. --> |
16 changes: 16 additions & 0 deletions
16
balpy/balancer-deployments/.github/PULL_REQUEST_TEMPLATE/deployment-template.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Deployment: <!-- Deployment title: contract or feature (e.g. `ManagedPool`) --> | ||
|
|
||
| ## Deployment tasks checklist: | ||
|
|
||
| - [ ] Contract(s) deployed to all target networks / testnets | ||
| - [ ] TX IDs are properly generated | ||
| - [ ] Action IDs are generated after deployment (if applicable) <!-- This includes contracts deployed by contracts (e.g. mock pools deployed by factories) --> | ||
| - [ ] Outputs for all target networks are generated, and linked in the task `readme` | ||
| - [ ] Addresses files are up to date with the new deployment <!-- yarn build-address-lookup --> | ||
| - [ ] Contracts are verified in every network <!-- This includes contracts deployed by contracts (e.g. mock pools deployed by factories) --> | ||
| - [ ] Deployments `CHANGELOG` is updated | ||
| - [ ] There are no code changes of any kind | ||
|
|
||
| ## Issue Resolution | ||
|
|
||
| <!-- If this PR addresses an issue, note that here: e.g., Closes/Fixes/Resolves #1346. --> |
16 changes: 16 additions & 0 deletions
16
balpy/balancer-deployments/.github/actions/check-network-action-ids/action.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: 'Check Action IDs' | ||
| inputs: | ||
| network-name: | ||
| required: true | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up environment | ||
| uses: ./.github/actions/setup | ||
| - name: Prepare Config | ||
| run: yarn ci:prepare-config | ||
| shell: bash | ||
| - name: Check Action IDs | ||
| run: yarn check-network-action-ids ${{ inputs.network-name }} | ||
| shell: bash |
16 changes: 16 additions & 0 deletions
16
balpy/balancer-deployments/.github/actions/check-network-deployments/action.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: 'Check Deployment Addresses' | ||
| inputs: | ||
| network-name: | ||
| required: true | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up environment | ||
| uses: ./.github/actions/setup | ||
| - name: Prepare Config | ||
| run: yarn ci:prepare-config | ||
| shell: bash | ||
| - name: Check Deployment Addresses | ||
| run: yarn check-network-deployments ${{ inputs.network-name }} | ||
| shell: bash |
19 changes: 19 additions & 0 deletions
19
balpy/balancer-deployments/.github/actions/setup/action.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Setup | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18.15 | ||
| - name: Cache | ||
| uses: actions/cache@v3 | ||
| id: cache | ||
| with: | ||
| path: '**/node_modules' | ||
| key: yarn-v1-${{ hashFiles('**/yarn.lock') }} | ||
| - name: Install | ||
| run: yarn --immutable | ||
| shell: bash | ||
| if: steps.cache.outputs.cache-hit != 'true' |
31 changes: 31 additions & 0 deletions
31
balpy/balancer-deployments/.github/pull_request_template.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <!-- If this is deployment-related, please go the the Preview tab and select the appropriate sub-template. --> | ||
| <!-- Otherwise, delete everything before #Description --> | ||
|
|
||
| * [Deployment preparation template](?expand=1&template=deployment-preparation-template.md) | ||
| * [Deployment template](?expand=1&template=deployment-template.md) | ||
|
|
||
| # Description | ||
|
|
||
| <!-- Describe the changes introduced in this pull request. --> | ||
| <!-- Include any context necessary for understanding the PR's purpose. --> | ||
|
|
||
| ## Type of change | ||
|
|
||
| - [ ] Bug fix <!-- (non-breaking change which fixes an issue) --> | ||
| - [ ] New feature <!-- (non-breaking change which adds functionality) --> | ||
| - [ ] Breaking change <!-- (would cause existing functionality to not work as expected) --> | ||
| - [ ] Dependency changes | ||
| - [ ] Code refactor / cleanup | ||
| - [ ] Documentation or wording changes | ||
| - [ ] Other | ||
|
|
||
| ## Checklist: | ||
|
|
||
| - [ ] The diff is legible and has no extraneous changes | ||
| - [ ] Complex code has been commented, including external interfaces | ||
| - [ ] Tests are included for all code paths | ||
| - [ ] The base branch is either `master`, or there's a description of how to merge | ||
|
|
||
| ## Issue Resolution | ||
|
|
||
| <!-- If this PR addresses an issue, note that here: e.g., Closes/Fixes/Resolves #1346. --> |
Oops, something went wrong.
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.
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