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

Replace oracle key convertor #470

Conversation

ebma
Copy link
Member

@ebma ebma commented May 16, 2024

Introduces a new struct that converts between CurrencyId <> DiaKeys using the metadata in the asset registry. The lookup of DiaKeys -> CurrencyId can be costly because we are potentially iterating over all elements of the StorageMap but since we don't have that many assets in the registry it should be fine.

Closes #469.

@ebma ebma linked an issue May 16, 2024 that may be closed by this pull request
@ebma ebma marked this pull request as ready for review May 16, 2024 15:22
@ebma ebma requested a review from a team May 16, 2024 15:22
@ebma ebma changed the title Replace oracle key convertor for Foucoco Replace oracle key convertor May 16, 2024
Copy link
Contributor

@bogdanS98 bogdanS98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me, only left one question 👍🏼

runtime/common/src/asset_registry.rs Show resolved Hide resolved
@ebma ebma merged commit a09cf02 into main May 16, 2024
3 checks passed
@ebma ebma deleted the 469-use-asset-registry-metadata-for-implementation-of-diaoraclekeyconvertor branch May 16, 2024 16:48
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.

Use asset registry metadata for implementation of DiaOracleKeyConvertor
2 participants