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

Implementation of parsePriceFeedUpdates from ethereum pyth.sol in Pyth's Aptos contract #1709

Closed
wants to merge 7 commits into from

Conversation

holps-7
Copy link

@holps-7 holps-7 commented Jun 17, 2024

Description
This pull request adds the parse_price_feed_updates function in Aptos contracts. This is an implementation of parsePriceFeedUpdates from ethereum's contract pyth.sol.

Changes Made

  • Added a new function parse_price_feed_updates to the Pyth Aptos contract.
  • The function takes the following parameters similar to its ethereum's counterpart:
    • update_data: a vector of vectors containing update data.
    • price_ids: a vector of containing PriceIdentifiers.
    • min_publish_time: the minimum publish time as a u64.
    • max_publish_time: the maximum publish time as a u64.
    • fee: fee provided to transaction
  • The function processes the price feed updates and returns a vector of ParsePriceFeed objects.
  • PasePriceFeed struct is defined as:
struct ParsePriceFeed has copy, drop {
       price_identifier: PriceIdentifier,
       price: u64,
       conf: u64,
       expo: u64,
       publish_time: u64
   }
  • The function parse_price_feed_updates is public and calls an internal function for further execution parse_price_feed_updates_internal
  • This implementation successfully compiles without throwing any errors
    Screenshot 2024-06-18 at 5 03 49 AM

Copy link

vercel bot commented Jun 17, 2024

@holps-7 is attempting to deploy a commit to the pyth-web Team on Vercel.

A member of the Team first needs to authorize it.

@holps-7
Copy link
Author

holps-7 commented Jun 23, 2024

Hey @ali-bahjati can you assign a reviewer to this PR?

@ali-bahjati ali-bahjati requested review from ali-bahjati and m30m June 23, 2024 04:35
@ali-bahjati
Copy link
Collaborator

ali-bahjati commented Aug 6, 2024

We have decided to move forward with #1727

@ali-bahjati ali-bahjati closed this Aug 6, 2024
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