-
Notifications
You must be signed in to change notification settings - Fork 9
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
Oracle wrapper #49
Oracle wrapper #49
Conversation
public struct OracleRegistry has key, store { | ||
id: UID, | ||
config: OracleRegistryConfig, | ||
oracles: vector<Oracle>, |
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.
Why don't we add the Oracle objects as dynamic fields of the oracle registry?
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.
to save on storage cost? Note that the OracleRegistry is only used as an immutable reference when getting the pyth/switchboard prices, so that's not an issue
extra_fields: Bag | ||
} | ||
|
||
public enum OracleType has store, drop, copy { |
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 think we have to test if we can add enum variants accross contract upgrades? if not we might want to use a u8 flag 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.
it's being worked on currently i believe, let me ask. but also, i don't think we are going to add any more oracle types soon
Co-authored-by: 0xLendlord <0xxgen@solend.fi>
Co-authored-by: 0xLendlord <0xxgen@solend.fi>
Co-authored-by: 0xLendlord <0xxgen@solend.fi>
2857c0b
to
97af36f
Compare
closing this bc the commit history got messy. squased and rebased everything into the oracle_wrapper_final branch |
No description provided.