I’m trying to get all the create and archive events from the transaction stream using the following function (I don’t need asyncio.run()
because I’m running it on Google Colab):
async def get_events(template_id):
async with dazl.connect(**env) as conn:
async with conn.query(template_id) as stream:
async for event in stream.events():
print(event)
await get_events('*')
My understanding of the Dazl docs is that this should return both the create and archive events. I know that I have archived contracts on the ledger. But instead of all the events, I get returned only the create events:
<dazl.ledger.api_types.CreateEvent object at 0x119d26770>
<dazl.ledger.api_types.CreateEvent object at 0x1197dcc20>
<dazl.ledger.api_types.CreateEvent object at 0x119d26770>
What am I doing wrong?