-
Notifications
You must be signed in to change notification settings - Fork 86
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
pallet-collection-data-feed
implementation
#1324
Conversation
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.
Looks good so far. But I need some explanations to understand that properly.
DataId
in our case would be the loans provided value for getting the price, right?CollectionId
in our case would be aPoolId
, right?
libs/traits/src/data.rs
Outdated
} | ||
|
||
/// Abstration to represent a collection of datas in memory | ||
pub trait DataCollection<DataId, Data, Moment> { |
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.
We have the same for interest rate right?
Would it make sense to merge them into a common collection trait?
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.
That would be great, but the parameters differ a little bit, the RateCollection
uses two: interest_rate
and normalized_debt
, and in this case we only need a data_id
. Maybe in a future refactor once #1310 is used instead.
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.
I've simplified the trait to allow in the future mixing DataCollection
for this and interest accrual.
BTW, I'm thinking in removing |
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.
LGTM
Description
This PR adds a new pallet to organize Oracle inputs into collections in order to read them better from consumers as
pallet-loans
.Epic #1279
Changes and Descriptions
pallet-collection-data-feed