Skip to content

[hermes] add /v2/updates/price/<timestamp> endpoint #1269

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

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

cctdaniel
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) Visit Preview Feb 2, 2024 8:38am
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 2, 2024 8:38am

@@ -27,7 +27,7 @@ use {
mod doc_examples;
mod metrics_middleware;
mod rest;
mod types;
pub mod types;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

reusing PriceUpdate in types for state/benchmarks.rs

serde_qs::axum::QsQuery,
utoipa::IntoParams,
};


#[derive(Debug, serde::Deserialize, IntoParams)]
#[derive(Debug, Deserialize, IntoParams)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

drive-by: refactor

@@ -56,22 +55,50 @@ impl TryFrom<BinaryBlob> for Vec<Vec<u8>> {
}
}

impl TryFrom<BenchmarkUpdates> for PriceFeedsWithUpdateData {

impl TryFrom<PriceUpdate> for PriceFeedsWithUpdateData {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this definition should be close to PriceUpdate.

nit: I do have a mixed feeling of having them all in the api module. we could entirely remove PriceFeedsWithUpdateData it it was not necessary for v1 api. Maybe let's move it after we deprecate v1 api.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm should we move it to types.rs instead then?

Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

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

Nice! Please address my comments before merging.

Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

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

Nice! Please address my comments before merging.

@cctdaniel cctdaniel merged commit 2d1324e into main Feb 2, 2024
@cctdaniel cctdaniel deleted the hermes-v2-price-updates-timestamp branch February 2, 2024 08:46
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