---
eip: 5773
label: ERC-5773
title: Context-Dependent Multi-Asset Tokens
status: Final
type: Standards Track
category: ERC
created: 2022-10-10
requires: 165, 721
official: https://eips.ethereum.org/EIPS/eip-5773
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-5773.md
canonical: https://eips.huatuo.xyz/eip-5773/
lang: en
tldr: Lets a single NFT carry several prioritised assets (image, 3D model, PDF, firmware…) so each app can pick the right one, with new assets added only by issuer proposal plus owner acceptance.
tags: [nft, metadata, multi-asset, gaming, extension]
---

# ERC-5773: Context-Dependent Multi-Asset Tokens

> An interface for Multi-Asset tokens with context dependent asset type output controlled by owner's preference.

**TL;DR:** Lets a single NFT carry several prioritised assets (image, 3D model, PDF, firmware…) so each app can pick the right one, with new assets added only by issuer proposal plus owner acceptance.

## What problem does it solve?

An [ERC-721](/eip-721/) token has one `tokenURI`. That is awkward when the same item should look different depending on where it is used: an e-book NFT should open as a PDF in a reader, an MP3 in an audiobook app and a cover image on a marketplace; a game item may need a different model file for each game.

The usual workaround, changing the `tokenURI`, also has a trust problem: the issuer can silently swap what the owner holds, and the history is lost. ERC-5773 introduces **multi-asset NFTs**: one token, many outputs, ordered by the owner, with an explicit propose-and-accept flow for changes.

## How it works

- **Assets** are stored once in the contract under a `uint64` asset ID, each pointing to a metadata URI. A token holds arrays of asset IDs by reference, so the same asset can be attached to many tokens cheaply.
- **Pending vs active.** The issuer (or another authorised party) adds an asset to a token's *pending* list (`AssetAddedToTokens`). The token owner then calls `acceptAsset` to move it to the *active* list, or `rejectAsset` / `rejectAllAssets` to drop it. The pending list should be capped (the spec suggests 128) to prevent spam.
- **Replacement.** A proposed asset can name an existing asset it replaces (`getAssetReplacements`). On acceptance it takes that asset's place, which supports "evolution" or firmware-update style flows while keeping the lineage visible on-chain.
- **Priorities.** `setPriority` lets the owner order active assets; lower values mean higher priority. Consumers read `getActiveAssets` and `getActiveAssetPriorities`, then `getAssetMetadata(tokenId, assetId)` for the URI.
- **Asset approvals** (`approveForAssets`, `setApprovalForAllForAssets`) are separate from transfer approvals and are cleared when the token is transferred.
- Accept/reject calls pass both an array `index` and the expected `assetId`, giving constant gas cost while guarding against the array shifting underneath the call.

The interface's [ERC-165](/eip-165/) ID is `0x06b4329a`.

## Sample code

Picking the highest-priority asset for display (ethers v6):

```ts
import { Contract, JsonRpcProvider } from "ethers";

const abi = [
  "function getActiveAssets(uint256) view returns (uint64[])",
  "function getActiveAssetPriorities(uint256) view returns (uint64[])",
  "function getAssetMetadata(uint256,uint64) view returns (string)",
];
const nft = new Contract(nftAddress, abi, new JsonRpcProvider(process.env.RPC_URL));

const ids: bigint[] = await nft.getActiveAssets(tokenId);
const prios: bigint[] = await nft.getActiveAssetPriorities(tokenId);
if (ids.length > 0) {
  let best = 0;
  prios.forEach((p, i) => { if (p < prios[best]) best = i; }); // lowest = top priority
  console.log(await nft.getAssetMetadata(tokenId, ids[best]));
}
```

Owner accepting a pending asset (Solidity call):

```solidity
uint64[] memory pending = IERC5773(nft).getPendingAssets(tokenId);
IERC5773(nft).acceptAsset(tokenId, 0, pending[0]); // index + expected id
```

## Things to know

- Status is **Final**. It is fully compatible with ERC-721, so ordinary wallets still see a normal NFT.
- The suggested asset-metadata JSON (`mediaUri`, `thumbnailUri`, `attributes`, …) is optional; implementers may structure it differently.
- Active assets cannot simply be deleted by the issuer; they can only be replaced through an accepted proposal, which is the main trust guarantee.
- The same author group built related standards on top: nestable NFTs in [ERC-6059](/eip-6059/) and equippable parts in [ERC-6220](/eip-6220/).
- As with any NFT contract, unaudited implementations may hide logic in add/accept/burn functions.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-5773
