-
Notifications
You must be signed in to change notification settings - Fork 38
feat: better per svm docs #536
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| ```typescript | ||
| import { Client, Opportunity } from "@pythnetwork/express-relay-js"; | ||
|
|
||
| latestChainUpdate: Record<string, SvmChainUpdate> = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| latestChainUpdate: Record<string, SvmChainUpdate> = {} | |
| const latestChainUpdate: Record<ChainId, SvmChainUpdate> = {} |
| Pyth provides a Typescript SDK, which allows searchers to subscribe to opportunities: | ||
|
|
||
| ```typescript | ||
| import { Client, Opportunity } from "@pythnetwork/express-relay-js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { Client, Opportunity } from "@pythnetwork/express-relay-js"; | |
| import { ChainId, Client, Opportunity } from "@pythnetwork/express-relay-js"; |
| get back \$1000. | ||
| </Callout> | ||
|
|
||
| The auction server also broadcast chain specific information that are necessary for building the transaction: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The auction server also broadcast chain specific information that are necessary for building the transaction: | |
| The auction server also broadcasts chain specific information that is necessary for building the transaction: |
| from express_relay.svm.limo_client import OrderStateAndAddress | ||
| DEADLINE = 2**62 | ||
| DEADLINE = 2 * 10**10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
| - It should contain an instruction to set the [transaction priority fee](https://solana.com/developers/guides/advanced/how-to-use-priority-fees#what-are-priority-fees). The priority fee should be at least as large the amount | ||
| advertised via websocket. | ||
| - It should contain valid signatures for all signers except the relayer | ||
| - It should pass simulation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - It should pass simulation | |
| - It should pass simulation. |
| - The deadline specified in the `SubmitBid` instruction should be at least 5 seconds in the future. | ||
| - It should contain an instruction to set the [transaction priority fee](https://solana.com/developers/guides/advanced/how-to-use-priority-fees#what-are-priority-fees). The priority fee should be at least as large the amount | ||
| advertised via websocket. | ||
| - It should contain valid signatures for all signers except the relayer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - It should contain valid signatures for all signers except the relayer | |
| - It should contain valid signatures for all signers except the relayer. |
|
|
||
| </Tabs> | ||
|
|
||
| The schema for the opportunity is similar to what’s returned in the [HTTP requests](https://pyth-express-relay-mainnet.asymmetric.re/docs#tag/opportunity/operation/get_opportunities) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The schema for the opportunity is similar to what’s returned in the [HTTP requests](https://pyth-express-relay-mainnet.asymmetric.re/docs#tag/opportunity/operation/get_opportunities) | |
| The schema for the opportunity is similar to what’s returned in the [HTTP requests](https://pyth-express-relay-mainnet.asymmetric.re/docs#tag/opportunity/operation/get_opportunities). |
Description
Include more information on how svm bids are validated and the chain update messages received in websocket.
Type of Change
Areas Affected
Express Relay Searcher integration
Checklist
pre-commit run --all-filesto check for linting errorsRelated Issues
Closes #
Additional Notes
Contributor Information
Screenshots