hirosystems / stacks-blockchain-api

API for the Stacks blockchain
https://stacks-blockchain-api.vercel.app
GNU General Public License v3.0
178 stars 114 forks source link

Websocket API always returns empty events #2167

Closed CyrusVorwald closed 5 days ago

CyrusVorwald commented 1 week ago

I think there is a bug in the websocket API. When subscribing to address transactions using address_tx_update, the response includes event_count. Even if event_count is greater than 0, It seems to always return empty events: [] array in the transaction data. This can be reproduced by monitoring contract call transactions that emit events via the websocket API.

zone117x commented 5 days ago

Events are not included in the transaction object. The number of events are often too large to reasonable fit. You can use the /extended/v1/tx/events endpoint to fetch and filter/paginate through transaction events.