---
eip: 5606
label: ERC-5606
title: Multiverse NFTs
status: Final
type: Standards Track
category: ERC
created: 2022-09-06
requires: 721, 1155
official: https://eips.ethereum.org/EIPS/eip-5606
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-5606.md
canonical: https://eips.huatuo.xyz/ko/eip-5606/
lang: ko
tldr: 플랫폼별 NFT를 내부에 보관함으로써 여러 게임과 메타버스에 걸친 하나의 디지털 아이템을 나타내는 래퍼 NFT. 전체 세트를 번들로 거래하거나 분리할 수 있다.
tags: [nft, interoperability, metaverse, gaming, bundle]
---

# ERC-5606: Multiverse NFTs

> A universal representation of multiple related NFTs as a single digital asset across various platforms

**TL;DR:** 플랫폼별 NFT를 내부에 보관함으로써 여러 게임과 메타버스에 걸친 하나의 디지털 아이템을 나타내는 래퍼 NFT. 전체 세트를 번들로 거래하거나 분리할 수 있다.

## 어떤 문제를 해결하나요?

세 개의 메타버스에서 가상 운동화를 출시하는 브랜드는 보통 플랫폼마다 서로 무관한 토큰을 세 개 민팅합니다. 온체인에는 이 토큰들이 "같은 운동화"라고 말해 주는 것이 없으므로 아이템의 실제 희소성을 증명하기 어렵고, 소유자는 각 사본을 따로 거래해야 합니다.

ERC-5606은 **멀티버스 NFT**를 추가합니다. 같은 자산에 대한 플랫폼별 "델리게이트" NFT([ERC-721](/eip-721/) 또는 [ERC-1155](/eip-1155/))를 소유하는 하나의 [ERC-721](/eip-721/) 토큰입니다. 멀티버스 NFT를 보유한다는 것은 그 아이템이 존재하는 모든 곳에서 그것을 보유한다는 뜻입니다.

## 어떻게 동작하나요?

각 델리게이트는 작은 struct로 기술됩니다.

| 필드 | 의미 |
| --- | --- |
| `contractAddress` | 플랫폼의 NFT 컨트랙트 |
| `tokenId` | 해당 플랫폼의 델리게이트 토큰 |
| `quantity` | 수량(ERC-1155 델리게이트에 해당) |

수명 주기는 세 단계입니다.

1. **`initBundle(delegateData[])`**은 호출자에게 새 멀티버스 NFT를 민팅하고 어떤 델리게이트 컨트랙트와 토큰 ID가 여기에 속하는지 고정합니다. 이 목록은 나중에 바꿀 수 없으며, 이로써 무관한 NFT가 번들에 끼어드는 것을 막습니다. 새 번들은 비어 있는 상태로 시작합니다.
2. **`bundle(delegateData[], multiverseTokenId)`**은 델리게이트 NFT를 멀티버스 컨트랙트로 가져옵니다. 소유자는 먼저 각 델리게이트 컬렉션에서 멀티버스 컨트랙트를 승인해야 합니다.
3. **`unbundle(delegateData[], multiverseTokenId)`**은 선택한 델리게이트를 호출자에게 돌려보내며, 호출자는 멀티버스 NFT를 소유해야 합니다. 그 뒤에는 각각 따로 판매하거나 사용할 수 있습니다.

`bundle`과 `unbundle`은 모두 배열을 받으므로 일부만 옮길 수 있습니다. 델리게이트 세 개로 초기화한 번들은 그 세 개 중 어느 것이든 한 번에 보유할 수 있지만, 그 밖의 것은 절대 보유할 수 없습니다. `delegateTokens(id)`는 번들의 델리게이트를 나열하고, `Bundled` / `Unbundled` 이벤트로 인덱서가 변경을 추적할 수 있습니다.

## 샘플 코드

스펙의 인터페이스:

```solidity
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.0;

interface IMultiverseNFT {
    struct DelegateData {
        address contractAddress;
        uint256 tokenId;
        uint256 quantity;
    }

    event Bundled(uint256 multiverseTokenID, DelegateData[] delegateData, address ownerAddress);
    event Unbundled(uint256 multiverseTokenID, DelegateData[] delegateData);

    function delegateTokens(uint256 multiverseTokenID) external view returns (DelegateData[] memory);
    function unbundle(DelegateData[] memory delegateData, uint256 multiverseTokenID) external;
    function bundle(DelegateData[] memory delegateData, uint256 multiverseTokenID) external;
    function initBundle(DelegateData[] memory delegateData) external;
}
```

스크립트로 두 플랫폼의 아이템 번들링하기(ethers v6):

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

const items = [
  { contractAddress: gameA, tokenId: 12n, quantity: 1n },
  { contractAddress: gameB, tokenId: 7n,  quantity: 1n },
];

// 1. approve the multiverse contract on each delegate collection
for (const it of items) {
  const nft = new Contract(it.contractAddress, ["function setApprovalForAll(address,bool)"], signer);
  await (await nft.setApprovalForAll(multiverseAddr, true)).wait();
}

// 2. create the bundle, then move the items into it
const mv = new Contract(multiverseAddr, abi, signer);
await (await mv.initBundle(items)).wait();
await (await mv.bundle(items, multiverseTokenId)).wait(); // id read from the Transfer event
```

## 알아둘 점

- 상태는 **Final**입니다. ERC-721/1155 위에 얹혀 있으므로 이를 무시하는 플랫폼에서는 일반 NFT로 보입니다.
- 스펙 본문은 `initBundle`이 새 토큰 ID를 반환한다고 하지만, 인터페이스는 반환값을 선언하지 않습니다. 대신 민팅 시의 `Transfer` 이벤트에서 ID를 읽으세요.
- `bundle`은 외부 NFT 컨트랙트를 호출하므로 구현은 재진입(reentrancy)에 대비해야 합니다.
- 이 표준은 토큰을 온체인에서 연결하지만, 게임들이 서로의 아이템을 인식하게 만들지는 않습니다. 각 플랫폼은 자신의 델리게이트 NFT를 어떻게 사용할지 여전히 스스로 결정합니다.
- 더 일반적인 "NFT가 NFT를 소유하는" 모델은 [ERC-998](/eip-998/) 같은 조합 가능 토큰 아이디어를 참고하세요.


---

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