What this tool does
The ERC-1155 Inspector reads any ERC-1155 token contract and returns the metadata URI and total supply from one expression. It is built for developers and collectors who need to inspect a multi-token contract without writing ABI files, computing the {id} hex substitution by hand, or chasing IPFS gateways.
How to use it
- Paste the ERC-1155 contract address into the form above.
- Enter the token ID you want to inspect, then pick a chain.
- Run the query and read the URI, total supply, and metadata in the result panel.
The result panel shows the raw uri(id) returned by the contract, the URL after the {id} placeholder is substituted, the metadata JSON pulled from the gateway, and the read block number. Everything happens in one round trip to the contract.
What is happening under the hood
ERC-1155 is famously awkward to query. There is no name() per token, the uri() returns a template with a literal {id} placeholder that must be substituted with a 64 character lowercase hex string, the supply method is part of an optional extension that not every contract implements, and the metadata itself usually lives behind an IPFS gateway that may or may not respond. evmquery handles the contract reads in one expression. The frontend handles the URI substitution and the gateway fetch.
{
"uri": token.uri(id),
"totalSupply": string(formatUnits(token.totalSupply(id), 0))
}
uri(id)returns the raw template string. evmquery resolves the contract ABI from verified source and decodes the typed result.totalSupply(id)is included when the contract implements theERC1155Supplyextension. Contracts that do not implement it will reject this expression. Drop thetotalSupplyline if you only need the URI.- Multiple reads are auto-batched by Multicall3, so the cost is one round trip regardless of how many fields you ask for.
- The
string(formatUnits(value, 0))wrap converts eachsol_intreturn to a string. CEL maps require all values to be the same type, so we coerce numbers to strings before returning them alongside the URI.
Build this yourself
Each of the snippets below makes the same POST call to the evmquery REST API. The expression is the one shown above, with your contract address and inputs filled in.
REST (curl)
curl -X POST https://api.evmquery.com/api/v1/query \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain": "evm_ethereum",
"schema": {
"contracts": { "token": { "address": "0x28472a58A490c5e09A238847F66A68a47cC76f0f" } },
"context": { "id": "sol_int" }
},
"expression": "{ \"uri\": token.uri(id), \"totalSupply\": string(formatUnits(token.totalSupply(id), 0)) }",
"context": { "id": 1 }
}'
Python
import requests
resp = requests.post(
"https://api.evmquery.com/api/v1/query",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"chain": "evm_ethereum",
"schema": {
"contracts": {"token": {"address": "0x28472a58A490c5e09A238847F66A68a47cC76f0f"}},
"context": {"id": "sol_int"},
},
"expression": (
'{ "uri": token.uri(id),'
' "totalSupply": string(formatUnits(token.totalSupply(id), 0)) }'
),
"context": {"id": 1},
},
timeout=10,
)
print(resp.json()["result"])
TypeScript
const resp = await fetch("https://api.evmquery.com/api/v1/query", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EVMQUERY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
chain: "evm_ethereum",
schema: {
contracts: { token: { address: "0x28472a58A490c5e09A238847F66A68a47cC76f0f" } },
context: { id: "sol_int" },
},
expression:
"{ \"uri\": token.uri(id), \"totalSupply\": string(formatUnits(token.totalSupply(id), 0)) }",
context: { id: 1n },
}),
});
const { result } = await resp.json();
The free tier covers 2,000 reads per month. Get a free API key to drop these snippets into your project.
When you would use this
- Auditing a new collection. Quickly verify a contract really implements ERC-1155 and inspect the metadata URI before you list, integrate, or buy.
- Debugging an indexer. Compare the on-chain
uri(id)result with what your indexer cached and figure out where the substitution or gateway broke. - Game economy review. Read total supply for fungible game tokens (gold, energy) and confirm rarity for limited-edition items.
- Writing ERC-1155 docs. Show your readers a working
uri(id)substitution example without making them set up a Hardhat console.
FAQ
What is ERC-1155?
ERC-1155 is the multi-token standard. One contract can hold many token IDs, and each ID can be fungible (like an in-game gold token) or non-fungible (like a unique collectible). Compared to ERC-721, the standard is more efficient for batch transfers and shared metadata, but it offloads more work onto the client.
Why is the {id} placeholder in the URI not substituted automatically?
The EIP-1155 metadata spec defines {id} as a literal client-side substitution that must be replaced with the lowercase hex token ID, padded to 64 characters, with no 0x prefix. Many wallets and indexers either skip this step or do it wrong, which is one of the most common reasons ERC-1155 metadata fails to load.
Which chains are supported?
The Inspector currently runs against Ethereum, Base, and BNB Smart Chain. Additional EVM chains are being added on the evmquery backend. If you need a specific chain prioritized, contact support.
Why is the total supply showing as not exposed?
ERC-1155 does not require contracts to expose a per-token supply. Many implementations include the optional ERC1155Supply extension from OpenZeppelin, which adds the totalSupply(uint256) function, but contracts that skip it will simply not return a number here.
Does evmquery work with proxy contracts?
Yes. evmquery automatically resolves EIP-1967 transparent and beacon proxies to their implementation, so you call token.uri(id) against the proxy address and it works. Roughly a third of production contracts use proxies, including most upgradeable ERC-1155 collections.
What if the metadata URI uses an IPFS gateway that times out?
The Inspector tries the URI as returned by the contract first. For ipfs:// URIs it falls back through a small list of public gateways. If none respond, the resolved URL is shown so you can open it directly or point your own application at a gateway you control.
Can I use this tool from my own application?
Yes. The same expression and contract address work against the public REST API. The free tier includes 2,000 reads per month, and a single inspection counts as one read because Multicall3 batches all the underlying calls into one round trip. Bring your own API key and the rate limit applied to this page no longer applies.
Limits and accuracy
- The result reflects the latest block at the time of the read. There is no historical replay.
- The metadata fetch runs from your browser. Some collections gate metadata behind authenticated origins, in which case only the on-chain values are shown.
- The demo is rate limited per browser. If you hit the limit, grab a free API key and the limit goes away.
- Image previews are loaded directly from the metadata image URL. If the gateway throttles or the image is missing, the preview is silently hidden.
- USD pricing, marketplace floor data, and royalty configuration are out of scope. evmquery returns raw on-chain values, not aggregated marketplace data.
Related
- Multicall3 batching for EVM contract reads — why one expression can replace dozens of
eth_callround trips - Read smart contracts in n8n — wire the same query into a no-code workflow
- Building an EVM blockchain MCP server — let Claude or Cursor inspect ERC-1155 collections in chat
- evmquery for developers — the full integration story