Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 5eac02c

Browse files
committed
address comments
1 parent 4fc3920 commit 5eac02c

File tree

8 files changed

+44
-47
lines changed

8 files changed

+44
-47
lines changed

components/AddressSvmTable.tsx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import copy from "copy-to-clipboard";
2+
import CopyIcon from "./icons/CopyIcon";
13
import { StyledTd } from "./Table";
24

35
const AddressSvmTable = ({
@@ -11,15 +13,6 @@ const AddressSvmTable = ({
1113
<table>
1214
<tbody>
1315
{entries.map(({ name, value, link }) => {
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}
21-
</code>
22-
);
2316
const addLink = explorer.includes("$ADDRESS") && link;
2417
return (
2518
<tr key={name}>
@@ -28,16 +21,26 @@ const AddressSvmTable = ({
2821
{addLink ? (
2922
<a
3023
href={explorer.replace("$ADDRESS", value)}
31-
className={
32-
"nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]"
33-
}
34-
target={"_blank"}
24+
className="nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]"
25+
target="_blank"
26+
rel="noopener noreferrer"
3527
>
36-
{component}
28+
<code className="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">
29+
{value}
30+
</code>
3731
</a>
3832
) : (
39-
component
33+
<code className="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">
34+
{value}
35+
</code>
4036
)}
37+
38+
<button
39+
onClick={() => copy(value)}
40+
className="p-1 hover:bg-light dark:hover:bg-dark rounded"
41+
>
42+
<CopyIcon className="shrink-0" />
43+
</button>
4144
</StyledTd>
4245
</tr>
4346
);

pages/express-relay/contract-addresses.mdx

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

pages/express-relay/contract-addresses/_meta.json

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

pages/express-relay/contract-addresses/svm.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
---
2+
title: SVM
3+
---
4+
15
import { Tabs, Callout } from "nextra/components";
26
import AddressSvmTable from "../../../components/AddressSvmTable";
37

8+
# SVM Contract Addresses
9+
410
Express Relay is currently deployed on the following SVM environments:
511

612
<Tabs items={['Prod (Solana Mainnet-Beta)', 'Testing (Solana Mainnet-Beta)']}>

pages/express-relay/errors.mdx

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

pages/express-relay/errors/_meta.json

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

pages/express-relay/errors/svm.mdx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
---
2+
title: SVM
3+
---
4+
15
# SVM Error Codes
26

37
The following table lists the error codes and their explanations for the [`ExpressRelay`](https://github.com/pyth-network/per/tree/358eedc1f9072cdfc3418fba309697580f2474f9/contracts/svm/programs/express_relay) programs.
48
They can be used to identify the cause of a failed transaction or bid.
59

610
## ExpressRelay
711

8-
| Error | Explanation |
9-
| ----------------------------- | ----------------------------------------------------------------------------------------------- |
10-
| `FeeSplitLargerThanPrecision` | The proposed fee split is invalid (split is larger than `FEE_SPLIT_PRECISION`, 10000) |
11-
| `FeesHigherThanBid` | The fees to pay out exceed the value of the bid amount. |
12-
| `DeadlinePassed` | The bid is no longer valid, as the Unix time deadline has passed. |
13-
| `InvalidCPISubmitBid` | The `SubmitBid` instruction should not be called via CPI. |
14-
| `MissingPermission` | The transaction is missing a `SubmitBid` instruction with the matching permission key. |
15-
| `MultiplePermissions` | The transaction should not contain more than one `SubmitBid` instruction. |
16-
| `InsufficientSearcherFunds` | The searcher lacks the funds to pay the specified amount. |
17-
| `InsufficientRent` | The fees splits received by different parties must be sufficient to cover the account rent. |
18-
| `InvalidReferralFee` | The provided referral fee in the swap instruction data is too high to be a valid number of bps. |
19-
| `InsufficientUserFunds` | The user lacks the funds to pay the specified amount in the swap instruction. |
12+
| Error | Explanation |
13+
| ----------------------------- | -------------------------------------------------------------------------------------------------------- |
14+
| `FeeSplitLargerThanPrecision` | The proposed fee split is invalid (split is larger than `FEE_SPLIT_PRECISION`, 10000) |
15+
| `FeesHigherThanBid` | The fees to pay out exceed the value of the bid amount. |
16+
| `DeadlinePassed` | The bid is no longer valid, as the Unix time deadline has passed. |
17+
| `InvalidCPISubmitBid` | The `SubmitBid` instruction should not be called via CPI. |
18+
| `MissingPermission` | The transaction is missing a `SubmitBid` instruction with the matching permission key. |
19+
| `MultiplePermissions` | The transaction should not contain more than one `SubmitBid` instruction. |
20+
| `InsufficientSearcherFunds` | The searcher lacks the funds to pay the specified amount. |
21+
| `InsufficientRent` | The fee splits received by different parties must be sufficient to cover the account rent. |
22+
| `InvalidReferralFee` | The provided referral fee in the swap instruction data is too high to be a valid number of basis points. |
23+
| `InsufficientUserFunds` | The user lacks the funds to pay the specified amount in the swap instruction. |

pages/express-relay/integrate-as-protocol/swaps.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const quoteRequest = {
4343
const quote = await client.getQuote(quoteRequest);
4444
```
4545

46-
`quote` will contain the full details, including the amount the searcher is quoting and the transaction that the user needs to sign. It will also contain an `expirationTime`; after this time, the transaction will no longer succeed on chain, so you should request a new quote a few seconds before the `expirationTime`.
46+
`quote` contains the full details, including the amount the searcher is quoting and the transaction that the user needs to sign. It also contains an `expirationTime`; after this time, the transaction will no longer succeed on chain, so you should request a new quote a few seconds before the `expirationTime`.
4747

4848
### Submit User Signature to the Express Relay Server
4949

@@ -61,17 +61,17 @@ const submitQuote = {
6161
const txSubmitted = await client.submitQuote(submitQuote);
6262
```
6363

64-
As can be seen, this will return the fully signed transaction that the server submitted to the RPC node to land on chain.
64+
`submitQuote` returns the fully signed transaction that the server submitted to the RPC node.
6565

6666
</Steps>
6767

6868
## Additional Resources
6969

7070
You may find these additional resources helpful for integrating Express Relay as a frontend.
7171

72-
### Contract Address
72+
### Contract Addresses
7373

74-
The [SVM](../contract-addresses/svm.mdx) Contract Addresses pages list the relevant addresses for Express Relay integration.
74+
The [SVM](../contract-addresses/svm.mdx) Contract Addresses page lists the relevant addresses for Express Relay integration.
7575

7676
### Error Codes
7777

0 commit comments

Comments
 (0)