Skip to content

Commit d028c8d

Browse files
committed
WIP-comments-resolved
1 parent d816fed commit d028c8d

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

pages/_meta.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"type": "page"
1515
},
1616

17-
"entropy": {
18-
"title": "Entropy",
17+
"express-relay": {
18+
"title": "Express Relay",
1919
"type": "page"
2020
},
2121

22-
"express-relay": {
23-
"title": "Express Relay",
22+
"entropy": {
23+
"title": "Entropy",
2424
"type": "page"
2525
},
2626

pages/express-relay/integrate-as-protocol.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This guide will explain how DeFi protocols can integrate Express Relay.
66

77
Integrating with Express Relay involves two main steps:
88

9-
- **Update** your DeFi protocol's contract.
9+
- **Update** your DeFi Protocol's Contract.
1010
- **Expose** opportunities to searchers for auction.
1111

1212
## Update your DeFi Protocol's Contract
@@ -93,7 +93,7 @@ interface IExpressRelayFeeReceiver {
9393
The following code snippet shows a sample Express Relay-integrated contract that performs liquidation.
9494
Note: The highlighted lines show the contract's relevant additions for Express Relay integration.
9595

96-
```solidity showLineNumbers {1,2,12,14,21,38-42, 57-61} copy
96+
```solidity showLineNumbers {1,2,12,14,21,38,39,41,42, 57-61} copy
9797
import "@pythnetwork/express-relay-sdk-solidity/IExpressRelay.sol";
9898
import "@pythnetwork/express-relay-sdk-solidity/IExpressRelayFeeReceiver.sol";
9999

pages/express-relay/integrate-as-searcher.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ Searchers can integrate with Express Relay in three steps:
1515

1616
<Steps>
1717

18-
### Subscribe to new Opportunities
18+
### Subscribe to New Opportunities
1919

20-
Express Relay provides searchers with [`Typescript`](https://github.com/pyth-network/pyth-crosschain/tree/main/express_relay/sdk/js) and [`Python`](https://github.com/pyth-network/pyth-crosschain/tree/main/express_relay/sdk/python) SDKs to interact with Express Relay.
20+
Express Relay provides searchers with [Typescript](https://github.com/pyth-network/pyth-crosschain/tree/main/express_relay/sdk/js) and [Python](https://github.com/pyth-network/pyth-crosschain/tree/main/express_relay/sdk/python) SDKs to interact with Express Relay.
2121
Searchers can also directly fetch available opportunities via HTTP or subscribe to them via WebSocket.
2222

2323
<Tabs items={['Typescript', 'Python', 'HTTP', 'Websocket']}>
2424

2525
<Tabs.Tab>
26-
Pyth provides a `Typescript` SDK, which allows searchers to subscribe to opportunities:
26+
Pyth provides a Typescript SDK, which allows searchers to subscribe to opportunities:
2727

2828
```typescript
2929
import { Client, Opportunity } from "@pythnetwork/express-relay-evm-js";
@@ -42,7 +42,7 @@ await client.subscribeChains(["op_sepolia"]);
4242

4343
</Tabs.Tab>
4444
<Tabs.Tab>
45-
Pyth provides a `Python` SDK, which allows searchers to subscribe to opportunities:
45+
Pyth provides a Python SDK, which allows searchers to subscribe to opportunities:
4646

4747
```python copy
4848
from express_relay.client import (
@@ -181,7 +181,7 @@ Searchers can submit the constructed bids to Express Relay via the SDKs, an HTTP
181181

182182
<Tabs.Tab>
183183

184-
The code snippet below demonstrates how to submit a bid using the `Typescript` SDK:
184+
The code snippet below demonstrates how to submit a bid using the Typescript SDK:
185185

186186
```typescript {4} copy
187187
const handleOpporunity = async (opportunity: Opportunity) => {
@@ -194,7 +194,7 @@ const handleOpporunity = async (opportunity: Opportunity) => {
194194
</Tabs.Tab>
195195
<Tabs.Tab>
196196

197-
The code snippet below demonstrates how to submit a bid using the `Python` SDK:
197+
The code snippet below demonstrates how to submit a bid using the Python SDK:
198198

199199
```python {5} copy
200200
def opportunity_callback(opportunity: Opportunity):

pages/express-relay/integrate-as-searcher/opportunity-adapter.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { Steps } from "nextra/components";
22

3-
# Prepare assets for Opportunity Adapter
3+
# Prepare Assets for Opportunity Adapter
44

55
The [`OpportunityAdapter`](https://github.com/pyth-network/per/blob/main/contracts/src/opportunity-adapter/OpportunityAdapter.sol) is a utility contract that can be used for easier integration with Express Relay while maintaining maximum security.
66
In this integration, searchers use the [`Permit2`](https://github.com/Uniswap/permit2/) contract for safe asset management (`ERC20` tokens and Wrapped ETH) and the adapter contract to transfer bids, execute the opportunity, and ensure the assets are transferred correctly.
77
Using the `OpportunityAdapter` means that a searcher does not need to deploy their own custom contract for inventory management and routing to the protocol contracts where liquidation takes place.
88

9-
In order to use `OpportunityAdapter`, you need to prepare your assets via the following steps. We use [`cast`](https://book.getfoundry.sh/cast/) as a simple tool to interact with the blockchain but you can use any other tool you prefer.
9+
In order to use `OpportunityAdapter`, you need to prepare your assets using the following steps. We use [`cast`](https://book.getfoundry.sh/cast/) as a simple tool to interact with the blockchain but you can use any other tool you prefer.
1010

1111
<Steps>
12-
### Transfer tokens to your wallet
12+
### Transfer Tokens to your Wallet
1313

1414
Searchers are expected to own all the tokens that they expect to provide as `sell_tokens` for different opportunities.
1515
They will also need to approve `WETH`, as the `OpportunityAdapter` will pay the bids by deducting the bid amounts from their wallet's `WETH` balance.
@@ -25,11 +25,13 @@ $WETH_ADDRESS \
2525
"deposit()" --value 0.1ether # Change the value to the amount you want to deposit
2626
```
2727

28-
### Approve your assets to Permit2
28+
### Approve your Assets to Permit2
2929

30-
Approve your tokens, including `WETH`, to the `Permit2` contract `0x000000000022D473030F116dDEE9F6B43aC78BA3`.
30+
Approve your tokens, including `WETH`, to the `Permit2` contract at `0x000000000022D473030F116dDEE9F6B43aC78BA3`.
3131
This step enables token spending with off-chain signatures.
3232

33+
You can find the `Permit2` and `WETH` contract address on the [contract address page](../contract-addresses.mdx).
34+
3335
Refer to the following command to approve a token to `Permit2`:
3436

3537
```bash copy

0 commit comments

Comments
 (0)