-
Notifications
You must be signed in to change notification settings - Fork 11
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
Data tile BE: Transactions burning most steps #7
Comments
Can I work on this issue? |
Can I hop on this? |
None of the comments contains any specifics on how to resolve the issue. We are keeping it open for anyone to grab |
I am Backend dev. To solve this, I will create a new function to query the database for the top 10 transactions consuming the highest steps over the last 7 days. I will also update the get_common_data function to call this new function and include the retrieved data in the response. @mazurroman |
Hello, my name is Adrián Vargas, I am a passionate developer introducing himself to the web3 world, I am currently a machine learning developer for HPE and I really enjoy coding. I would approach this issue as following: Understand Requirements: Carefully read and understand the requirements outlined in the issue #8. Understand what needs to be achieved and how the new field should be added to the response format. Review Existing Code: Go through the existing codebase, specifically the get_common_data function in the starkflare-indexer backend repository. Understand how the function is structured and how it currently generates the response. Identify Data Source: Determine where the data for the new field, top_transactions_by_steps, will be sourced from. This may involve querying transaction data from the blockchain or accessing a database where transaction information is stored. Implement New Function: Create a new function, let's call it get_top_transactions_by_steps, to retrieve the required data. This function should fetch the top 10 transactions that consumed the highest amount of steps over the last 7 days. Each transaction should include the transaction hash, number of steps consumed, timestamp, and block number. Modify Response Format: Update the get_common_data function to include the new field top_transactions_by_steps in its response format. Ensure that this modification does not affect the existing response format or other fields returned by the function. Integrate New Function: Call the get_top_transactions_by_steps function from within the get_common_data function. Populate the top_transactions_by_steps field with the data retrieved from this function. Test: Test the modified get_common_data function to ensure that it returns the expected response format with the new field included. Verify that the top_transactions_by_steps field contains accurate data for the top 10 transactions consuming the highest amount of steps over the last 7 days. |
Hi everyone! Thank you for your interest and comments. We have assigned this issue to @adrianvrj, who provided the most detailed response. |
Hi, I just created a pr in the indexer repo. |
Feel free to join our telegram to get latest updates: https://t.me/+DYI4FMia43I1NDI8
Update the
get_common_data
function in the https://github.com/walnuthq/starkflare-indexer backend repo to include a new field in the response calledtop_transactions_by_steps
. This field should contain a list of the top 10 transactions that consumed the highest amount of steps over the last 7 days.For each transaction in the
top_transactions_by_steps
list, include the following data:Implement a new function to retrieve this data and call it from within the
get_common_data
function.Note: The
top_transactions_by_steps
field should be added to the existing response format of get_common_data without modifying the other fields.The exact data format as well as more instructions defined in: #8
The text was updated successfully, but these errors were encountered: