feat: NFT-aware contract page (recent mints + NFT transfer filter)#609
Merged
Conversation
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>
Block explorer – Preview
Preview environment destroyed after PR was closed |
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>
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>
…llection - 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>
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>
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
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
Makes an ERC-721 contract's address page NFT-aware, and adds the missing links between NFT pages and their collection contract.
When you open a contract that is an ERC-721 collection:
/nft/{contract}/{tokenId}detail page.NftDetailsSection).How
useIsErc721Contractuses an on-chain ERC-165supportsInterface(0x80ac58cd)call, which works through proxies (most modern collections are proxy-deployed, so bytecode sniffing alone misses them). Bytecode sniff kept as a fallback for pre-ERC-165 collections. Shared across the summary badge, mints section and collection view.Transferevent logs wherefromis the zero address, newest first, limit 10. Works on Solo too (hits the node, not the indexer).-when the collection doesn't implement ERC721Enumerable.Notes
/transactions/contractalready returns interactions (verified on the live mainnet indexer); the empty state seen on Solo was the Solo indexer not running.tokenIdin a transaction's ERC-721Transferevent to its token page.Validation
ts-check,lint,knip,prettier, and the full test suite (234 tests) all pass. Mint query + ERC-165 detection validated against both the mainnet node and the local Solo node.