Skip to content

Commit d9456ed

Browse files
committed
Merge branch 'main' into feat/perf-caching
1 parent a3cfcda commit d9456ed

File tree

99 files changed

+10707
-4961
lines changed

Some content is hidden

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

99 files changed

+10707
-4961
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Hermes Client Rust Test Suite"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
paths:
8+
- .github/workflows/ci-hermes-client-rust.yml
9+
- apps/hermes/client/rust/**
10+
11+
jobs:
12+
lazer-rust-test-suite:
13+
name: Hermes Client Rust Test Suite
14+
runs-on: ubuntu-22.04
15+
defaults:
16+
run:
17+
working-directory: apps/hermes/client/rust/
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
submodules: recursive
22+
- uses: actions-rust-lang/setup-rust-toolchain@v1
23+
- name: install taplo
24+
run: cargo install --locked [email protected]
25+
- name: check Cargo.toml formatting
26+
run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \;
27+
- name: Format check
28+
run: cargo fmt --all -- --check
29+
if: success() || failure()
30+
- name: Clippy check
31+
run: cargo clippy -p pyth-hermes-client-rust --all-targets -- --deny warnings
32+
if: success() || failure()
33+
- name: test
34+
run: cargo test -p pyth-hermes-client-rust
35+
if: success() || failure()

.github/workflows/ci-lazer-solana-contract.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,12 @@ jobs:
3636
run_install: true
3737
- name: Install Solana Cli
3838
run: |
39-
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
39+
sh -c "$(curl -sSfL https://release.anza.xyz/v2.1.21/install)"
4040
echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
41-
- name: Set Solana Cli version
42-
run: agave-install init 1.18.26
4341
- name: Create Solana key
4442
run: solana-keygen new --no-bip39-passphrase
4543
- name: Install Anchor
46-
run: |
47-
rustup install 1.79.0
48-
# anchor requires nightly for ABI generation and it's broken for more recent nightly versions
49-
rustup install nightly-2025-04-15
50-
# This anchor version doesn't build with newer Rust
51-
RUSTFLAGS= cargo +1.79.0 install --git https://github.com/coral-xyz/anchor --tag v0.30.1 --locked anchor-cli
44+
run: cargo install --git https://github.com/coral-xyz/anchor --tag v0.31.1 --locked anchor-cli
5245
- name: Run anchor tests
5346
run: pnpm run test:anchor
5447
- name: check Cargo.toml formatting
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Rust package pyth-lazer-client to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- rust-pyth-hermes-client-v*
7+
jobs:
8+
publish-pyth-hermes-client:
9+
name: Publish Rust package pyth-hermes-client-rust to crates.io
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v2
14+
15+
- run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
16+
env:
17+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
18+
working-directory: "apps/hermes/client/rust"

Cargo.lock

Lines changed: 41 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ members = [
66
"apps/fortuna",
77
"apps/pyth-lazer-agent",
88
"apps/quorum",
9+
"apps/hermes/client/rust",
910
"lazer/publisher_sdk/rust",
1011
"lazer/sdk/rust/client",
1112
"lazer/sdk/rust/protocol",

apps/entropy-explorer/NOTES.org

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
* TODO Lock timestamp to when page loaded & add sync button
2+
* TODO Add TODO items in requests.ts
3+
- providerContribution
4+
- gasUsed + randomNumber in errored state
5+
6+
* TODO Connect the wallet to execute the transaction.
7+
* TODO Have a blinking yellow-coloured pending status that can be turned Green using an event listener.
8+
* TODO A dashboard on the home page to display reference material, such as current fees and usage.
9+
* TODO Many people use the Block number to search in explorers as well. We can think about it.
10+
11+
* DONE Removing badges from the sequence number + making it bold
12+
CLOSED: [2025-05-09 Fri 20:06]
13+
* DONE Rename Caller -> From or Sender
14+
CLOSED: [2025-05-09 Fri 20:08]
15+
* DONE Option to filter Callback Status
16+
CLOSED: [2025-05-09 Fri 20:08]
17+
* DONE Reorder Failed Tx Fields.
18+
CLOSED: [2025-05-09 Fri 20:11]
19+
** Request Timestamp
20+
** Callback Timestamp
21+
** Request Tx +Hash+
22+
** From / Sender
23+
** Callback Tx +Hash+
24+
** Provider
25+
** +User Random Number+ User Contribution
26+
** Gas Used
27+
* DONE Put the cast command in the code background with syntax colouring/highlighting.
28+
CLOSED: [2025-05-09 Fri 20:11]
29+
* DONE Decoding [[https://docs.pyth.network/entropy/error-codes][Error codes]].
30+
CLOSED: [2025-05-12 Mon 13:53]
31+
* DONE The timestamp should be shown in the following format ~9 secs ago (May-09-2025 12:47:11 PM +utc:)~
32+
CLOSED: [2025-05-12 Mon 14:30]
33+
* DONE Tooltips
34+
CLOSED: [2025-05-12 Mon 22:37]
35+
** Request Tx
36+
** Callback Tx
37+
** User Random Number / User Contribution
38+
** Provider Random Number / User Contribution
39+
* DONE Show delay/latency (delta between callbackTimestamp and requestTimestamp) somehow
40+
CLOSED: [2025-05-12 Mon 22:45]
41+
* DONE As @Tejas mentioned above, a tooltip button for the code can be used, or it can redirect them [[https://docs.pyth.network/entropy/debug-callback-failures][here]].
42+
CLOSED: [2025-05-12 Mon 22:48]
43+
* DONE Finish paginator
44+
CLOSED: [2025-06-06 Fri 11:10]
45+
* DONE Improve use-search-params
46+
CLOSED: [2025-06-06 Fri 19:55]
47+
* DONE Fix callback error page for unknown callback errors (i.e. when fortuna sends a string that isn't an error code)
48+
CLOSED: [2025-06-06 Fri 20:07]
49+
* DONE Improve not found message, especially for invalid search
50+
CLOSED: [2025-06-10 Tue 12:24]
51+
* DONE Improve ErrorResult handling
52+
CLOSED: [2025-06-10 Tue 12:24]
53+
* DONE Add all chains + icons
54+
CLOSED: [2025-06-10 Tue 16:12]

apps/entropy-explorer/next.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ const config = {
77

88
pageExtensions: ["ts", "tsx", "mdx"],
99

10+
images: {
11+
remotePatterns: [
12+
new URL("https://icons.llamao.fi/icons/chains/*?w=20&h=20"),
13+
new URL("https://www.tabichain.com/images/new2/tabi.svg"),
14+
],
15+
},
16+
1017
logging: {
1118
fetches: {
1219
fullUrl: true,

apps/entropy-explorer/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@
2323
"@phosphor-icons/react": "catalog:",
2424
"@pythnetwork/component-library": "workspace:*",
2525
"clsx": "catalog:",
26-
"connectkit": "catalog:",
2726
"next": "catalog:",
2827
"nuqs": "catalog:",
2928
"react": "catalog:",
3029
"react-aria": "catalog:",
3130
"react-dom": "catalog:",
3231
"react-timeago": "catalog:",
33-
"viem": "catalog:",
34-
"wagmi": "catalog:",
3532
"zod": "catalog:"
3633
},
3734
"devDependencies": {

apps/entropy-explorer/src/components/Address/index.module.scss

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,4 @@
55
flex-flow: row nowrap;
66
gap: theme.spacing(2);
77
font-size: theme.font-size("sm");
8-
9-
.full {
10-
display: none;
11-
}
12-
13-
&:not([data-always-truncate]) {
14-
@include theme.breakpoint("xl") {
15-
.truncated {
16-
display: none;
17-
}
18-
19-
.full {
20-
display: unset;
21-
}
22-
}
23-
}
248
}

apps/entropy-explorer/src/components/Address/index.tsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,36 @@ import { Link } from "@pythnetwork/component-library/Link";
33
import { useMemo } from "react";
44

55
import styles from "./index.module.scss";
6-
import { EntropyDeployments } from "../../entropy-deployments";
6+
import type { EntropyDeployment } from "../../entropy-deployments";
77
import { truncate } from "../../truncate";
88

99
type Props = {
1010
value: string;
11-
chain: keyof typeof EntropyDeployments;
12-
alwaysTruncate?: boolean | undefined;
11+
chain: EntropyDeployment;
12+
isAccount?: boolean | undefined;
1313
};
1414

15-
export const Address = ({ value, chain, alwaysTruncate }: Props) => {
16-
const { explorer } = EntropyDeployments[chain];
15+
export const Account = (props: Omit<Props, "isAccount">) => (
16+
<Address {...props} isAccount />
17+
);
18+
19+
export const Transaction = (props: Omit<Props, "isAccount">) => (
20+
<Address {...props} />
21+
);
22+
23+
const Address = ({ value, chain, isAccount }: Props) => {
24+
const explorerTemplate = isAccount
25+
? chain.explorerAccountTemplate
26+
: chain.explorerTxTemplate;
1727
const truncatedValue = useMemo(() => truncate(value), [value]);
1828
return (
19-
<div
20-
data-always-truncate={alwaysTruncate ? "" : undefined}
21-
className={styles.address}
22-
>
29+
<div className={styles.address}>
2330
<Link
24-
href={explorer.replace("$ADDRESS", value)}
31+
href={explorerTemplate.replace("$ADDRESS", value)}
2532
target="_blank"
2633
rel="noreferrer"
2734
>
28-
<code className={styles.truncated}>{truncatedValue}</code>
29-
<code className={styles.full}>{value}</code>
35+
<code>{truncatedValue}</code>
3036
</Link>
3137
<CopyButton text={value} iconOnly />
3238
</div>

0 commit comments

Comments
 (0)