hirosystems/stacks-blockchain-api

Upgrade for the Get Contract Events API endpoint

Opened this issue · 0 comments

Using this endpoint: https://docs.hiro.so/stacks/api/smart-contracts/events
Trying to retrieve events with a specific function_name from a contract that has thousands of contract calls but only few ones with the function_name being targeted might be difficult and heavy on the api, having to parse every 50 events with the offset.

Was wondering if it could be easier to add function_name(s) query parameter to filter out only events that match the name(s).
And maybe add a function_name property in the events properties.

I considered parsing through all of them and filtering them out by checking if the function_name is present in the contract_log.value.repr property, but requires a ping to the api every 50 events in the contract, i feel like that's not very efficient.