Skip to content

feat(tips): audit-events data layer + Basescan-style explorer - #55

Open
montycheese wants to merge 1 commit into
mainfrom
niran/transaction-events-query
Open

feat(tips): audit-events data layer + Basescan-style explorer#55
montycheese wants to merge 1 commit into
mainfrom
niran/transaction-events-query

Conversation

@montycheese

Copy link
Copy Markdown
Contributor

Ports niran/transaction-events-query from 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 resolved TIPS_<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-source coverage. 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 on fetch).
  • transaction-data.ts — source-agnostic domain types; s3.ts re-exports them for back-compat.
  • Routes txn / block / bundle / rejected are now 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 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/blocks and /tips/txs paginated list pages + shared ExplorerTables.
  • /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.
  • EventHistoryRow timeline 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

  • Per-chain 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

  • Multi-chain: every data function takes a TipsChain and resolves per-chain env (config.ts), vs. the single-deployment tips-ui branch.
  • viem-free: list/lookup/receipt/bundle chain reads reimplemented as raw JSON-RPC.
  • Consolidated UI: reskinned into omni-ui's app/components/ui/* kit + bds-* tokens rather than tips-ui's standalone light-mode pages.
  • Types centralized in transaction-data.ts (branch used the same pattern).

Verification

  • npm run typecheck — clean
  • npm 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

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>
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
omni-ui Building Building Preview Aug 11, 2026 7:32pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants