So i have a simple smart contract that sends an event whenever a function is called, something like this:

event DidSomething(uint taskId);

function doSomething(uint _taskId) {
  taskId = _taskId;
  emit DidSomething(taskId);

So only for this particular smart contract I would like to retrieve all transactions that result in this particular function being called. What would be the best way to do this. Seems the etherscan API is insufficient to fulfill this type of query.

Right now i go to etherscan -> using contract address go to contract page -> under events tab i can see what functions are being invoked as shown by the method signatures

1 Answer 1


You just need to retrieve the logs (can be done with etherescan api Logs. You will have the parameters included in the events, and among others, the hash of the transaction in which the log was generated.

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.