ERC-1046: tokenURI for Fungible Tokens
ERC-721 has tokenURI(tokenId) returning per-NFT metadata. ERC-1046 gives fungible tokens (ERC-20) the same affordance: a tokenURI() returning a JSON pointer to the token's metadata (logo, description, decimals override, decimal precision, etc.). Wallets and explorers consume this metadata to render rich token info without per-token integration.
Required Interface
solidity
interface IERC1046 {
function tokenURI() external view returns (string memory);
}The returned URI typically resolves to a JSON document like:
json
{
"name": "Acme Stable",
"symbol": "ACME",
"decimals": 6,
"image": "ipfs://Qm...",
"description": "Asset-backed stablecoin issued by Acme.",
"external_url": "https://acme.fi/",
"tags": ["stablecoin", "dollar-backed"]
}Neo Equivalent: NEP-17 + tokenURI() View
Neo NEP-17 doesn't mandate a metadata URI but the convention can be added with a single view method:
csharp
[Safe]
public static string TokenURI()
=> (string)Storage.Get(Storage.CurrentContext, new byte[] { Prefix_TokenURI });| ERC-1046 (Ethereum) | Neo Equivalent | Notes |
|---|---|---|
tokenURI() returning string | TokenURI() returning string | Direct port |
| JSON metadata schema | Same — community-defined extras | |
| Pre-existing on ERC-721 | Adopt as convention for NEP-17 | New for fungibles |
Composition
- ERC-5169 — client script URI. Pair: scriptURI for interactive components, tokenURI for static metadata.
- ERC-7160 — multi-metadata. Tokens with versioned metadata expose multiple URIs.
Migration Notes
For fungible-token wallets / indexers:
- Add
TokenURI()to your NEP-17 contract — set at deploy. - Hosting can be IPFS (canonical CID) + HTTPS gateway (fallback).
- Wallets that already render NFT metadata can re-use the parser for fungible tokens too.
