Skip to content
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

feat: better per svm docs #536

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: better per svm docs #536

wants to merge 3 commits into from

Conversation

m30m
Copy link
Contributor

@m30m m30m commented Dec 11, 2024

Description

Include more information on how svm bids are validated and the chain update messages received in websocket.

Type of Change

  • New Page
  • Page update/improvement
  • Fix typo/grammar
  • Restructure/reorganize content
  • Update links/references
  • Other (please describe):

Areas Affected

Express Relay Searcher integration

Checklist

  • I ran pre-commit run --all-files to check for linting errors
  • I have reviewed my changes for clarity and accuracy
  • All links are valid and working
  • Images (if any) are properly formatted and include alt text
  • Code examples (if any) are complete and functional
  • Content follows the established style guide
  • Changes are properly formatted in Markdown
  • Preview renders correctly in development environment

Related Issues

Closes #

Additional Notes

Contributor Information

  • Name:
  • Email:

Screenshots

Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 11:04pm
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 11:04pm


```typescript
import { Client, Opportunity } from "@pythnetwork/express-relay-js";

latestChainUpdate: Record<string, SvmChainUpdate> = {}
Copy link
Contributor

@guibescos guibescos Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
latestChainUpdate: Record<string, SvmChainUpdate> = {}
const latestChainUpdate: Record<ChainId, SvmChainUpdate> = {}


<Tabs.Tab>
Pyth provides a Typescript SDK, which allows searchers to subscribe to opportunities:

```typescript
import { Client, Opportunity } from "@pythnetwork/express-relay-js";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

@@ -189,7 +249,7 @@ from solders.transaction import Transaction
from express_relay.models.svm import BidSvm
from express_relay.svm.limo_client import OrderStateAndAddress

DEADLINE = 2**62
DEADLINE = 2 * 10**10
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants