Skip to content

Commit f0105d2

Browse files
committed
merge
2 parents 5dca93a + a750ce6 commit f0105d2

File tree

103 files changed

+4037
-2701
lines changed

Some content is hidden

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

103 files changed

+4037
-2701
lines changed

Cargo.lock

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Fortuna is an off-chain service which can be used by [Entropy](https://pyth.netw
4141

4242
Please install the following tools in order to work in this repository:
4343

44-
- [NVM](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) to manage your node version, then run `nvm use 20` to ensure you are using node version 20.
44+
- [NVM](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) to manage your node version, then run `nvm use 22` to ensure you are using node version 22.
4545
- [Foundry](https://book.getfoundry.sh/getting-started/installation) in order to use `forge` for Ethereum contract development
4646
- [Solana CLI](https://solana.com/docs/intro/installation) for working with Solana programs.
4747
- After installing, please run `solana keygen new` to generate a local private key.

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>

apps/entropy-explorer/src/components/Home/chain-select.tsx

Lines changed: 0 additions & 126 deletions
This file was deleted.

apps/entropy-explorer/src/components/Home/chain-select.module.scss renamed to apps/entropy-explorer/src/components/Home/chain-tag.module.scss

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
@use "@pythnetwork/component-library/theme";
22

3-
.searchBar {
4-
display: grid;
5-
grid-template-columns: max-content 1fr;
6-
gap: theme.spacing(2);
7-
width: 100%;
8-
}
9-
10-
.chainSelectItem {
3+
.chainTag {
114
display: grid;
125
grid-template-columns: max-content 1fr;
136
gap: theme.spacing(2);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import clsx from "clsx";
2+
import Image from "next/image";
3+
import type { ComponentProps } from "react";
4+
5+
import styles from "./chain-tag.module.scss";
6+
import type { EntropyDeployment } from "../../entropy-deployments";
7+
8+
export const ChainTag = ({
9+
chain,
10+
className,
11+
...props
12+
}: { chain: EntropyDeployment } & ComponentProps<"div">) => (
13+
<div className={clsx(styles.chainTag, className)} {...props}>
14+
<Image alt="" src={chain.icon} width={20} height={20} />
15+
{chain.name}
16+
</div>
17+
);

0 commit comments

Comments
 (0)