Skip to content

Commit

Permalink
used zklend contract in event
Browse files Browse the repository at this point in the history
  • Loading branch information
emarc99 committed Dec 28, 2024
1 parent 12b748d commit a4fe40b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions research/zklend_liquidation_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Load environment variables
node_url = "https://starknet-mainnet.public.blastapi.io/rpc/v0_7"
ZKLEND_CONTRACT_ADDRESS = (
"0x05685d6b0b493c7c939d65c175305b893870cacad780842c79a611ad9122815f"
"0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05"
)
SPOTNET_DEPLOYED_CONTRACT = (
"0x05685d6b0b493c7c939d65c175305b893870cacad780842c79a611ad9122815f"
Expand All @@ -30,7 +30,7 @@
"0x238a25785a13ab3138feb8f8f517e5a21a377cc1ad47809e9fd5e76daf01df7"
)

FROM_BLOCK = 101302
FROM_BLOCK = 988300
CHUNK_SIZE = 150

logging.basicConfig(
Expand All @@ -56,6 +56,7 @@ async def check_liquidation_proof(user_address):

# Fetch liquidation events
events_chunk = await client.get_events(
address=ZKLEND_CONTRACT_ADDRESS,
from_block_number=FROM_BLOCK,
to_block_number="latest",
follow_continuation_token=True,
Expand Down Expand Up @@ -108,7 +109,7 @@ async def check_liquidation_proof(user_address):
f"Collateral Token: {collateral_token}, Amount: {collateral_amount}"
)

# Log all liquidation results after processing all events
# Print all liquidation results after processing all events
if liquid_results:
print("Liquidation Results:", liquid_results)
else:
Expand Down

0 comments on commit a4fe40b

Please sign in to comment.