IndexCrypto
Educational only. Not financial, tax or legal advice, and nothing here is a recommendation to buy anything.

What an NFT Actually Is: Token, Metadata, Rights

An NFT is a token ID in a contract pointing to metadata, often stored off-chain. What ownership does and does not include, and why setApprovalForAll is risky.

An NFT is not an image. It is an entry in a smart contract: a token identifier, recorded against an owner address, inside a contract that follows a known interface. The image, the name, the traits and the link to anything else live somewhere else, referenced by a metadata URL that the contract returns when asked. Almost every surprise about NFTs — why a picture can disappear, why a purchase does not transfer copyright, why a royalty payment is optional in practice — follows from that split between the token on-chain and the description off-chain.

The token is a row in a contract, not a file

Two token standards cover most of the market. ERC-721 assigns each token a unique ID within one contract, so token 1 and token 2 are distinct entries with distinct owners. ERC-1155 uses IDs as well but allows a single ID to have a supply greater than one, which makes it suitable for editions and for mixed collections of fungible and non-fungible items in one contract.

Both standards expose the same core questions to any other contract or wallet: who owns token X, and what URI describes token X. On ERC-721 the functions are ownerOf(uint256) and tokenURI(uint256). On ERC-1155, balanceOf(address,uint256) and uri(uint256). A wallet displaying a collection is calling these and rendering the result. It holds no special knowledge; it reads the chain.

That means the authoritative record of who owns a token is the contract’s storage, not a marketplace’s database. If a marketplace shows a token as owned by an address, it is because the contract said so at the block it read.

What the metadata actually contains

The token URI usually resolves to a JSON document. The common fields are a name, a description, an image URL, and an attributes array of trait-type and value pairs. The JSON may also carry an animation URL for video or interactive content.

Where that JSON lives determines how durable the token’s description is:

  • On-chain. The contract returns the data directly, often base64-encoded. The description cannot be changed by anyone who does not control the contract, and it survives as long as the chain does. It is expensive to store and uncommon.
  • IPFS or another content-addressed store. The URI is a hash of the content. The content cannot be altered without changing the address, but it must still be pinned by someone. An unpinned file becomes unreachable even though the hash is intact.
  • A conventional web server. The URI is an ordinary HTTPS address. Whoever controls that server can change the image, the traits, or return nothing at all. The token still exists; its description does not.

A contract can also expose a base URI that the owner can rewrite, which changes the metadata for every token at once. Reading the contract’s source, or its verified code on a block explorer, is the only way to know which of these applies to a specific collection.

Reading a token’s metadata from a terminal

Foundry’s cast can query a contract directly, which is useful when a marketplace display and the chain disagree. Each command runs as written; substitute the contract address, token ID and an RPC endpoint.

cast call 0xCONTRACT "tokenURI(uint256)(string)" 1 --rpc-url https://RPC_URL

The output is the metadata URI for token 1. If it begins with ipfs://, the path after the prefix is a content identifier that a gateway can resolve; if it begins with https://, the description depends on that server.

cast call 0xCONTRACT "ownerOf(uint256)(address)" 1 --rpc-url https://RPC_URL

The output is the address the contract currently records as owner. This is the answer that matters in a dispute; a marketplace cache can lag.

cast call 0xCONTRACT "balanceOf(address)(uint256)" 0xOWNER --rpc-url https://RPC_URL

For an ERC-721 contract this returns how many tokens that address holds. For ERC-1155 the signature takes the token ID as well, and the same call shape returns the balance of that specific ID.

Source: https://getfoundry.sh/cast/reference/

Ownership of the token is not ownership of the work

Buying an NFT transfers the token. It does not, by default, transfer copyright, reproduction rights, or any licence to the underlying image. Those are granted, if at all, by a separate legal instrument — sometimes a licence statement published by the project, sometimes nothing.

A contract can encode a token-level licence, but most do not. The absence of a licence in the metadata is not an oversight to be worked around; it means the default position applies, and the default position in most jurisdictions is that the copyright stays with the creator. What the token holder controls is the token: the ability to transfer it, and whatever utility the contract attaches to holding it.

This distinction matters most for commercial use. A holder who assumes the token carries a right to print, sell or license the image is relying on a term that may exist only in a project’s marketing copy, which is not the same as a licence granted in the contract or in a signed agreement.

Royalties are a request the marketplace may ignore

ERC-721 has no royalty function. The standard defines ownership, transfer and approval; it says nothing about a creator’s share of secondary sales. Royalty enforcement is therefore a marketplace policy, implemented by reading a signal from the contract and choosing to pay it.

That signal is usually EIP-2981, which defines a royaltyInfo(uint256,uint256) function returning a receiver and an amount. A marketplace that supports it reads the figure and routes that portion of the sale. A marketplace that does not support it, or a transfer executed directly between two addresses, bypasses the payment entirely. The creator has no on-chain recourse, because no on-chain obligation exists.

Some contracts attempt stronger enforcement by restricting transfers to an allowlist of marketplace contracts, or by adding transfer hooks that revert unless a fee is paid. These approaches work only within the constraints the contract sets, and they can break legitimate transfers — including ordinary wallet-to-wallet sends — if the logic is narrow.

setApprovalForAll is the signature to read slowly

To sell a token on a marketplace, the seller must let the marketplace’s contract move the token. ERC-721 offers two ways to grant that permission: approve(address,uint256) for one token, and setApprovalForAll(address,bool) for every token the wallet holds in that contract, present and future.

Marketplaces ask for the second because it is one signature instead of many. The same property makes it the standard move in wallet-draining attacks: a site presents an approval request, the holder signs it, and the operator address can then transfer every token in that collection without a further prompt. The approval persists until it is revoked.

Two habits reduce the exposure. First, read the operator address in the request and confirm it matches the marketplace actually being used. Second, revoke approvals that are no longer needed; block explorers and several independent tools expose a revoke function that sends approve(address(0),tokenId) or setApprovalForAll(operator,false).

cast decode-calldata "setApprovalForAll(address,bool)" 0xCALLDATA

The output names the operator and the boolean being set. A true against an address that is not the marketplace in front of the reader is the moment to stop.

Source: https://getfoundry.sh/cast/reference/decode-calldata

If a selector is unfamiliar, cast 4byte <selector> returns candidate signatures for it, which is enough to tell an approval apart from a transfer.

Source: https://getfoundry.sh/cast/reference/4byte

Where an NFT can fail without the token changing hands

SituationWhat happensWhen this does not apply
Metadata hosted on a mutable serverThe image or traits can change, or 404, while ownership is unchangedThe contract stores metadata on-chain or behind a content hash
IPFS content no longer pinnedThe URI resolves to nothing until someone re-pins the contentA pinning service or the project maintains the file
Royalty expected on a secondary saleThe marketplace may not pay it; direct transfers bypass it entirelyThe contract enforces the fee in a transfer hook
Approval granted to a malicious operatorTokens in that contract can be moved without further signaturesThe approval was for a single token ID, or has been revoked
Copyright assumed to transferNo licence exists unless one was separately grantedThe project published an explicit licence covering the work

Why a token can outlive its picture

The token is a small piece of state on a distributed ledger, replicated across every node. The picture is a file on a server or a content-addressed network, maintained by whoever pays for it. These have different lifetimes, and the gap between them is where most disappointment lives.

A collection whose metadata sits on a conventional server is one expired domain or one changed configuration away from a wall of blank tiles, with every token still owned by exactly the address that owned it before. Nothing about that outcome is a hack or a bug in the standard; it is the predictable result of storing the description somewhere the token does not control.

When evaluating a collection, the question to ask is not what the image looks like now, but where the metadata lives, who can change it, and what happens to it if that party stops paying. The contract’s tokenURI implementation answers all three.

Common questions

Does owning an NFT mean I own the image?

No. The token is a record in a contract; the copyright in the artwork stays with its creator unless a separate licence grants otherwise. Some projects publish licence terms, but those are a legal instrument outside the token, not a property of it.

Why did my NFT's picture disappear?

The metadata URI most likely pointed at a server or an unpinned content-addressed file that is no longer reachable. The token itself is still owned by the same address; only the description it points to has failed to resolve.

Do creators always get royalties on resales?

No. ERC-721 has no royalty mechanism, so payment depends on the marketplace choosing to honour the EIP-2981 signal or a similar convention. Direct transfers between wallets bypass it entirely.

What does setApprovalForAll actually let someone do?

It authorises an operator address to transfer every token the wallet holds in that contract, including tokens received later, without another signature. It is the standard approval marketplaces request and the standard target of wallet-draining sites.

Can I check who owns a token without a marketplace?

Yes. Calling ownerOf with the token ID against the contract address returns the recorded owner directly from chain state, which is the authoritative answer regardless of what any interface displays.

Read next