File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
express_relay/sdk/python/express_relay/searcher/examples Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
import argparse
2
2
import asyncio
3
3
import logging
4
+ import typing
5
+
4
6
from eth_account .account import Account
5
7
from secrets import randbits
6
8
16
18
Bytes32 ,
17
19
BidStatus ,
18
20
BidStatusUpdate ,
21
+ OpportunityEvm ,
19
22
)
20
23
21
24
logger = logging .getLogger (__name__ )
@@ -40,7 +43,7 @@ def __init__(
40
43
41
44
def assess_opportunity (
42
45
self ,
43
- opp : Opportunity ,
46
+ opp : OpportunityEvm ,
44
47
) -> BidEvm | None :
45
48
"""
46
49
Assesses whether an opportunity is worth executing; if so, returns a Bid object.
@@ -72,7 +75,7 @@ async def opportunity_callback(self, opp: Opportunity):
72
75
Args:
73
76
opp: An object representing a single opportunity.
74
77
"""
75
- bid = self .assess_opportunity (opp )
78
+ bid = self .assess_opportunity (typing . cast ( OpportunityEvm , opp ) )
76
79
if bid :
77
80
try :
78
81
await self .client .submit_bid (bid )
You can’t perform that action at this time.
0 commit comments