martriay / flashbots-explorer

Use Flashbots Bundle Explorer to search and inspect Flashbots bundles and analyze MEV extraction
https://flashbots-explorer.marto.lol
MIT License
164 stars 28 forks source link

Pagination, Eslint & Context refactor #38

Open RyRy79261 opened 3 years ago

RyRy79261 commented 3 years ago

closes #7

This PR additionally refactors business logic into two context hooks, one pertaining to Bundles & Tokens

The idea is that since bundles are clusters of blocks, token flow data & any nested block related data, that it would be managed there.

Consuming or interpreting transactions, tokens, balances or balance related events would be managed in the tokens context

Additionally components have been broken out into smaller .tsx components.To make better use of the context hook data being accessable throughout the app, a move towards TS interfaces for data has been made.

Functionally nothing has changed other than some logic for sniffing out if there are more bundles to paginate through

Improvement notes

A simple, can next page, approach has been taken but loading multiple pages and reducing calls can be improved from here

RyRy79261 commented 3 years ago

There seems to be an issue between the CSS being served when running yarn dev & when building the project. I suspect that the bundle module css file is being skipped when the build is being run though unable to verify.

There are tailwind classes that aren't being included in the build css despite being used in the markup, I suspect that tailwind might have a treeshaking build step that might be missing the additional modules though still need to validate that