feat(tips): audit-events data layer + Basescan-style explorer - #55
Open
montycheese wants to merge 1 commit into
Open
feat(tips): audit-events data layer + Basescan-style explorer#55montycheese wants to merge 1 commit into
montycheese wants to merge 1 commit into
Conversation
Port niran/transaction-events-query from tips-ui, adapted to omni-ui's consolidated, multi-chain, viem-free TIPS surface. This is the transaction observability migration the earlier tips commits prepped for (S3 → audit). Data layer (audit-first, S3 fallback): - audit-events.ts: audit events JSON-RPC client (base_getTransactionEventsBy*) + adapters onto the shared transaction-data types; chain-aware via the resolved TIPS_<CHAIN>_AUDIT_RPC_URL. - transaction-lookup.ts: canonical multi-source lookup (audit + on-chain tx/receipt + legacy S3 archive) with per-source coverage; DI-based. - transaction-list.ts / block-list.ts: cursor-paginated explorer listings. - receipts.ts + rpc.ts: batched receipts and raw JSON-RPC helpers (no viem). - transaction-data.ts: source-agnostic domain types (s3.ts re-exports them). - Routes txn/block/bundle/rejected are audit-first with S3 fallback; new /api/tips/txs; /api/tips/blocks is now cursor-paginated. The block read-through cache (getBlockFromCache/cacheBlockData) is intentionally kept. Explorer UI (reskinned to the Base design system, chain-aware links): - /tips/blocks and /tips/txs paginated list pages + shared ExplorerTables. - /tips/txn/[hash] is now the canonical multi-source detail view (was a redirect): on-chain status, simulation, audit/archive timeline, provenance. - EventHistoryRow timeline; block page gains base fee + event history; bundle tx hashes link to the canonical txn page; dashboard search routes to /txn. Config: per-chain TIPS_<CHAIN>_AUDIT_RPC_URL (opt-in; absent → S3 fallback). Tests: ported to vitest (audit adapters, lookup, list/format helpers). Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
🟡 Heimdall Review Status
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Ports
niran/transaction-events-queryfrom tips-ui into omni-ui. omni-ui pulled in tips-ui earlier but this branch was never merged, so this brings the changes across — adapted to omni-ui's consolidated, multi-chain, viem-free TIPS surface. This is the transaction observability migration the earlier tips commits explicitly prepped for (S3 → audit events).What changed
Data layer — audit-first, S3 fallback
audit-events.ts— audit events JSON-RPC client (base_getTransactionEventsByHash|ByBlockNumber|ByBlockHash|ByBundle,base_getRejectedTransactionEvents) + pure adapters mapping raw records onto the shared domain types. Chain-aware via the resolvedTIPS_<CHAIN>_AUDIT_RPC_URL.transaction-lookup.ts— canonical multi-source lookup: audit events + on-chain tx/receipt + legacy S3 archive, queried in parallel, merged, with per-sourcecoverage. Dependency-injected for testability.transaction-list.ts/block-list.ts— cursor-paginated explorer listings straight from the execution RPC.receipts.ts+rpc.ts— batched receipt lookup and raw JSON-RPC helpers (omni-ui has no viem; the branch's viem usage was reimplemented onfetch).transaction-data.ts— source-agnostic domain types;s3.tsre-exports them for back-compat.txn/block/bundle/rejectedare now audit-first with S3 fallback; new/api/tips/txs;/api/tips/blocksis now cursor-paginated.getBlockFromCache/cacheBlockData) is intentionally retained (per the earlier prep commits), unlike the tips-ui branch which removed it.Explorer UI — reskinned to the Base design system, chain-aware links
/tips/blocksand/tips/txspaginated list pages + sharedExplorerTables./tips/txn/[hash]is now the canonical multi-source detail view (previously a redirect to the bundle page): on-chain status, simulation results, audit/archive timeline, and a data-provenance footer.EventHistoryRowtimeline component; the block page gains a base-fee stat + event history; bundle tx hashes link to the canonical txn page; dashboard search routes to/txn.Config
TIPS_<CHAIN>_AUDIT_RPC_URL(opt-in). When unset for a chain, the routes fall back to the S3 archive. Added to.env.example.Notable adaptations vs. the source branch
TipsChainand resolves per-chain env (config.ts), vs. the single-deployment tips-ui branch.app/components/ui/*kit +bds-*tokens rather than tips-ui's standalone light-mode pages.transaction-data.ts(branch used the same pattern).Verification
npm run typecheck— cleannpm run lint— clean (only pre-existing warnings in unrelated files)npm test— all passing, incl. 30+ ported tests (audit adapters, lookup, list/format helpers)npm run build:internal— succeeds; all new routes compile (/tips/blocks,/tips/txs,/tips/txn/[hash],/api/tips/txs)npm run docs:check— current (TIPS is internal-only, excluded from public docs)TIPS remains gated to the internal build target (
NEXT_PUBLIC_DEPLOY_TARGET=internal); the section stays fully absent from the public build.Generated with Claude Code