Skip to content

Commit 4bc9b22

Browse files
committed
Merge branch 'main' into feat/dynamic-jito-tips
2 parents 5f5faaa + 225b9d0 commit 4bc9b22

File tree

107 files changed

+3989
-2213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+3989
-2213
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.17.0
1+
v20.18.0

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
nodejs 20.17.0
2-
pnpm 9.12.1
1+
nodejs 20.18.0
2+
pnpm 9.12.3
33
rust 1.78.0
44
python 3.12.4

Dockerfile.node

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20.17.0-slim@sha256:2394e403d45a644e41ac2a15b6f843a7d4a99ad24be48c27982c5fdc61a1ef17 as builder-base
1+
FROM node:20.18.0-slim@sha256:ec35a66c9a0a275b027debde05247c081f8b2f0c43d7399d3a6ad5660cee2f6a as builder-base
22
WORKDIR /usr/src/pyth
33
ENV PNPM_HOME="/pnpm"
44
ENV PATH="$PNPM_HOME:$PATH"
@@ -7,7 +7,7 @@ COPY ./ .
77
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
88

99

10-
FROM node:20.17.0-alpine@sha256:2d07db07a2df6830718ae2a47db6fedce6745f5bcd174c398f2acdda90a11c03 as runner-base
10+
FROM node:20.18.0-alpine3.20@sha256:c13b26e7e602ef2f1074aef304ce6e9b7dd284c419b35d89fcf3cc8e44a8def9 as runner-base
1111
WORKDIR /srv
1212
ENV NODE_ENV production
1313
RUN addgroup --system --gid 1001 pyth && adduser --system --uid 1001 pyth -g pyth && chown pyth:pyth .

apps/hermes/client/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"example": "node lib/examples/HermesClient.js",
2727
"format": "prettier --write \"src/**/*.ts\"",
2828
"test:lint": "eslint src/",
29-
"prepublishOnly": "pnpm run build && pnpm run test:lint",
29+
"prepublishOnly": "pnpm run build:typescript && pnpm run test:lint",
3030
"preversion": "pnpm run test:lint",
3131
"version": "pnpm run format && git add -A src"
3232
},

apps/hermes/server/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/hermes/server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hermes"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
description = "Hermes is an agent that provides Verified Prices from the Pythnet Pyth Oracle."
55
edition = "2021"
66

apps/hermes/server/src/api/types.rs

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,17 +326,71 @@ pub struct PriceFeedMetadata {
326326
}
327327

328328
#[derive(Debug, Serialize, Deserialize, PartialEq, ToSchema)]
329-
#[serde(rename_all = "lowercase")]
329+
#[serde(rename_all = "snake_case")]
330330
pub enum AssetType {
331331
Crypto,
332+
#[serde(rename = "fx")]
332333
FX,
333334
Equity,
334-
Metals,
335+
Metal,
335336
Rates,
337+
CryptoRedemptionRate,
336338
}
337339

338340
impl Display for AssetType {
339341
fn fmt(&self, f: &mut Formatter) -> FmtResult {
340-
write!(f, "{:?}", self)
342+
match self {
343+
AssetType::Crypto => write!(f, "crypto"),
344+
AssetType::FX => write!(f, "fx"),
345+
AssetType::Equity => write!(f, "equity"),
346+
AssetType::Metal => write!(f, "metal"),
347+
AssetType::Rates => write!(f, "rates"),
348+
AssetType::CryptoRedemptionRate => write!(f, "crypto_redemption_rate"),
349+
}
350+
}
351+
}
352+
353+
#[cfg(test)]
354+
mod tests {
355+
use super::*;
356+
357+
#[test]
358+
fn test_serialize_matches_display() {
359+
assert_eq!(
360+
AssetType::Crypto.to_string(),
361+
serde_json::to_string(&AssetType::Crypto)
362+
.unwrap()
363+
.trim_matches('"')
364+
);
365+
assert_eq!(
366+
AssetType::FX.to_string(),
367+
serde_json::to_string(&AssetType::FX)
368+
.unwrap()
369+
.trim_matches('"')
370+
);
371+
assert_eq!(
372+
AssetType::Equity.to_string(),
373+
serde_json::to_string(&AssetType::Equity)
374+
.unwrap()
375+
.trim_matches('"')
376+
);
377+
assert_eq!(
378+
AssetType::Metal.to_string(),
379+
serde_json::to_string(&AssetType::Metal)
380+
.unwrap()
381+
.trim_matches('"')
382+
);
383+
assert_eq!(
384+
AssetType::Rates.to_string(),
385+
serde_json::to_string(&AssetType::Rates)
386+
.unwrap()
387+
.trim_matches('"')
388+
);
389+
assert_eq!(
390+
AssetType::CryptoRedemptionRate.to_string(),
391+
serde_json::to_string(&AssetType::CryptoRedemptionRate)
392+
.unwrap()
393+
.trim_matches('"')
394+
);
341395
}
342396
}

apps/hermes/server/src/state/price_feeds_metadata.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ where
8383
if let Some(asset_type) = &asset_type {
8484
price_feeds_metadata.retain(|feed| {
8585
feed.attributes.get("asset_type").map_or(false, |type_str| {
86-
type_str.to_lowercase() == asset_type.to_string().to_lowercase()
86+
type_str.to_lowercase().trim().replace(" ", "_")
87+
== asset_type.to_string().to_lowercase()
8788
})
8889
});
8990
}

apps/insights/package.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,35 @@
1010
"build": "next build",
1111
"fix:format": "prettier --write .",
1212
"fix:lint": "eslint --fix .",
13+
"pull:env": "[ $CI ] || VERCEL_ORG_ID=team_BKQrg3JJFLxZyTqpuYtIY0rj VERCEL_PROJECT_ID=prj_TBkf9EyQjQF37gs4Vk0sQKJj97kE vercel env pull",
1314
"start:dev": "next dev --port 3003",
1415
"start:prod": "next start --port 3003",
1516
"test:format": "prettier --check .",
1617
"test:lint": "jest --selectProjects lint",
1718
"test:types": "tsc"
1819
},
1920
"dependencies": {
21+
"@clickhouse/client": "catalog:",
22+
"@phosphor-icons/react": "catalog:",
2023
"@pythnetwork/app-logger": "workspace:*",
24+
"@pythnetwork/client": "catalog:",
2125
"@pythnetwork/component-library": "workspace:*",
2226
"@pythnetwork/fonts": "workspace:*",
27+
"@pythnetwork/known-publishers": "workspace:*",
2328
"@pythnetwork/next-root": "workspace:*",
29+
"@react-hookz/web": "catalog:",
30+
"@solana/web3.js": "catalog:",
2431
"clsx": "catalog:",
32+
"cryptocurrency-icons": "catalog:",
33+
"framer-motion": "catalog:",
2534
"next": "catalog:",
35+
"next-themes": "catalog:",
36+
"nuqs": "catalog:",
2637
"react": "catalog:",
27-
"react-dom": "catalog:"
38+
"react-aria": "catalog:",
39+
"react-aria-components": "catalog:",
40+
"react-dom": "catalog:",
41+
"zod": "catalog:"
2842
},
2943
"devDependencies": {
3044
"@cprussin/eslint-config": "catalog:",

apps/insights/src/app/loading.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Loading as default } from "../components/Loading";

0 commit comments

Comments
 (0)