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

V3 canary #586

Merged
merged 17 commits into from
Dec 14, 2023
Merged

V3 canary #586

merged 17 commits into from
Dec 14, 2023

Conversation

franzns
Copy link
Contributor

@franzns franzns commented Dec 14, 2023

  • SOR v2
  • sorting user balances
  • getLogs refactor
  • datastudio for balancer

johngrantuk and others added 17 commits December 8, 2023 12:35
* Basic addition of b-sdk.

* Uses pools from Prisma db.

* Add TradeResults Prisma for recording results.

* Update SOR service to have placeholders for compare, etc.

* Add placeholder for SORV1 service call to make more obvious.

* Move SOR_QUERIES in to temp file as only used there and can potentially remove.

* Update Phantom/Composable pool comments.

* Add pool ids to ignore in to network config.

* WIP SORv1 API query.

* Use cache for pools.

* Query API (Currently Balancers) for SORV1.

* Add basic compare, WIP.

* Remove Prisma trade result in favour of cloudwatch implementation.

* Find best and log result via cloudwatch.

* Change response to be in API format. Use generated types.

* Remove temp.

* Implement mapResultToCowSwap.

* Compare correctly for ExactOut.

* Use cloneDeep for b-sdk as it mutates pools.

* Remove TODO on swapOptions as I believe we dont need it.

* Remove old gql.

* Refactor to common Swap result interface.

* Update SDK package.

* Implement onchain query method for V2 service.

* Implement onchain query method for V1 service.

* Handle empty responses.

* Return correct empty response.

* Use prisma pool version.

* Handle invalid swap case correctly.

* Filtering out Linear pools with 0 price rate which causes issues on b-sdk.

* Update logs with chainId. Fix prettier.

* Initial restructure for Balancer/Beets separation.

* Split resolvers.

* Add getBeetsSwapResponse type.

* Add reusable formatResponse function.

* Add mapResultToBeetsSwap - still need to add routes.

* Add sorV1Beets service and hook up to resolver.

* Best swap for beets endpoint. Zero response.

* Map Routes for SingleSwap.

* Route mapping.

* Route mapping for batchSwap with paths > 1.

* Wider catch in V2 service. (Catches b-sdk/Fantom issue so response is still returned).

* Remove balancerQueryTest query.

* Remove union type in sorGetSwaps query.

* fix schema exclusion

* Return marketSp of 0 for beets.

* Revert commented out section in codegen.yml.

* exclude all in protocol specific folder

* Revert "exclude all in protocol specific folder"

This reverts commit ae35e83.

* Change to use 2 different query types for Beets/Cow swaps. Add missing config to new networks.

* fix: Filter out Linear pools. Filter out pools from vulnerability/mitigation.

* chore: Remove unneccesary Migration folders.

* chore: Update sdk to 0.1.1 and add missing RawPool fields.

* feat: Add poolGetGyroPools query.

* chore: Add new Gyro fields for SOR calcs.

* chore: More Gyro fields for SOR.

* feat: Add Gyro pools for sorV2 service.

* bump typescript version

* formatting and output

* adding cloudwatch metrics

* logging

* chore: Bump b-sdk.

* chore: Add Gyro3 to mapRawPoolType.

* fix: Handle amount scaling correctly across various services by using TokenAmounts.

* chore: Remove debug statements.

* fix: For Balancer resolver use raw scale for swapAmount.

* chain aware SOR queries

* gyro pool data updates

* excluding unsupported pools

* sor metrics

* sor bench logging

* last review and styling

* updating b-sdk

* prettier

* V2 options

* node18 in github action

* sor args cleaup

* less profiling

---------

Co-authored-by: franz <franzns11@gmail.com>
Co-authored-by: gmbronco <83549293+gmbronco@users.noreply.github.com>
* metrics by ENV

* default maxNonBoostedPathDepth

* GqlGraphTraversalConfigInput docs
* update node types to 18

* isolated sync-wallet-balances

* fetching logs by array of addresses

* remove service binding, add output

---------

Co-authored-by: franz <franzns11@gmail.com>
* SDK update

* remove SORv2 config option
@franzns franzns merged commit 5a59083 into v3-main Dec 14, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants