Skip to content

feat(explorer): use tempo address activity api for history#849

Open
o-az wants to merge 4 commits intomainfrom
fnt/explorer-address-activity-api
Open

feat(explorer): use tempo address activity api for history#849
o-az wants to merge 4 commits intomainfrom
fnt/explorer-address-activity-api

Conversation

@o-az
Copy link
Copy Markdown
Member

@o-az o-az commented Apr 16, 2026

Summary

  • switch explorer address history to the Tempo address activity API for non-token account history
  • pass through richer API-backed known events, including zone activity
  • normalize API timestamps and add TEMPO_API_KEY to explorer env example
  • preserve existing local/TIDX fallback paths for token/emitted history and missing API key cases

Validation

  • pnpm check
  • pnpm check:types
  • pnpm build

Notes

  • validated on dev against the testnet address 0x35d01486dd24248e9d642b21732799c3cd89e6f8
  • confirmed duplicate sends, approval regressions, and deeper pagination failures were resolved after the API fixes landed

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Bundle Size Report

Metric Size Δ Change
Total 4.2 MB -576.5 KB (-11.8%)
Gzip 1.2 MB -91.5 KB (-6.9%)
Brotli 1.1 MB -72.3 KB (-6.3%)
Chunk changes (>1KB)
Chunk Change
assets/KeyManager.js (removed) -477.4 KB
assets/QueryBuilder.js (removed) -423.4 KB
assets/router.js -294.2 KB
assets/wagmi.config.js -283.5 KB
assets/isAddressEqual.js (removed) -200.4 KB
assets/_hash.js -128.1 KB
assets/BaseTanStackRouterDevtoolsPanel-Bmws3ikM.js (removed) -99.5 KB
assets/Intro.js (removed) -66.0 KB
assets/createSsrRpc.js (removed) -43.8 KB
assets/path.js (removed) -30.6 KB
assets/Hash.js -30.3 KB
assets/FloatingTanStackRouterDevtools-B7vy70jP.js (removed) -24.4 KB
assets/_layout.js -22.2 KB
assets/stringify.js (removed) -19.7 KB
assets/hmac.js (removed) -16.7 KB
assets/address.js -13.8 KB
assets/Address.js -13.6 KB
assets/getAction.js -13.0 KB
assets/base.js (removed) -12.8 KB
assets/utils.js -10.1 KB
...and 49 more

Compared against main branch (baseline from 2/4/2026, 5:13:51 PM)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Cloudflare Deployments

App Environment Status Preview
explorer devnet [OK] Deployed View Preview
explorer mainnet [OK] Deployed View Preview
explorer testnet [OK] Deployed View Preview
fee-payer devnet [>>] Skipped No changes
fee-payer moderato [>>] Skipped No changes
fee-payer privy [>>] Skipped No changes
og - [>>] Skipped No changes
perf - [>>] Skipped No changes
tokenlist - [>>] Skipped No changes

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64f76b8ef4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/explorer/src/routes/api/address/history/$address.ts Outdated
Comment thread apps/explorer/src/routes/api/address/history/$address.ts Outdated
Comment on lines +162 to +166
const searchParams = new URLSearchParams({
include: params.include,
includes: 'zones,transfers',
limit: params.limit.toString(),
offset: params.offset.toString(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve ascending sort when activity API path is enabled

Although the route still accepts sort and computes sortDirection, the activity API request never includes sort information, so the response order falls back to the upstream default. As a result, ?sort=asc no longer yields ascending history whenever TEMPO_API_KEY is configured, which breaks ordering consistency versus the existing fallback query path and can invalidate offset-based pagination expectations.

Useful? React with 👍 / 👎.

@o-az
Copy link
Copy Markdown
Member Author

o-az commented Apr 20, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec0d6dd386

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/explorer/vitest.config.ts
Comment on lines +256 to +257
const hasMore =
filteredItems.length > params.offset + params.limit || countCapped
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compute filtered hasMore without relying on count cap flag

In the filtered Tempo API path, hasMore is forced true whenever countCapped is true. At the boundary where sourceOffset reaches HISTORY_COUNT_MAX but the API already reports no additional source pages, this returns hasMore: true even though no more filtered items exist, which can lead clients to paginate into empty pages indefinitely for status/after queries.

Useful? React with 👍 / 👎.

@o-az
Copy link
Copy Markdown
Member Author

o-az commented Apr 20, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 493a7254b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +16 to +18
if (val === undefined) {
return { txs: true, transfers: true, emitted: false }
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Default empty sources to standard history sources

Handle ?sources= the same way as an omitted sources parameter. With the new val === undefined check, an empty string now produces { txs: false, transfers: false, emitted: false }, and the history route returns no transactions even when activity exists. This regresses prior behavior (if (!val)) and affects clients that send an empty query value instead of omitting the parameter.

Useful? React with 👍 / 👎.

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.

1 participant