feat: make agent NFT view coherent with standard NFT metadata#611
Merged
Conversation
The agent NFT view dropped the standard NFT info the rest of the explorer shows. It now: - shows the Owner / Minted-on stats cards above the tabs (NftStatsCards), matching the standard NFT view; - adds an "NFT" tab rendering NftDetailsSection, so contract address, token standard, mint info, collection details and attributes are all available in readable rows (no longer only buried in the raw metadata JSON). Agent-specific tabs stay primary; standard NFT data is one click away and uses the same DetailRow/SectionCard styling. Reuses the existing components, threading the token metadata through from NftDetailPageContent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
davidecarpini
approved these changes
Jul 14, 2026
davidecarpini
pushed a commit
that referenced
this pull request
Jul 14, 2026
) * feat: NFT-aware contract page with recent mints and NFT transfer filter On ERC-721 contract pages, add a "Latest Minted Tokens" section listing the collection's most recently minted tokens (last 10), each linking to the existing /nft/{contract}/{tokenId} detail page. Because the indexer has no per-collection endpoint (all NFT queries require an owner address), the mints are read on-chain from the Thor node via `Transfer` event logs where `from` is the zero address, newest first. This also works on Solo, since it hits the node directly rather than the indexer. Contract type is detected with the existing bytecode sniff (useContractSniff), so the section self-hides on non-ERC-721 contracts. Also add an "NFT" filter to the address Token Transfers table (the shared TransfersTable already renders NFT rows), addressing the ERC-20-only gap. Adds i18n keys "Latest Minted Tokens", "No tokens have been minted yet" and "Owner" across all 11 locales. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: detect ERC-721 via ERC-165 so proxy NFT collections are recognized Bytecode sniffing misses proxy-deployed collections (ERC-1967/minimal proxy), because the ERC-721 selectors live in the implementation, not the proxy bytecode. Detect ERC-721 with an on-chain ERC-165 `supportsInterface(0x80ac58cd)` call instead, which is executed by the implementation through the proxy. Bytecode sniffing is kept as a fallback for older collections that predate ERC-165. Applies to both the "Latest Minted Tokens" section gating and the ERC-721 badge in the contract summary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * revert: drop NFT filter from Token Transfers table The dedicated "Latest Minted Tokens" section covers NFT discovery on contract pages, and the owner-scoped transfers endpoint returns nothing for a collection contract anyway, so the NFT toggle was redundant. Restores the section to its original ERC-20/VET filter set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: focused Collection view for NFT contracts + link NFT page to collection - On an ERC-721 contract's address page, the Activity card becomes a focused "Collection" view (Name / Symbol / Total Supply from on-chain getters, plus creation date, master and creation tx) instead of the generic VET/VTHO/gas cards, which are rarely meaningful for a token contract. Total Supply falls back to "-" when the collection doesn't implement ERC721Enumerable. - Extract useIsErc721Contract (ERC-165 + bytecode-sniff fallback) so contract detection is shared across ContractSummary, the mints section and the collection view. - The collection name in the NFT detail header now links to the collection contract's address page. This was the only path back to the contract from the agent NFT view, which doesn't render NftDetailsSection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: convert mint block timestamps to ms so ages render correctly Node event-log timestamps are in seconds, but AgeText and the date formatters expect milliseconds (indexer responses are normalised to ms via timestampSchema). The Latest Minted Tokens ages were all showing "57y ago" (seconds read as ms → ~1970). Multiply by 1000 to match app convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: make agent NFT view coherent with standard NFT metadata (#611) The agent NFT view dropped the standard NFT info the rest of the explorer shows. It now: - shows the Owner / Minted-on stats cards above the tabs (NftStatsCards), matching the standard NFT view; - adds an "NFT" tab rendering NftDetailsSection, so contract address, token standard, mint info, collection details and attributes are all available in readable rows (no longer only buried in the raw metadata JSON). Agent-specific tabs stay primary; standard NFT data is one click away and uses the same DetailRow/SectionCard styling. Reuses the existing components, threading the token metadata through from NftDetailPageContent. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What & why
The agent NFT view (shown for ERC-8004 agent NFTs) had a completely different UI that dropped the standard NFT info the rest of the explorer always shows — owner, mint date/tx, contract address, token standard, collection details, attributes were either missing or buried in the raw-metadata JSON. This makes the agent page coherent with the standard NFT view while keeping the agent-specific tabs primary.
Changes
NftStatsCards), same as the standard NFT view — restores at-a-glance owner and mint date.NftDetailsSection: contract address (clickable), token standard, mint block/tx/minted-by, collection symbol & supply, and attributes — all in readable rows instead of only in the raw JSON.metadatais threaded through fromNftDetailPageContent. SameDetailRow/SectionCardstyling as before, so it's visually consistent.No new i18n keys (the
NFTlabel already exists).Stacking
Based on
feat/nft-contract-page(#609) — it depends on thecontractAddressprop added toNftDetailHeaderthere. Retarget tomainonce #609 merges.Validation
ts-check,lint,knip,prettier, full test suite (234) all pass.