Skip to content

Commit 93dd258

Browse files
committed
add error codes
1 parent ae6e087 commit 93dd258

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

pages/express-relay/errors.mdx

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
import { Tabs } from "nextra/components";
2+
13
# Error Codes
24

3-
The following table lists the error codes and their explanations for [`ExpressRelay`](https://github.com/pyth-network/per/blob/main/contracts/src/express-relay/ExpressRelay.sol) and [`OpportunityAdapter`](https://github.com/pyth-network/per/blob/main/contracts/src/opportunity-adapter/OpportunityAdapter.sol) contracts.
5+
<Tabs items={['EVM', 'SVM']}>
6+
7+
<Tabs.Tab>
8+
9+
The following table lists the error codes and their explanations for [`ExpressRelay`](https://github.com/pyth-network/per/blob/main/contracts/evm/src/express-relay/ExpressRelay.sol) and [`OpportunityAdapter`](https://github.com/pyth-network/per/blob/main/contracts/evm/src/opportunity-adapter/OpportunityAdapter.sol) contracts.
410
They can be used to identify the cause of a failed transaction or bid.
511

612
## ExpressRelay
@@ -31,3 +37,26 @@ They can be used to identify the cause of a failed transaction or bid.
3137
| `EthOrWethBalanceDecreased()` | `0x1979776d` | The ETH or WETH balance of the contract decreased as a result of the call to targetContract and the bid payment. |
3238
| `TargetContractNotAllowed()` | `0x9c86e59e` | The provided targetContract is not allowed. (e.g. can not call the Permit2 contract). |
3339
| `OnlyOwnerCanCall()` | `0x47a8ea58` | Only the owner of the contract can call this method. |
40+
41+
</Tabs.Tab>
42+
43+
<Tabs.Tab>
44+
45+
The following table lists the error codes and their explanations for the [`ExpressRelay`](https://github.com/pyth-network/per/blob/main/contracts/svm/programs/express_relay) programs.
46+
They can be used to identify the cause of a failed transaction or bid.
47+
48+
## ExpressRelay
49+
50+
| Error | Explanation |
51+
| ----------------------------- | ------------------------------------------------------------------------------------------- |
52+
| `FeeSplitLargerThanPrecision` | The proposed fee split is invalid (split is larger than `FEE_SPLIT_PRECISION`, 10000) |
53+
| `FeesHigherThanBid` | The fees to pay out exceed the value of the bid amount. |
54+
| `DeadlinePassed` | The bid is no longer valid, as the Unix time deadline has passed. |
55+
| `InvalidCPISubmitBid` | The `SubmitBid` instruction should not be called via CPI. |
56+
| `MissingPermission` | The transaction is missing a `SubmitBid` instruction with the matching permission key. |
57+
| `MultiplePermissions` | The transaction should not contain more than one `SubmitBid` instruction. |
58+
| `InsufficientSearcherFunds` | The searcher lacks the funds to pay the specified bid amount. |
59+
| `InsufficientRent` | The fees splits received by different parties must be sufficient to cover the account rent. |
60+
61+
</Tabs.Tab>
62+
</Tabs>

0 commit comments

Comments
 (0)