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

Create SorFactory #3

Open
wants to merge 1 commit into
base: daniel/migrate-abis-from-sor
Choose a base branch
from

Conversation

danielmkm
Copy link

@danielmkm danielmkm commented Dec 27, 2021

This PR builds upon balancer#20, #1 and #2.

The SorFactory takes as input the BalancerSdkSorConfig, and handles constructing a new SOR with the given config.

The SOR now supports two generic interfaces for fetching data externally, the TokenPriceService and SubgraphPoolDataService. For standard usecases, we include CoingeckoTokenPriceService, SubgraphTokenPriceService and SubgraphPoolDataService. Alternatively, the integrator is able to define their own services as long as they implement the applicable service interface.

  • CoingeckoTokenPriceService - Core logic migrated from the SOR, minor refactoring into a service class.
  • SubgraphTokenPriceService - Implemented a subgraph token price service that traverses pricing assets when necessary to find the price of a token in the native asset.
  • SubgraphPoolDataService - Core logic migrated from the SOR, extended for cleaner support of linear/nonlinear and now using subgraph query module.
  • onChainData - Migrated from the SOR with no changes
  • multiCaller - Migrated from the SOR with no changes

- Migrate coingecko token price fetching
- Implement a subgraph token price service
- Migrate subgraph pool fetching
- Migrate on chain balance fetching.
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.

1 participant