Skip to content

Commit da21bea

Browse files
committed
formating fix and use copy address directly
1 parent 7e3bf8b commit da21bea

File tree

11 files changed

+69
-70
lines changed

11 files changed

+69
-70
lines changed

apps/developer-hub/content/docs/express-relay/contract-addresses.mdx

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@ description: >-
44
Express Relay is currently deployed on the following SVM environments:
55
---
66

7+
import CopyAddress from "../../../src/components/CopyAddress";
78

89
<Tabs items={['Production', 'Testing']}>
910
<Tab value="production">
1011

1112
**Auction Server endpoint:** <CopyAddress address="https://per-mainnet.dourolabs.app/" />
1213

1314
**Network Details (Solana Mainnet-Beta):**
14-
| Name | Address/Value |
15+
| Name | Address/Value |
1516
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
16-
| Express Relay Program | <CopyAddress address="PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" url="https://solscan.io/account/PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" /> |
17-
| Limo Limit Order Program | <CopyAddress address="LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" url="https://solscan.io/account/LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" /> |
18-
| Chain Id | <CopyAddress address="solana" /> |
19-
| Public RPC | <CopyAddress address="https://api.mainnet-beta.solana.com" /> |
20-
| Limo Global Order Config | <CopyAddress address="prod7Mog8r56sn5dPwze8nVdf94veEawdxNNqd5v7A1" url="https://solscan.io/account/prod7Mog8r56sn5dPwze8nVdf94veEawdxNNqd5v7A1" /> |
21-
| Frontend | <CopyAddress address="https://swap.kamino.finance" url="https://swap.kamino.finance" /> |
17+
| Express Relay Program | <CopyAddress address="PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" url="https://solscan.io/account/PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" /> |
18+
| Limo Limit Order Program | <CopyAddress address="LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" url="https://solscan.io/account/LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" /> |
19+
| Chain Id | <CopyAddress address="solana" /> |
20+
| Public RPC | <CopyAddress address="https://api.mainnet-beta.solana.com" /> |
21+
| Limo Global Order Config | <CopyAddress address="prod7Mog8r56sn5dPwze8nVdf94veEawdxNNqd5v7A1" url="https://solscan.io/account/prod7Mog8r56sn5dPwze8nVdf94veEawdxNNqd5v7A1" /> |
22+
| Frontend | <CopyAddress address="https://swap.kamino.finance" url="https://swap.kamino.finance" /> |
2223

2324
</Tab>
2425
<Tab value="testing">
@@ -29,22 +30,22 @@ description: >-
2930
**Auction Server endpoint:** <CopyAddress address="https://per-staging.dourolabs.app/" />
3031

3132
**Network Details (Solana Mainnet-Beta):**
32-
| Name | Address/Value |
33+
| Name | Address/Value |
3334
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
34-
| Express Relay Program (Swaps) | <CopyAddress address="stag1NN9voD7436oFvKmy1kvRZYLLW8drKocSCt2W79" url="https://solscan.io/account/stag1NN9voD7436oFvKmy1kvRZYLLW8drKocSCt2W79" /> |
35-
| Express Relay Program (Limit Orders) | <CopyAddress address="PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" url="https://solscan.io/account/PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" /> |
36-
| Limo Limit Order Program | <CopyAddress address="LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" url="https://solscan.io/account/LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" /> |
37-
| Chain Id | <CopyAddress address="development-solana" /> |
38-
| Public RPC | <CopyAddress address="https://api.mainnet-beta.solana.com" /> |
39-
| Limo Global Order Config | <CopyAddress address="TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X" url="https://solscan.io/account/TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X" /> |
40-
| Testing Frontend | <CopyAddress address="https://limo.kamino-webapp.pages.dev/swap" url="https://limo.kamino-webapp.pages.dev/swap" /> |
35+
| Express Relay Program (Swaps) | <CopyAddress address="stag1NN9voD7436oFvKmy1kvRZYLLW8drKocSCt2W79" url="https://solscan.io/account/stag1NN9voD7436oFvKmy1kvRZYLLW8drKocSCt2W79" /> |
36+
| Express Relay Program (Limit Orders) | <CopyAddress address="PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" url="https://solscan.io/account/PytERJFhAKuNNuaiXkApLfWzwNwSNDACpigT3LwQfou" /> |
37+
| Limo Limit Order Program | <CopyAddress address="LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" url="https://solscan.io/account/LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF" /> |
38+
| Chain Id | <CopyAddress address="development-solana" /> |
39+
| Public RPC | <CopyAddress address="https://api.mainnet-beta.solana.com" /> |
40+
| Limo Global Order Config | <CopyAddress address="TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X" url="https://solscan.io/account/TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X" /> |
41+
| Testing Frontend | <CopyAddress address="https://limo.kamino-webapp.pages.dev/swap" url="https://limo.kamino-webapp.pages.dev/swap" /> |
4142

