我想扫描我的以太坊地址余额列表,如果有的话, 但是,当我运行代码时,它只显示有限的地址余额,大多数情况下仅显示6个地址结果。
from etherscan.accounts import Account
list = "adr.txt"
with open(list, 'r') as f:
for line in f:
address = line.rstrip()
api = Account(address=address,
api_key='API KEY')
balance = api.get_balance()
print(address, (int(balance) / 1000000000000000000))
if (int(balance) / 1000000000000000000 == 0):
continue
else:
print("EUREKA...EUREKA...EUREKA...")
print(address, (int(balance) / 1000000000000000000),
file=open("result.txt", "a"))