Skip to content

Commit

Permalink
some renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
Anirudh Suresh authored and Anirudh Suresh committed Jan 15, 2024
1 parent 4f58669 commit 8e323bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions beacon/searcher/searcherA.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
VALID_UNTIL = 1_000_000_000_000


def create_liquidation_intent(
def create_liquidation_transaction(
opp: LiquidationOpportunity,
sk_liquidator: str,
valid_until: int,
Expand Down Expand Up @@ -47,15 +47,15 @@ def create_liquidation_intent(
encode([LIQUIDATION_ADAPTER_CALLDATA_TYPES], [
tuple(liquidation_adapter_calldata.values())]).hex()

intent: LiquidationAdapterTransaction = {
tx: LiquidationAdapterTransaction = {
"bid": hex(bid),
"calldata": calldata,
"chain_id": opp["chain_id"],
"contract": LIQUIDATION_ADAPTER_ADDRESS,
"permission_key": opp['permission_key']
}

return intent
return tx


async def main():
Expand All @@ -67,12 +67,12 @@ async def main():

# this is hardcoded to the searcher A SK
sk_liquidator = "0x5b1efe5da513271c0d30cde7a2ad1d29456d68abd592efdaa7d2302e913b783f"
intent = create_liquidation_intent(
tx = create_liquidation_transaction(
liquidatable[0], sk_liquidator, VALID_UNTIL, BID)

resp = await CLIENT.post(
AUCTION_SERVER_ENDPOINT,
json=intent
json=tx
)

print(resp.text)
Expand Down
2 changes: 1 addition & 1 deletion beacon/searcher/searcher_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def assess_liquidation_opportunity(
pass


def create_liquidation_intent(
def create_liquidation_tx(
opp: LiquidationOpportunity,
sk_liquidator: str,
valid_until: int,
Expand Down

0 comments on commit 8e323bf

Please sign in to comment.