Conversation
willemolding
suggested changes
Apr 19, 2021
Contributor
willemolding
left a comment
There was a problem hiding this comment.
I'm having trouble building this locally and also I think there is a cargo fmt error.
New additions look great. Some more test would be good. The feed_creation_should_work is just a smoke test, we should probably at least test calling the get_price implementation. It would also be great to have test for the AssetPricePair methods.
Co-authored-by: Willem Olding <willemolding@gmail.com>
willemolding
approved these changes
Apr 20, 2021
Contributor
willemolding
left a comment
There was a problem hiding this comment.
Looks great! Happy to merge once you have sorted out the dependency issues
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
Blocked by #39 because the substate-v3 chainlink feed depends on a newer substrate rococo revision
FeedOracleAssetPricePairtype to represent a base/quote price pairPirceFeedtrait to fetch asset pairsThe chainlink pallet is abstracted via theFeedOracletrait, the PINT price-feed pallet will be an additional abstraction on top of it. While the design for the price-feed isn't final, I believe we probably will need some storage items, therefor the price-feed will be a pallet instead of an additional trait that is implemented forFeedOracleThe
PriceFeedtrait is the intended abstraction on top the price feed palletNew prices are inserting into the designated feeds via the existing chainlink feed pallet; At this point it is assumed that all feeds, including the PINT price feed will use a common base currency (DOT).
The price feed pallet is configured with aPercisionwhich is applied to all price feeds, since feeds can have differentdecimals, a conversion will be required.Update:
Tests
Issues