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

add new endpoint to fetch transactions burning most steps by entrypoint selector #6

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

saimeunt
Copy link
Contributor

@saimeunt saimeunt commented Jun 3, 2024

This PR adds a new endpoint to fetch the transactions burning most steps by contract address and entrypoint selector.

Closes walnuthq/starkflare#10

saimeunt and others added 3 commits June 3, 2024 12:18
* added function to get top transactions and modified get_common_data to return top transactions

* added new migration script

* revert changes in 001_init.up.sql and added 005_add_get_top_transactions_by_steps.up.sql

* fixed function to order by steps correctly
saimeunt and others added 6 commits June 4, 2024 12:02
* add entrypoints burning most steps

* Check if contractAddress is null

* Top transactions by steps (walnuthq#2)

* added function to get top transactions and modified get_common_data to return top transactions

* added new migration script

* revert changes in 001_init.up.sql and added 005_add_get_top_transactions_by_steps.up.sql

* fixed function to order by steps correctly

* feat: L1 gas stats for last 7 days (walnuthq#4)

* add entrypoints burning most steps

* rename migration file

---------

Co-authored-by: Roman <[email protected]>
Co-authored-by: ADR!AN <[email protected]>
Co-authored-by: Jaipal Jadeja <[email protected]>
Copy link
Collaborator

@jaipaljadeja jaipaljadeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! Everything looks good.
Just a small change, can you please remove 'param' word from these keys for the endpoint payload. this ensures uniformity in future as well as better DX.

Currently its taking args payload as:

{
  "contract_address_param": "0x04505a9f06f2bd639b6601f37a4dc0908bb70e8e0e0c34b1220827d64f4fc066",
  "entrypoint_selector_param": "0x033076126f032617037f0b2fe939518f69cc8b9e9689b6ab065bb612662c53fc"
}

make it:

{
  "contract_address": "0x04505a9f06f2bd639b6601f37a4dc0908bb70e8e0e0c34b1220827d64f4fc066",
  "entrypoint_selector": "0x033076126f032617037f0b2fe939518f69cc8b9e9689b6ab065bb612662c53fc"
}

Edit: not payload but url params

@saimeunt
Copy link
Contributor Author

saimeunt commented Jun 4, 2024

@jaipaljadeja You're right, I just made the changes and added a new migration to fix get_entrypoints too.

Copy link
Collaborator

@jaipaljadeja jaipaljadeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

Data tile BE: Transactions burning most steps by entrypoint ID
3 participants