Problem
The global search bar can return NFT collections, but it cannot return individual NFT tokens by name. The frontend already supports nft search results and token detail navigation, but the backend search handler does not currently query nft_tokens.
Proposed change
Add support for searching individual NFTs by token name from the global search bar.
Backend
- Extend the search API to query
nft_tokens.name
- Return
nft search results with the fields needed by the existing UI:
contract_address
token_id
name
image_url
- Keep current collection search behavior intact
- Consider joining
nft_contracts to include collection context if needed for labeling
Frontend
- Reuse the existing
nft search result type in the search bar
- Make sure NFT token matches are rendered clearly and navigate to
/nfts/{contract_address}/{token_id}
- Keep collection and token results visually distinguishable
Notes
- Search should remain fast and avoid broad unbounded scans
- It may be worth limiting NFT token matches more aggressively than collection matches if needed
- This should use the existing raw token
name already stored in nft_tokens
Acceptance criteria
- Searching by an NFT token name can return matching NFT tokens
- Selecting a token result opens the NFT detail page
- Existing address / tx / block / collection search behavior is unchanged
Problem
The global search bar can return NFT collections, but it cannot return individual NFT tokens by name. The frontend already supports
nftsearch results and token detail navigation, but the backend search handler does not currently querynft_tokens.Proposed change
Add support for searching individual NFTs by token name from the global search bar.
Backend
nft_tokens.namenftsearch results with the fields needed by the existing UI:contract_addresstoken_idnameimage_urlnft_contractsto include collection context if needed for labelingFrontend
nftsearch result type in the search bar/nfts/{contract_address}/{token_id}Notes
namealready stored innft_tokensAcceptance criteria