1
2
3
4
5
6
7
8
9
10
11
| async def main():
async with aiohttp.ClientSession() as session:
collected_data = []
depth = 0
max_depth = os.getenv('MAX_DEPTH')
INITIAL_ADDRESSES = [#some addresses here]
tasks = [process_transactions(session, address, API_KEY, depth, max_depth, collected_data) for address in INITIAL_ADDRESSES]
await asyncio.gather(*tasks)
save_to_csv(collected_data)
|