-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchecker.py
31 lines (25 loc) · 941 Bytes
/
checker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import requests
def airdrop_status(address):
url = f"https://app.zklend.com/api/airdrop/{address}"
try:
response = requests.get(url)
data = response.json()
if isinstance(data, dict):
amount_hex = data.get("amount", {}).get("value")
if amount_hex is not None:
amount_int = int(amount_hex, 16)
print(f"{address} Eligible {amount_int/1000000000000000000} ZEND")
else:
print(f"{address} Not Eligible")
else:
print(f"{address} Not Eligible")
except (ValueError, requests.RequestException) as e:
print(f"Error processing data for address {address}: {e}")
def main():
# Load addresses from wallets.txt
with open('wallets.txt', 'r') as file:
addresses = file.read().splitlines()
for address in addresses:
airdrop_status(address)
if __name__ == "__main__":
main()