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

feat(eventindexer): add get events by address/name param for community #14025

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented Jun 20, 2023

some community members need a /events endpoint to query blockproposed/blockproven/blockverified events by address and name to enable some features on their node dashboard.

@wolfderechter will utilize this I believe, the endpoint works as follows:

/events?address=0xwhatever&event=BlockProposed|BlockProven|BlockVerified, will return a paginated list, to consume the following pages just make the same request with &page=2, &page=3, etc, will return the next page. Will return 100 items per page. The response has a total_pages property to see how many pages exist.

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #14025 (e92cdb8) into main (773331b) will decrease coverage by 0.16%.
The diff coverage is 36.00%.

@@            Coverage Diff             @@
##             main   #14025      +/-   ##
==========================================
- Coverage   51.99%   51.84%   -0.16%     
==========================================
  Files         147      148       +1     
  Lines        3829     3854      +25     
  Branches      336      336              
==========================================
+ Hits         1991     1998       +7     
- Misses       1728     1745      +17     
- Partials      110      111       +1     
Flag Coverage Δ *Carryforward flag
bridge-ui 94.23% <ø> (ø) Carriedforward from e56b47a
eventindexer 73.82% <36.00%> (-4.20%) ⬇️
protocol 0.00% <ø> (ø) Carriedforward from e56b47a
relayer 59.88% <ø> (ø) Carriedforward from e56b47a
ui 100.00% <ø> (ø) Carriedforward from e56b47a

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
packages/eventindexer/repo/event.go 61.03% <0.00%> (-12.40%) ⬇️
...ages/eventindexer/http/get_by_address_and_event.go 72.72% <72.72%> (ø)
packages/eventindexer/http/routes.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cyberhorsey cyberhorsey added this pull request to the merge queue Jun 21, 2023
Merged via the queue into main with commit 146f8d5 Jun 21, 2023
12 checks passed
@cyberhorsey cyberhorsey deleted the event_indexer_event_endpoints branch June 21, 2023 02:33
@github-actions github-actions bot mentioned this pull request Jun 21, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants