Skip to content

Commit 5697c6f

Browse files
committed
add AddressTableSvm
1 parent 93dd258 commit 5697c6f

File tree

2 files changed

+60
-8
lines changed

2 files changed

+60
-8
lines changed

components/AddressSvmTable.tsx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { StyledTd } from "./Table";
2+
3+
const AddressSvmTable = ({
4+
entries,
5+
explorer,
6+
}: {
7+
entries: { name: string; value: string }[];
8+
explorer: string;
9+
}) => {
10+
return (
11+
<table>
12+
<tbody>
13+
{entries.map(({ name, value }) => {
14+
const component = (
15+
<code
16+
className={
17+
"nx-border-black nx-border-opacity-[0.04] nx-bg-opacity-[0.03] nx-bg-black nx-break-words nx-rounded-md nx-border nx-py-0.5 nx-px-[.25em] nx-text-[.9em] dark:nx-border-white/10 dark:nx-bg-white/10 "
18+
}
19+
>
20+
{value.startsWith("PK-") ? value.slice(3) : value}
21+
</code>
22+
);
23+
const addLink =
24+
explorer.includes("$ADDRESS") && value.startsWith("PK-");
25+
return (
26+
<tr key={name}>
27+
<StyledTd>{name}</StyledTd>
28+
<StyledTd>
29+
{addLink ? (
30+
<a
31+
href={explorer.replace("$ADDRESS", value.slice(3))}
32+
className={
33+
"nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]"
34+
}
35+
target={"_blank"}
36+
>
37+
{component}
38+
</a>
39+
) : (
40+
component
41+
)}
42+
</StyledTd>
43+
</tr>
44+
);
45+
})}
46+
</tbody>
47+
</table>
48+
);
49+
};
50+
51+
export default AddressSvmTable;

pages/express-relay/contract-addresses.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Tabs } from "nextra/components";
22
import AddressTable from "../../components/AddressTable";
3+
import AddressSvmTable from "../../components/AddressSvmTable";
34

45
Express Relay is currently deployed on the following networks:
56

@@ -151,16 +152,16 @@ Express Relay is currently deployed on the following networks:
151152

152153
**Network Details:**
153154

154-
<AddressTable
155+
<AddressSvmTable
155156
explorer={"https://solscan.io/account/$ADDRESS"}
156157
entries={[
157158
{
158159
name: "Express Relay Program",
159-
value: "PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou",
160+
value: "PK-PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou",
160161
},
161162
{
162163
name: "Limo Limit Order Program",
163-
value: "LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF",
164+
value: "PK-LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF",
164165
},
165166
{
166167
name: "Chain Id",
@@ -172,22 +173,22 @@ Express Relay is currently deployed on the following networks:
172173
},
173174
{
174175
name: "Limo Global Order Config",
175-
value: "TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X",
176+
value: "PK-TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X",
176177
},
177178
{
178179
name: "Testing Frontend",
179-
value: "https://wip-limit-orders.kamino-webapp.pages.dev/limit-order?VITE_LIMIT_ORDERS_REAL_WSOL",
180+
value: "https://limo.kamino-webapp.pages.dev/swap",
180181
}
181182
]}
182183
/>
183184

184185
This list contains the addresses of the commonly used assets present in opportunities on `development-solana`:
185186

186-
<AddressTable
187+
<AddressSvmTable
187188
explorer={"https://solscan.io/account/$ADDRESS"}
188189
entries={[
189-
{ name: "WSOL", value: "So11111111111111111111111111111111111111112" },
190-
{ name: "USDC", value: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" },
190+
{ name: "WSOL", value: "PK-So11111111111111111111111111111111111111112" },
191+
{ name: "USDC", value: "PK-EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" },
191192
]}
192193
/>
193194

0 commit comments

Comments
 (0)