feat(explorer): add token-specific Fee AMM liquidity and pagination - #1257
Merged
Merged
Conversation
Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Bundle Size Report
Chunk changes (>1KB)
Compared against main branch (baseline from 4/27/2026, 4:02:54 PM) |
Cloudflare Deployments
|
Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Bundle Size Report
Chunk changes (>1KB)
Compared against main branch (baseline from 4/27/2026, 4:02:54 PM) |
Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Bundle Size Report
Chunk changes (>1KB)
Compared against main branch (baseline from 4/27/2026, 4:02:54 PM) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/fee-amm?token=<address>URLs that immediately show a token's directional pools and both reserves. Token discovery filters indexed mint events before pagination; it does not search only the first global page./token/<address>redirects.Example after deployment: https://explore.tempo.xyz/fee-amm?token=0x20c0000000000000000000006a37DA5C996874BE
Implementation
Same-page filtering and design-system alignment
The global and filtered states are the same
/fee-ammroute.?token=<address>automatically applies the filter; the heading stays "Fee AMM", an active-filter label identifies the token, and Clear filter restores all pools. Pagination and page-size changes retain the token parameter, and the Token tab links to this same route.Reuse the explorer's
Sections,Pagination.Simple,CopyButton,type-card/type-card-dataroles, Lucide icons, semantic theme colors, and existing card borders/shadows. ExtendCopyButtonwith an optional label and lazy value for copying the current URL without changing existing callers. Browser checks additionally cover clearing the filter, preserving it across page/page-size changes, and the shared copy control.Latest desktop/mobile light and dark screenshots were visually checked against the live Tokens page:
Missing-logo follow-up
The blank indentation in the fixture screenshots was a reserved 16px image slot: the fixture returned JSON for logo requests, and an image error before React hydration never reached
onError. The fixture now returns a realistic 404 for unavailable logos.TokenIconchecks already-completed failed images on mount, advances to the existing generic fallback, ignores stale errors after a token change, and never retries a failed fallback asset in a loop. Browser regressions assert that all Fee AMM icons decode successfully and that a fallback error is terminal. No fabricated OUSD logo or token-registry update is included.Updated mobile screenshot with decoded fallback icons. Verified all five token images loaded the 64px fallback asset into their standard 16px slots.
Data loading
The pool API supports pagination but not a token predicate. Global pages use its existing page/limit contract and
nextCursorto determine whether another page exists. Scoped pages use the explorer's existing authenticated ClickHouse query provider, filtering either token side across current and legacy Mint events, with deterministic ordering and a lookahead row. Batched RPC reads supply token metadata and current reserves. Server input validation bounds requests and the handler has a 15-second response deadline.Verification
pnpm checkandpnpm check:typespassed.pnpm precommitpassed, including secret detection.apps/explorer/test/fee-amm/. No production endpoint or credential configuration changes.check:types:testreports four alias-resolution errors from unchangedsrc/index.server.tsimports (explorer-indexing,datadog-proxy,rate-limit,request-guard); the application/workspace type checks and executed suites pass.Production verification remaining
The sandbox has no
TEMPO_API_KEY, so authenticated mainnet indexer/paginated API availability could not be verified here. Browser tests use deterministic API/indexer/RPC fixtures through the real server functions and compiled UI; fixture values are not a live liquidity claim. Verify the OUSD URL against the deployed explorer's credentials before rollout. This PR does not deploy or merge anything.Initial implementation screenshots
Before is the current live page; after screenshots use the local production build with fixtures. GitHub's native media upload rejected the sandbox authentication type, so these verified screenshots are attached in the requesting Slack thread (Tempo Slack access required).
Prompted by: @snario