Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter events by topics/selectors #60

Open
michprev opened this issue May 9, 2023 · 0 comments
Open

Filter events by topics/selectors #60

michprev opened this issue May 9, 2023 · 0 comments

Comments

@michprev
Copy link

michprev commented May 9, 2023

Events can be filtered by event topics here:

//build url
const url = this.apiURL +
`/api?module=logs&action=getLogs&address=${address}` +
`&fromBlock=${startBlock}&offset=${cursor.limit}` +
`&page=1&sort=asc&apikey=` +
this.apiKey;

The SDK should be interested only in a few kinds of events:

  • deposit
  • release
  • refund

Each event has its selector/topic which is equal to keccak256 of a normalized signature of the event. For example, a VS Code extension named Tools for Solidity can be used to get event selectors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant