walnuthq / starkflare

This tool monitors the resource usage of the StarkNet Mainnet rollup in real time, such as calldata, storage, and gas consumption. Its aim is to help take steps to further optimize the rollup.
https://starkflare.pages.dev
Apache License 2.0
5 stars 11 forks source link

Data tile: L1 gas spent #1

Closed mazurroman closed 4 months ago

mazurroman commented 5 months ago

Feel free to join our telegram to get latest updates: https://t.me/+DYI4FMia43I1NDI8

The dashboard already contains a placeholder for the "L1 gas spent" data tile. It's currently using static data and the goal of this task is to connect the tile to the server, query live data and polish the tile.

Backend:

Update the get_common_data function in the https://github.com/walnuthq/starkflare-indexer backend repo to include a new field - an array containing the number of L1 gas spent for each of the last 7 days.

Implement a new function to retrieve this data and call it from within the get_common_data function.

Note: This new field should be added to the existing response format of get_common_data without modifying the other fields.

Frontend:

The L1 gas spent component file: gas-spent.tsx.

jaipaljadeja commented 5 months ago

I would like to work on this.

jimenezz22 commented 5 months ago

Hi @mazurroman Can you assigne this issue to me? For the backend, I'll update the get_common_data function to include a new field for L1 gas spent over the last 7 days, ensuring it seamlessly integrates with the existing response format. On the frontend, I'll add labels to the x-axis to indicate days of the week and implement hover tooltips to display ETH spent per day. I will be responsible for consistency and maintainability in the future for this code.

vibenedict commented 5 months ago

i will like to jump on this issue

mazurroman commented 5 months ago

According to Contributor Guidelines, I am assigning this issue to @jaipaljadeja who has been an active contributor on Walnut's repos in the past.

Thank your for your comment @jimenezz22 . While it does provide some information on how you would solve it, it's quite generic and high level. Ideally, for a first contribution, it would be great to see more technical details to show off your skills. I am hoping you will get a chance to work on some other issue!