4243
### This list contains the addresses of the commonly used assets present in opportunities on development-solana:
4344

44-
| Asset | Address |
45-
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
46-
| WSOL | <CopyAddress address="So11111111111111111111111111111111111111112" url="https://solscan.io/account/So11111111111111111111111111111111111111112" /> |
47-
| USDC | <CopyAddress address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" url="https://solscan.io/account/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" /> |
45+
| Asset | Address |
46+
| ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
47+
| WSOL | <CopyAddress address="So11111111111111111111111111111111111111112" url="https://solscan.io/account/So11111111111111111111111111111111111111112" /> |
48+
| USDC | <CopyAddress address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" url="https://solscan.io/account/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" /> |
4849

4950
</Tab>
5051
</Tabs>

apps/developer-hub/content/docs/express-relay/errors.mdx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ The following table lists the error codes and their explanations for the Express
88

99
## ExpressRelay
1010

11-
| Error Code | Name | Description |
12-
|------------|------|-------------|
13-
| 6000 | `InvalidPermissionPda` | The permission PDA is invalid |
14-
| 6001 | `InvalidPermissionKeypair` | The permission keypair is invalid |
15-
| 6002 | `InvalidRouter` | The router is invalid |
16-
| 6003 | `DeadlineExceeded` | The bid deadline has been exceeded |
17-
| 6004 | `InsufficientFee` | The fee is insufficient |
18-
| 6005 | `InvalidChainId` | The chain ID is invalid |
19-
| 6006 | `InvalidFeeReceiver` | The fee receiver is invalid |
20-
| 6007 | `InvalidFeePayer` | The fee payer is invalid |
21-
| 6008 | `InvalidRelayerSigner` | The relayer signer is invalid |
22-
| 6009 | `RouterExecutionFailed` | Router execution failed |
23-
| 6010 | `BidAmountTooLow` | The bid amount is too low |
24-
| 6011 | `InvalidBidAmount` | The bid amount is invalid |
25-
| 6012 | `PermissionAccountNotWritable` | The permission account is not writable |
26-
| 6013 | `InvalidDestination` | The destination is invalid |
27-
| 6014 | `InvalidMetadata` | The metadata is invalid |
28-
| 6015 | `InvalidConfigPda` | The config PDA is invalid |
29-
| 6016 | `InvalidAdmin` | The admin is invalid |
30-
| 6017 | `FeeSplitOutOfRange` | The fee split is out of range |
31-
| 6018 | `MaxBidAmountLessThanMinBidAmount` | The maximum bid amount is less than the minimum bid amount |
11+
| Error Code | Name | Description |
12+
| ---------- | ---------------------------------- | ---------------------------------------------------------- |
13+
| 6000 | `InvalidPermissionPda` | The permission PDA is invalid |
14+
| 6001 | `InvalidPermissionKeypair` | The permission keypair is invalid |
15+
| 6002 | `InvalidRouter` | The router is invalid |
16+
| 6003 | `DeadlineExceeded` | The bid deadline has been exceeded |
17+
| 6004 | `InsufficientFee` | The fee is insufficient |
18+
| 6005 | `InvalidChainId` | The chain ID is invalid |
19+
| 6006 | `InvalidFeeReceiver` | The fee receiver is invalid |
20+
| 6007 | `InvalidFeePayer` | The fee payer is invalid |
21+
| 6008 | `InvalidRelayerSigner` | The relayer signer is invalid |
22+
| 6009 | `RouterExecutionFailed` | Router execution failed |
23+
| 6010 | `BidAmountTooLow` | The bid amount is too low |
24+
| 6011 | `InvalidBidAmount` | The bid amount is invalid |
25+
| 6012 | `PermissionAccountNotWritable` | The permission account is not writable |
26+
| 6013 | `InvalidDestination` | The destination is invalid |
27+
| 6014 | `InvalidMetadata` | The metadata is invalid |
28+
| 6015 | `InvalidConfigPda` | The config PDA is invalid |
29+
| 6016 | `InvalidAdmin` | The admin is invalid |
30+
| 6017 | `FeeSplitOutOfRange` | The fee split is out of range |
31+
| 6018 | `MaxBidAmountLessThanMinBidAmount` | The maximum bid amount is less than the minimum bid amount |

apps/developer-hub/content/docs/express-relay/how-express-relay-works/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "How Express Relay Works"
33
description: >-
44
Understand how Express Relay eliminates MEV through off-chain auctions and priority mechanisms for protocol operations.
55
---
6+
67
Express Relay allows protocols to eliminate [Maximal Extractable Value](https://www.ledger.com/academy/glossary/maximal-extractable-value-mev) (MEV).
78
Many protocols generate MEV on a regular basis.
89
For example, borrow-lending protocols provide bonuses to searchers for liquidating undercollateralized loans.

apps/developer-hub/content/docs/express-relay/how-express-relay-works/opportunities.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Opportunities"
33
description: >-
44
Understand what opportunities are in Express Relay, how they work, and how the Opportunity Adapter unifies different protocols.
55
---
6+
67
# Opportunities
78

89
In the context of Express Relay, an opportunity refers to a potential transaction that a searcher can execute on a protocol. Typically, the term "opportunity" is used for such transactions that are lucrative and therefore competed for by many searchers.

apps/developer-hub/content/docs/express-relay/how-express-relay-works/permissioning.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Permissioning"
33
description: >-
44
Learn how Express Relay uses permission IDs and keys to manage access control and distinguish between different opportunities.
55
---
6+
67
`permissionId` is a `bytes` object that represents the unique identifier of a position within the protocol. `permissionId` allows the system to distinguish between bids competing on different opportunities and thereby run more scoped and efficient auctions.
78

89
Each borrower has a unique position for some protocols, so the borrower address uniquely identifies a position.

apps/developer-hub/content/docs/express-relay/http-api-reference.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ description: >-
88

99
The complete HTTP API reference is available as an interactive Swagger/OpenAPI documentation:
1010

11-
1211
**Production (Mainnet):**
1312
[https://per-mainnet.dourolabs.app/docs](https://per-mainnet.dourolabs.app/docs)
1413

@@ -21,4 +20,3 @@ Use the appropriate base URL for your environment:
2120

2221
- **Production (Mainnet):** https://per-mainnet.dourolabs.app
2322
- **Staging (Testing):** https://per-staging.dourolabs.app
24-

apps/developer-hub/content/docs/express-relay/integrate-as-protocol.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const quoteRequest = {
4242
const quote = await client.getQuote(quoteRequest);
4343
```
4444

45-
*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*.
45+
_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_.
4646

4747
## Step 3: Submit User Signature to the Express Relay Server
4848

apps/developer-hub/content/docs/express-relay/integrate-as-searcher/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ description: >-
77
import { IntegrationCard } from "../../../../src/components/IntegrationCard";
88
import { Code } from "@phosphor-icons/react/dist/ssr";
99

10-
1110
## Integration Methods
1211

1312
Express Relay provides multiple ways for searchers to integrate:
@@ -58,4 +57,4 @@ If your bid wins the auction, execute the opportunity by:
5857
description="Complete guide for integrating Express Relay on Solana Virtual Machine chains with code examples and best practices"
5958
icon={<Code size={16} />}
6059
/>
61-
</div>
60+
</div>

apps/developer-hub/content/docs/express-relay/integrate-as-searcher/svm.mdx

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ Below is an excerpt of example code. See the full example in the [Typescript SDK
165165
```typescript
166166
import { OpportunitySvm } from "../index";
167167
import { BidSvm } from "../types";
168-
168+
169169
import * as anchor from "@coral-xyz/anchor";
170170
import * as limo from "@kamino-finance/limo-sdk";
171-
171+
172172
/**
173173
* Generates a bid for a given opportunity.
174174
* The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order.
@@ -181,7 +181,7 @@ async generateBid(opportunity: OpportunitySvm): Promise<BidSvm> {
181181
this.connectionSvm,
182182
order.state.globalConfig
183183
);
184-
184+
185185
const ixsTakeOrder = await this.generateTakeOrderIxs(limoClient, order);
186186
const feeInstruction = ComputeBudgetProgram.setComputeUnitPrice({
187187
microLamports:
@@ -191,9 +191,9 @@ async generateBid(opportunity: OpportunitySvm): Promise<BidSvm> {
191191
feeInstruction,
192192
...ixsTakeOrder
193193
);
194-
194+
195195
const bidAmount = await this.getBidAmount(order);
196-
196+
197197
const config = await this.getExpressRelayConfig();
198198
const bid = await this.client.constructSvmBid(
199199
txRaw,
@@ -206,7 +206,7 @@ async generateBid(opportunity: OpportunitySvm): Promise<BidSvm> {
206206
config.relayerSigner,
207207
config.feeReceiverRelayer
208208
);
209-
209+
210210
bid.transaction.recentBlockhash =
211211
this.latestChainUpdate[this.chainId].blockhash;
212212
bid.transaction.sign(this.searcher);
@@ -224,8 +224,8 @@ The bid you construct will look like
224224
"env": "svm"
225225
}
226226
```
227-
where the serialized transaction object should contain an Express Relay SubmitBid instruction that specifies the amount you are bidding and the permission details.
228227

228+
where the serialized transaction object should contain an Express Relay SubmitBid instruction that specifies the amount you are bidding and the permission details.
229229

230230
</Tab>
231231
<Tab value="python">
@@ -234,33 +234,33 @@ Below is an excerpt of example code. See the full example in the [Python SDK](ht
234234

235235
```python
236236
import logging
237-
237+
238238
from solders.transaction import Transaction
239-
239+
240240
from express_relay.models.svm import BidSvm
241241
from express_relay.svm.limo_client import OrderStateAndAddress
242-
242+
243243
DEADLINE = 2**62
244244
logger = logging.getLogger(__name__)
245-
245+
246246
async def generate_bid(self, opp: OpportunitySvm) -> BidSvm:
247247
"""
248248
Generates a bid for a given opportunity.
249249
The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order.
250-
250+
251251
Args:
252252
opp: The SVM opportunity to bid on.
253253
Returns:
254254
The generated bid object.
255255
"""
256256
order: OrderStateAndAddress = {"address": opp.order_address, "state": opp.order}
257-
257+
258258
ixs_take_order = await self.generate_take_order_ixs(order)
259259
bid_amount = await self.get_bid_amount(order)
260260
router = self.limo_client.get_pda_authority(
261261
self.limo_client.get_program_id(), order["state"].global_config
262262
)
263-
263+
264264
submit_bid_ix = self.client.get_svm_submit_bid_instruction(
265265
searcher=self.private_key.pubkey(),
266266
router=router,
@@ -282,6 +282,7 @@ async def generate_bid(self, opp: OpportunitySvm) -> BidSvm:
282282
bid = BidSvm(transaction=transaction, chain_id=self.chain_id)
283283
return bid
284284
```
285+
285286
The bid you construct will look like
286287

287288
```
@@ -293,8 +294,8 @@ The bid you construct will look like
293294
}
294295
295296
```
296-
where the serialized transaction object should contain an Express Relay SubmitBid instruction that specifies the amount you are bidding and the permission details.
297297

298+
where the serialized transaction object should contain an Express Relay SubmitBid instruction that specifies the amount you are bidding and the permission details.
298299

299300
</Tab>
300301
</Tabs>
@@ -308,12 +309,11 @@ Searchers can submit their constructed bids to Express Relay via the SDKs, an HT
308309

309310
The code snippet below demonstrates how to submit a bid using the Typescript SDK:
310311

311-
312312
```typescript
313313
const generateBid = async (opportunity: OpportunitySvm, recentBlockhash: Blockhash): BidSvm => {
314314
...
315315
}
316-
316+
317317
const handleOpportunity = async (opportunity: Opportunity) => {
318318
...
319319
const bid = await this.generateBid(opportunity as OpportunitySvm);
@@ -328,10 +328,10 @@ The code snippet below demonstrates how to submit a bid using the Python SDK:
328328

329329
```python
330330
import typing
331-
331+
332332
async def generate_bid(opp: OpportunitySvm) -> BidSvm:
333333
...
334-
334+
335335
def opportunity_callback(opportunity: Opportunity):
336336
bid = await self.assess_opportunity(typing.cast(OpportunitySvm, opp))
337337
await client.submit_bid(bid, subscribe_to_updates=True)
@@ -376,18 +376,16 @@ A successful response to a bid submission has the following schema:
376376

377377
```json
378378
{
379-
"id": "1", // Websocket request id
379+
"id": "1", // Websocket request id
380380
"status": "success",
381381
"result": {
382-
"id": "beedbeed-b346-4fa1-8fab-2541a9e1872d", // Bid id
382+
"id": "beedbeed-b346-4fa1-8fab-2541a9e1872d", // Bid id
383383
"status": "OK"
384384
}
385385
}
386-
387386
```
388-
Consult Websocket API reference for more details.
389387

388+
Consult Websocket API reference for more details.
390389

391390
</Tab>
392391
</Tabs>
393-

apps/developer-hub/content/docs/express-relay/websocket-api-reference.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,3 @@ After submitting your bid via WebSocket, you will receive notifications about th
221221
The WebSocket server responds to ping messages according to WebSocket standards.
222222

223223
Additionally, the server periodically sends a ping message to the client to ensure the connection is still active and expects a pong in return.
224-

0 commit comments

Comments
 (0)