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

Oracle wrapper #49

Closed
wants to merge 14 commits into from
Closed

Oracle wrapper #49

wants to merge 14 commits into from

Conversation

0xripleys
Copy link
Contributor

No description provided.

public struct OracleRegistry has key, store {
id: UID,
config: OracleRegistryConfig,
oracles: vector<Oracle>,
Copy link
Contributor

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?

Copy link
Contributor Author

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 {
Copy link
Contributor

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

Copy link
Contributor Author

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

@0xripleys
Copy link
Contributor Author

closing this bc the commit history got messy. squased and rebased everything into the oracle_wrapper_final branch

@0xripleys 0xripleys closed this Mar 6, 2025
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.

2 participants