-
Notifications
You must be signed in to change notification settings - Fork 35
add svm docs #481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
add svm docs #481
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e101e49
add svm docs
anihamde d67226f
fix precommit issues
anihamde 8cb4e42
testing
anihamde 9019b15
done test
anihamde ae6e087
ugh precommit
anihamde 93dd258
add error codes
anihamde 5697c6f
add AddressTableSvm
anihamde a2cc5b0
address comments
anihamde f042dbb
address comments
anihamde 6fba91c
push update
anihamde a4cef11
address comments
anihamde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { StyledTd } from "./Table"; | ||
|
||
const AddressSvmTable = ({ | ||
entries, | ||
explorer, | ||
}: { | ||
entries: { name: string; value: string; link?: boolean }[]; | ||
explorer: string; | ||
}) => { | ||
return ( | ||
<table> | ||
<tbody> | ||
{entries.map(({ name, value, link }) => { | ||
const component = ( | ||
<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 " | ||
} | ||
> | ||
{value} | ||
</code> | ||
); | ||
const addLink = explorer.includes("$ADDRESS") && link; | ||
return ( | ||
<tr key={name}> | ||
<StyledTd>{name}</StyledTd> | ||
<StyledTd> | ||
{addLink ? ( | ||
<a | ||
href={explorer.replace("$ADDRESS", value)} | ||
className={ | ||
"nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]" | ||
} | ||
target={"_blank"} | ||
> | ||
{component} | ||
</a> | ||
) : ( | ||
component | ||
)} | ||
</StyledTd> | ||
</tr> | ||
); | ||
})} | ||
</tbody> | ||
</table> | ||
); | ||
}; | ||
|
||
export default AddressSvmTable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"evm": "EVM", | ||
"svm": "SVM" | ||
} |
4 changes: 2 additions & 2 deletions
4
pages/express-relay/contract-addresses.mdx → .../express-relay/contract-addresses/evm.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { Tabs } from "nextra/components"; | ||
import AddressSvmTable from "../../../components/AddressSvmTable"; | ||
|
||
Express Relay is currently deployed on the following SVM networks: | ||
|
||
<Tabs items={['Testing']}> | ||
|
||
<Tabs.Tab> | ||
Auction Server endpoint: https://per-staging.dourolabs.app/ | ||
|
||
### Solana | ||
|
||
**Network Details:** | ||
|
||
<AddressSvmTable | ||
explorer={"https://solscan.io/account/$ADDRESS"} | ||
entries={[ | ||
{ | ||
name: "Express Relay Program", | ||
value: "PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou", | ||
link: true, | ||
}, | ||
{ | ||
name: "Limo Limit Order Program", | ||
value: "LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF", | ||
link: true, | ||
}, | ||
{ | ||
name: "Chain Id", | ||
value: "development-solana", | ||
link: false, | ||
}, | ||
{ | ||
name: "Public RPC", | ||
value: "https://api.mainnet-beta.solana.com", | ||
link: false, | ||
}, | ||
{ | ||
name: "Limo Global Order Config", | ||
value: "TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X", | ||
link: true, | ||
}, | ||
{ | ||
name: "Testing Frontend", | ||
value: "https://limo.kamino-webapp.pages.dev/swap", | ||
link: false, | ||
}, | ||
]} | ||
/> | ||
|
||
This list contains the addresses of the commonly used assets present in opportunities on `development-solana`: | ||
|
||
<AddressSvmTable | ||
explorer={"https://solscan.io/account/$ADDRESS"} | ||
entries={[ | ||
{ | ||
name: "WSOL", | ||
value: "So11111111111111111111111111111111111111112", | ||
link: true, | ||
}, | ||
{ | ||
name: "USDC", | ||
value: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", | ||
link: true, | ||
}, | ||
]} | ||
/> | ||
|
||
</Tabs.Tab> | ||
</Tabs> |
anihamde marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"evm": "EVM", | ||
"svm": "SVM" | ||
} |
4 changes: 2 additions & 2 deletions
4
pages/express-relay/errors.mdx → pages/express-relay/errors/evm.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# SVM Error Codes | ||
|
||
The following table lists the error codes and their explanations for the [`ExpressRelay`](https://github.com/pyth-network/per/tree/fccac65b00cff1cfe5c278b333a582fe66bda0f8/contracts/svm/programs/express_relay) programs. | ||
They can be used to identify the cause of a failed transaction or bid. | ||
|
||
## ExpressRelay | ||
|
||
| Error | Explanation | | ||
| ----------------------------- | ------------------------------------------------------------------------------------------- | | ||
| `FeeSplitLargerThanPrecision` | The proposed fee split is invalid (split is larger than `FEE_SPLIT_PRECISION`, 10000) | | ||
| `FeesHigherThanBid` | The fees to pay out exceed the value of the bid amount. | | ||
| `DeadlinePassed` | The bid is no longer valid, as the Unix time deadline has passed. | | ||
| `InvalidCPISubmitBid` | The `SubmitBid` instruction should not be called via CPI. | | ||
| `MissingPermission` | The transaction is missing a `SubmitBid` instruction with the matching permission key. | | ||
| `MultiplePermissions` | The transaction should not contain more than one `SubmitBid` instruction. | | ||
| `InsufficientSearcherFunds` | The searcher lacks the funds to pay the specified bid amount. | | ||
| `InsufficientRent` | The fees splits received by different parties must be sufficient to cover the account rent. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.