diff --git a/pages/express-relay/integrate-as-searcher/svm.mdx b/pages/express-relay/integrate-as-searcher/svm.mdx index 6a56c893..97410b10 100644 --- a/pages/express-relay/integrate-as-searcher/svm.mdx +++ b/pages/express-relay/integrate-as-searcher/svm.mdx @@ -134,9 +134,10 @@ import * as anchor from "@coral-xyz/anchor"; import * as limo from "@kamino-finance/limo-sdk"; /** - * Generates a bid for a given opportunity. The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order. - * @param opportunity The SVM opportunity to bid on - * @returns The generated bid object + * Generates a bid for a given opportunity. + * The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order. + * @param opportunity The SVM opportunity to bid on. + * @returns The generated bid object. */ async generateBid(opportunity: OpportunitySvm): Promise { const order = opportunity.order; @@ -192,14 +193,15 @@ from express_relay.svm.limo_client import OrderStateAndAddress DEADLINE = 2**62 logger = logging.getLogger(__name__) -async def assess_opportunity(self, opp: OpportunitySvm) -> BidSvm | None: +async def generate_bid(self, opp: OpportunitySvm) -> BidSvm: """ - 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. + Generates a bid for a given opportunity. + The transaction in this bid transfers assets from the searcher's wallet to fulfill the limit order. Args: - opp: An object representing a single opportunity. + opp: The SVM opportunity to bid on. Returns: - A bid object if the opportunity is worth taking to be submitted to the Express Relay server, otherwise None. + The generated bid object. """ order: OrderStateAndAddress = {"address": opp.order_address, "state": opp.order} @@ -220,9 +222,7 @@ async def assess_opportunity(self, opp: OpportunitySvm) -> BidSvm | None: relayer_signer=(await self.get_metadata()).relayer_signer, ) latest_chain_update = self.latest_chain_update[self.chain_id] - fee_instruction = set_compute_unit_price( - latest_chain_update.latest_prioritization_fee - ) + fee_instruction = set_compute_unit_price(latest_chain_update.latest_prioritization_fee) transaction = Transaction.new_with_payer( [fee_instruction, submit_bid_ix] + ixs_take_order, self.private_key.pubkey() )