{"eip":6220,"title":"Composable NFTs utilizing Equippable Parts","description":"An interface for Composable non-fungible tokens through fixed and slot parts equipping.","authors":["Bruno Škvorc (@Swader)","Cicada (@CicadaNCR)","Steven Pineda (@steven2308)","Stevan Bogosavljevic (@stevyhacker)","Jan Turk (@ThunderDeliverer)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2022-12-20","requires":[165,721,5773,6059],"discussionsTo":"https://ethereum-magicians.org/t/eip-6220-composable-nfts-utilizing-equippable-parts/12289","repo":"ERCs","label":"ERC-6220","officialUrl":"https://eips.ethereum.org/EIPS/eip-6220","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6220.md","url":"https://eips.huatuo.xyz/eip-6220/","tldr":{"en":"Lets an NFT be built from parts in a shared Catalog and equip other NFTs it owns into slots, so composites like game avatars with swappable gear are defined on-chain and an item can only be worn by one token at a time.","ja":"NFT を共有 Catalog のパーツから構築し、自分が所有する他の NFT をスロットに装備できるようにする。スワップ可能な装備を持つゲームのアバターのような複合体がオンチェーンで定義され、アイテムは同時に 1 つのトークンにしか装着できない。","ko":"NFT를 공유 Catalog의 파트로 구성하고, 자신이 소유한 다른 NFT를 슬롯에 장착할 수 있게 한다. 교체 가능한 장비를 가진 게임 아바타 같은 합성물이 온체인에서 정의되며, 아이템은 한 번에 하나의 토큰만 착용할 수 있다.","zh":"让 NFT 由共享 Catalog 中的部件构成，并把它所拥有的其他 NFT 装备到插槽中，因此像带有可更换装备的游戏头像这样的组合体可以在链上定义，且一件物品同一时间只能被一个代币穿戴。"},"tags":["nft","composable","equippable","gaming","catalog"],"explainers":{"en":{"lang":"en","tldr":"Lets an NFT be built from parts in a shared Catalog and equip other NFTs it owns into slots, so composites like game avatars with swappable gear are defined on-chain and an item can only be worn by one token at a time.","tags":["nft","composable","equippable","gaming","catalog"],"related":[721,5773,6059,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-6220/","markdown":"## What problem does it solve?\n\nNFT projects often want tokens made of pieces: an avatar with a background, a body, a hat and a weapon. Without a standard, the pieces are tracked in a private database, or a game simply looks at every NFT in your wallet and guesses which ones to use. That also means one \"hat\" NFT can appear on 500 avatars in 500 games at once, so scarcity is only cosmetic.\n\nERC-6220 puts composition on-chain. The token itself records which parts it shows and which child NFTs are equipped in which slots, and an item equipped in one token cannot be equipped elsewhere at the same time.\n\n## How it works\n\nIt builds on two earlier standards from the same authors:\n\n- [ERC-5773](/eip-5773/) **multi-asset**: one token can have several assets (renderings or metadata), for example a 2D and a 3D version.\n- [ERC-6059](/eip-6059/) **nestable**: an NFT can own other NFTs as children.\n\nERC-6220 adds a **Catalog** contract that defines **parts**, each with a `z` layer for rendering order and a `metadataURI`:\n\n- **Fixed parts** — the same for every token that uses them (a frame, a body). Defined once, never replaced.\n- **Slot parts** — an empty slot (say, \"hat\") into which NFTs from approved collections can be equipped. The catalog lists which collections are allowed (`checkIsEquippable`, `checkIsEquippableToAll`).\n\nA token asset points to a catalog and a list of part ids (`getAssetAndEquippableData`). To fill a slot, the owner first nests the child NFT into the parent, then calls `equip({tokenId, childIndex, assetId, slotPartId, childAssetId})`. The child collection must have marked its asset group as valid for that parent and slot (`ValidParentEquippableGroupIdSet`). `unequip` reverses it. Equipping does not mint anything; it just adds a component to render.\n\n`isChildEquipped` lets the contract block transferring a child while it is equipped. That is the scarcity guarantee.\n\n## Sample code\n\nEquipping a hat and reading what is in the slot (ethers v6):\n\n```ts\n// 1. hat NFT has already been nested into avatar #7 via ERC-6059 (it is child index 0)\nawait avatar.equip({\n  tokenId: 7n,\n  childIndex: 0n,\n  assetId: 1n,       // the avatar asset that uses the catalog\n  slotPartId: 3n,    // \"hat\" slot in the catalog\n  childAssetId: 2n,  // the hat's asset designed for this slot\n});\n\nconst eq = await avatar.getEquipment(7n, catalogAddress, 3n);\nconsole.log(eq.childEquippableAddress, eq.childId);\n\nconst [uri, groupId, catalog, partIds] = await avatar.getAssetAndEquippableData(7n, 1n);\n```\n\nCatalog part model from the spec:\n\n```solidity\nenum ItemType { None, Slot, Fixed }\n\nstruct Part {\n    ItemType itemType;\n    uint8 z;                  // render layer\n    address[] equippable;     // collections allowed in this slot\n    string metadataURI;\n}\n```\n\n## Things to know\n\n- **Status: Final.** ERC-165 id of `IERC6220` is `0x28bc9ae4`.\n- Implementing it means implementing ERC-721, ERC-5773 and ERC-6059 as well, which is a fairly large contract surface.\n- There is no built-in \"list all equipped parts\" call; use events or an indexer.\n- Composites are only as trustworthy as the catalog owner and the collections it allows. Audit equip/accept/burn logic as you would any NFT contract.\n- Final rendering of the layered image happens off-chain from the part metadata.\n"},"ja":{"lang":"ja","tldr":"NFT を共有 Catalog のパーツから構築し、自分が所有する他の NFT をスロットに装備できるようにする。スワップ可能な装備を持つゲームのアバターのような複合体がオンチェーンで定義され、アイテムは同時に 1 つのトークンにしか装着できない。","tags":["nft","composable","equippable","gaming","catalog"],"related":[721,5773,6059,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-6220/","markdown":"## 何を解決するのか\n\nNFT プロジェクトでは、パーツから成るトークンを作りたいことがよくあります。背景、体、帽子、武器を持つアバターなどです。標準がなければ、パーツは非公開のデータベースで管理されるか、ゲームがウォレット内のすべての NFT を見て、どれを使うか推測するだけになります。それは、1 つの「帽子」NFT が 500 のゲームの 500 のアバターに同時に現れうるということでもあり、希少性は見かけだけになります。\n\nERC-6220 は、組み合わせをオンチェーンに置きます。トークン自身が、どのパーツを表示するか、どの子 NFT がどのスロットに装備されているかを記録し、あるトークンに装備されたアイテムは、同時に他の場所には装備できません。\n\n## 仕組み\n\n同じ著者による 2 つの先行標準の上に成り立っています。\n\n- [ERC-5773](/eip-5773/) **multi-asset**: 1 つのトークンが複数のアセット（表現やメタデータ）を持てます。たとえば 2D 版と 3D 版などです。\n- [ERC-6059](/eip-6059/) **nestable**: NFT が他の NFT を子として所有できます。\n\nERC-6220 は、**パーツ**を定義する **Catalog** コントラクトを追加します。各パーツには、描画順を示す `z` レイヤーと `metadataURI` があります。\n\n- **固定パーツ** — それを使うすべてのトークンで同じもの（フレーム、体など）。一度定義され、置き換えられません。\n- **スロットパーツ** — 空のスロット（たとえば「帽子」）で、承認されたコレクションの NFT を装備できます。どのコレクションが許可されるかは catalog が列挙します（`checkIsEquippable`、`checkIsEquippableToAll`）。\n\nトークンのアセットは、catalog とパーツ ID のリストを指します（`getAssetAndEquippableData`）。スロットを埋めるには、所有者がまず子 NFT を親にネストし、次に `equip({tokenId, childIndex, assetId, slotPartId, childAssetId})` を呼びます。子のコレクションは、そのアセットグループをその親とスロットに対して有効としてマークしておく必要があります（`ValidParentEquippableGroupIdSet`）。`unequip` はこれを元に戻します。装備しても何かがミントされるわけではなく、描画するコンポーネントが追加されるだけです。\n\n`isChildEquipped` により、コントラクトは装備中の子の転送をブロックできます。これが希少性の保証です。\n\n## サンプルコード\n\n帽子を装備し、スロットの中身を読む（ethers v6）:\n\n```ts\n// 1. hat NFT has already been nested into avatar #7 via ERC-6059 (it is child index 0)\nawait avatar.equip({\n  tokenId: 7n,\n  childIndex: 0n,\n  assetId: 1n,       // the avatar asset that uses the catalog\n  slotPartId: 3n,    // \"hat\" slot in the catalog\n  childAssetId: 2n,  // the hat's asset designed for this slot\n});\n\nconst eq = await avatar.getEquipment(7n, catalogAddress, 3n);\nconsole.log(eq.childEquippableAddress, eq.childId);\n\nconst [uri, groupId, catalog, partIds] = await avatar.getAssetAndEquippableData(7n, 1n);\n```\n\n仕様の catalog のパーツモデル:\n\n```solidity\nenum ItemType { None, Slot, Fixed }\n\nstruct Part {\n    ItemType itemType;\n    uint8 z;                  // render layer\n    address[] equippable;     // collections allowed in this slot\n    string metadataURI;\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Final。** `IERC6220` の ERC-165 ID は `0x28bc9ae4` です。\n- 実装するには ERC-721、ERC-5773、ERC-6059 も実装する必要があり、コントラクトの規模はかなり大きくなります。\n- 「装備中のすべてのパーツを一覧する」呼び出しは組み込まれていません。イベントやインデクサーを使ってください。\n- 複合体の信頼性は、catalog の所有者と、それが許可するコレクションの信頼性次第です。equip/accept/burn のロジックは、他の NFT コントラクトと同様に監査してください。\n- レイヤー化された画像の最終的なレンダリングは、パーツのメタデータをもとにオフチェーンで行われます。\n"},"ko":{"lang":"ko","tldr":"NFT를 공유 Catalog의 파트로 구성하고, 자신이 소유한 다른 NFT를 슬롯에 장착할 수 있게 한다. 교체 가능한 장비를 가진 게임 아바타 같은 합성물이 온체인에서 정의되며, 아이템은 한 번에 하나의 토큰만 착용할 수 있다.","tags":["nft","composable","equippable","gaming","catalog"],"related":[721,5773,6059,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-6220/","markdown":"## 어떤 문제를 해결하나요?\n\nNFT 프로젝트는 종종 조각으로 이루어진 토큰을 원합니다. 배경, 몸, 모자, 무기가 있는 아바타 같은 것입니다. 표준이 없으면 조각은 비공개 데이터베이스에서 추적되거나, 게임이 지갑에 있는 모든 NFT를 보고 어떤 것을 쓸지 추측할 뿐입니다. 이는 \"모자\" NFT 하나가 500개 게임의 500개 아바타에 동시에 나타날 수 있다는 뜻이기도 해서, 희소성은 겉보기뿐입니다.\n\nERC-6220은 조합을 온체인에 둡니다. 토큰 자체가 어떤 파트를 보여 주는지, 어떤 자식 NFT가 어떤 슬롯에 장착되어 있는지를 기록하며, 한 토큰에 장착된 아이템은 동시에 다른 곳에 장착할 수 없습니다.\n\n## 어떻게 동작하나요?\n\n같은 저자들의 이전 표준 두 가지를 기반으로 합니다.\n\n- [ERC-5773](/eip-5773/) **multi-asset**: 토큰 하나가 여러 에셋(렌더링 또는 메타데이터)을 가질 수 있습니다. 예를 들어 2D 버전과 3D 버전입니다.\n- [ERC-6059](/eip-6059/) **nestable**: NFT가 다른 NFT를 자식으로 소유할 수 있습니다.\n\nERC-6220은 **파트**를 정의하는 **Catalog** 컨트랙트를 추가합니다. 각 파트에는 렌더링 순서를 나타내는 `z` 레이어와 `metadataURI`가 있습니다.\n\n- **고정 파트** — 그것을 쓰는 모든 토큰에 똑같은 것(프레임, 몸). 한 번 정의되며 교체되지 않습니다.\n- **슬롯 파트** — 빈 슬롯(예: \"모자\")으로, 승인된 컬렉션의 NFT를 장착할 수 있습니다. catalog가 허용되는 컬렉션을 나열합니다(`checkIsEquippable`, `checkIsEquippableToAll`).\n\n토큰 에셋은 catalog와 파트 id 목록을 가리킵니다(`getAssetAndEquippableData`). 슬롯을 채우려면 소유자가 먼저 자식 NFT를 부모에 중첩한 뒤 `equip({tokenId, childIndex, assetId, slotPartId, childAssetId})`를 호출합니다. 자식 컬렉션은 자신의 에셋 그룹을 해당 부모와 슬롯에 유효하다고 표시해 두어야 합니다(`ValidParentEquippableGroupIdSet`). `unequip`은 이를 되돌립니다. 장착은 아무것도 민팅하지 않으며, 렌더링할 구성 요소를 추가할 뿐입니다.\n\n`isChildEquipped`를 통해 컨트랙트는 장착 중인 자식의 전송을 막을 수 있습니다. 이것이 희소성의 보장입니다.\n\n## 샘플 코드\n\n모자를 장착하고 슬롯에 들어 있는 것 읽기(ethers v6):\n\n```ts\n// 1. hat NFT has already been nested into avatar #7 via ERC-6059 (it is child index 0)\nawait avatar.equip({\n  tokenId: 7n,\n  childIndex: 0n,\n  assetId: 1n,       // the avatar asset that uses the catalog\n  slotPartId: 3n,    // \"hat\" slot in the catalog\n  childAssetId: 2n,  // the hat's asset designed for this slot\n});\n\nconst eq = await avatar.getEquipment(7n, catalogAddress, 3n);\nconsole.log(eq.childEquippableAddress, eq.childId);\n\nconst [uri, groupId, catalog, partIds] = await avatar.getAssetAndEquippableData(7n, 1n);\n```\n\n사양의 catalog 파트 모델:\n\n```solidity\nenum ItemType { None, Slot, Fixed }\n\nstruct Part {\n    ItemType itemType;\n    uint8 z;                  // render layer\n    address[] equippable;     // collections allowed in this slot\n    string metadataURI;\n}\n```\n\n## 알아둘 점\n\n- **상태: Final.** `IERC6220`의 ERC-165 id는 `0x28bc9ae4`입니다.\n- 이를 구현하려면 ERC-721, ERC-5773, ERC-6059도 함께 구현해야 하므로 컨트랙트 규모가 상당히 큽니다.\n- \"장착된 모든 파트 나열\"을 위한 내장 호출은 없습니다. 이벤트나 인덱서를 사용하세요.\n- 합성물은 catalog 소유자와 그가 허용하는 컬렉션만큼만 신뢰할 수 있습니다. equip/accept/burn 로직은 다른 NFT 컨트랙트와 마찬가지로 감사하세요.\n- 레이어가 쌓인 이미지의 최종 렌더링은 파트 메타데이터를 바탕으로 오프체인에서 이루어집니다.\n"},"zh":{"lang":"zh","tldr":"让 NFT 由共享 Catalog 中的部件构成，并把它所拥有的其他 NFT 装备到插槽中，因此像带有可更换装备的游戏头像这样的组合体可以在链上定义，且一件物品同一时间只能被一个代币穿戴。","tags":["nft","composable","equippable","gaming","catalog"],"related":[721,5773,6059,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-6220/","markdown":"## 它解决什么问题？\n\nNFT 项目常常希望代币由多个部分组成：带有背景、身体、帽子和武器的头像。没有标准的话，这些部件要么记录在私有数据库中，要么游戏只是查看你钱包里的每个 NFT 并猜测该用哪些。这也意味着同一件\"帽子\"NFT 可以同时出现在 500 个游戏的 500 个头像上，稀缺性只是表面上的。\n\nERC-6220 把组合放到链上。代币本身记录它展示哪些部件，以及哪些子 NFT 装备在哪些插槽中，而在一个代币上装备的物品不能同时装备到别处。\n\n## 它如何运作\n\n它建立在同一批作者的两个早期标准之上：\n\n- [ERC-5773](/eip-5773/) **multi-asset**：一个代币可以有多个资产（渲染或元数据），例如 2D 版本和 3D 版本。\n- [ERC-6059](/eip-6059/) **nestable**：一个 NFT 可以把其他 NFT 作为子项拥有。\n\nERC-6220 新增了一个定义**部件**的 **Catalog** 合约，每个部件都有表示渲染顺序的 `z` 层和一个 `metadataURI`：\n\n- **固定部件** — 对使用它们的每个代币都相同（边框、身体）。只定义一次，永不替换。\n- **插槽部件** — 一个空插槽（比如\"帽子\"），获批合集中的 NFT 可以装备进去。catalog 列出允许哪些合集（`checkIsEquippable`、`checkIsEquippableToAll`）。\n\n代币资产指向一个 catalog 和一组部件 id（`getAssetAndEquippableData`）。要填充插槽，所有者先把子 NFT 嵌套到父 NFT 中，再调用 `equip({tokenId, childIndex, assetId, slotPartId, childAssetId})`。子合集必须已将其资产组标记为对该父项和插槽有效（`ValidParentEquippableGroupIdSet`）。`unequip` 则反向操作。装备不会铸造任何东西，只是添加一个要渲染的组件。\n\n`isChildEquipped` 让合约可以在子项被装备期间阻止其转移。这就是稀缺性的保证。\n\n## 示例代码\n\n装备一顶帽子并读取插槽中的内容（ethers v6）：\n\n```ts\n// 1. hat NFT has already been nested into avatar #7 via ERC-6059 (it is child index 0)\nawait avatar.equip({\n  tokenId: 7n,\n  childIndex: 0n,\n  assetId: 1n,       // the avatar asset that uses the catalog\n  slotPartId: 3n,    // \"hat\" slot in the catalog\n  childAssetId: 2n,  // the hat's asset designed for this slot\n});\n\nconst eq = await avatar.getEquipment(7n, catalogAddress, 3n);\nconsole.log(eq.childEquippableAddress, eq.childId);\n\nconst [uri, groupId, catalog, partIds] = await avatar.getAssetAndEquippableData(7n, 1n);\n```\n\n规范中的 catalog 部件模型：\n\n```solidity\nenum ItemType { None, Slot, Fixed }\n\nstruct Part {\n    ItemType itemType;\n    uint8 z;                  // render layer\n    address[] equippable;     // collections allowed in this slot\n    string metadataURI;\n}\n```\n\n## 需要注意\n\n- **状态：Final。** `IERC6220` 的 ERC-165 id 是 `0x28bc9ae4`。\n- 实现它意味着还要实现 ERC-721、ERC-5773 和 ERC-6059，合约的接口面相当大。\n- 没有内置的\"列出所有已装备部件\"的调用；请使用事件或索引器。\n- 组合体的可信度取决于 catalog 所有者及其允许的合集。请像审计任何 NFT 合约一样审计 equip/accept/burn 逻辑。\n- 分层图像的最终渲染在链下根据部件元数据完成。\n"}}}
