Skip to content

Commit d88d043

Browse files
authored
fix: update docstrings (#530)
* update new opportunity stuff * pass * add limo * add failed * go * clean * go * go
1 parent 0135b24 commit d88d043

File tree

1 file changed

+10
-10
lines changed
  • pages/express-relay/integrate-as-searcher

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,10 @@ import * as anchor from "@coral-xyz/anchor";
134134
import * as limo from "@kamino-finance/limo-sdk";
135135

136136
/**
137-
* Generates a bid for a given opportunity. The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order.
138-
* @param opportunity The SVM opportunity to bid on
139-
* @returns The generated bid object
137+
* Generates a bid for a given opportunity.
138+
* The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order.
139+
* @param opportunity The SVM opportunity to bid on.
140+
* @returns The generated bid object.
140141
*/
141142
async generateBid(opportunity: OpportunitySvm): Promise<BidSvm> {
142143
const order = opportunity.order;
@@ -192,14 +193,15 @@ from express_relay.svm.limo_client import OrderStateAndAddress
192193
DEADLINE = 2**62
193194
logger = logging.getLogger(__name__)
194195
195-
async def assess_opportunity(self, opp: OpportunitySvm) -> BidSvm | None:
196+
async def generate_bid(self, opp: OpportunitySvm) -> BidSvm:
196197
"""
197-
Method to assess an opportunity and return a bid if the opportunity is worth taking. This method always returns a bid for any valid opportunity. The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order.
198+
Generates a bid for a given opportunity.
199+
The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order.
198200
199201
Args:
200-
opp: An object representing a single opportunity.
202+
opp: The SVM opportunity to bid on.
201203
Returns:
202-
A bid object if the opportunity is worth taking to be submitted to the Express Relay server, otherwise None.
204+
The generated bid object.
203205
"""
204206
order: OrderStateAndAddress = {"address": opp.order_address, "state": opp.order}
205207
@@ -220,9 +222,7 @@ async def assess_opportunity(self, opp: OpportunitySvm) -> BidSvm | None:
220222
relayer_signer=(await self.get_metadata()).relayer_signer,
221223
)
222224
latest_chain_update = self.latest_chain_update[self.chain_id]
223-
fee_instruction = set_compute_unit_price(
224-
latest_chain_update.latest_prioritization_fee
225-
)
225+
fee_instruction = set_compute_unit_price(latest_chain_update.latest_prioritization_fee)
226226
transaction = Transaction.new_with_payer(
227227
[fee_instruction, submit_bid_ix] + ixs_take_order, self.private_key.pubkey()
228228
)

0 commit comments

Comments
 (0)