-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Minimal External API Fetcher (#2383)
## What ❔ For chains running with a custom base token, use live prices in creating ETH<->BaseToken conversion ratios. This PR - adds a first `PriceAPIClientResource` with a `PriceAPIClient` CoinGecko client. - Uses this client in the `BaseTokenRatioPersister` to fetch new prices and create new ratios Not included in this PR and will be follow-up work: - Redundancy in the number of external price feeds used - Different "strategies" for how true price converged from multiple price feeds ## Why ❔ For the base token flow, we need to be be able to fetch live prices of BaseToken & ETH from which to create the conversion ratios. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. --------- Co-authored-by: dimazhornyk <[email protected]> Co-authored-by: Igor Aleksanov <[email protected]>
- Loading branch information
1 parent
5886b8d
commit 9f255c0
Showing
41 changed files
with
775 additions
and
91 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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
Oops, something went wrong.