---
eip: 6604
label: ERC-6604
title: Abstract Token
status: Draft
type: Standards Track
category: ERC
created: 2023-03-03
requires: 20, 165, 721, 1155
official: https://eips.ethereum.org/EIPS/eip-6604
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6604.md
canonical: https://eips.huatuo.xyz/ko/eip-6604/
lang: ko
tldr: "서명되거나 증명된 메시지로 오프체인에 존재하다가 필요할 때만 온체인에서 \"구체화(reify)\"되는 토큰의 초안 표준. 대규모 에어드롭과 자격 증명을 민팅 비용 없이 배포할 수 있다."
tags: [token, airdrop, minting, off-chain, draft]
---

# ERC-6604: Abstract Token

> move tokens on- and off-chain as desired, enabling zero-cost minting while preserving on-chain composability

**TL;DR:** 서명되거나 증명된 메시지로 오프체인에 존재하다가 필요할 때만 온체인에서 "구체화(reify)"되는 토큰의 초안 표준. 대규모 에어드롭과 자격 증명을 민팅 비용 없이 배포할 수 있다.

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

민팅에는 가스비가 듭니다. 에어드롭, POAP 방식의 영수증, 접근 자격처럼 물량은 많고 가치는 낮은 배포에서 모든 토큰을 미리 민팅하는 것은 낭비입니다. 수령자 중 상당수가 토큰을 쓰지 않는다면 더욱 그렇습니다.

프로젝트들은 이미 Merkle 트리 클레임으로 이를 우회하고 있지만, 클레임 컨트랙트마다 증명 형식과 UI가 달라서 별도 연동 없이는 지갑이 사용자에게 "받을 수 있는 토큰이 있습니다"라고 알려줄 수도 없습니다.

ERC-6604는 **추상 토큰(abstract token)**을 정의합니다. 토큰은 누구나 검사할 수 있는 오프체인 *메시지*로 존재할 수 있으며, 누군가 이를 제출할 때에야 비로소 일반 온체인 [ERC-20](/eip-20/), [ERC-721](/eip-721/), [ERC-1155](/eip-1155/) 잔액이 됩니다.

## 어떻게 동작하나요?

**토큰 메시지.** 토큰의 오프체인 형태입니다.

```solidity
struct AbstractTokenMessage {
  uint256 chainId;        // where it can be reified
  address implementation; // which contract
  address owner;          // who receives it
  bytes   meta;           // implementation-specific: id, amount, uri…
  uint256 nonce;          // distinguishes otherwise-identical messages
  bytes   proof;          // Merkle proof, signature, etc.
}
```

**토큰 컨트랙트의 핵심 메서드:**

- `reify(message)`: 증명을 검증하고 온체인에서 토큰을 민팅합니다. 각 메시지는 최대 한 번만 사용할 수 있으며 `Reify`를 emit합니다.
- `status(message)`: `invalid`, `valid`, `used` 중 하나를 반환하므로, 지갑은 아무것도 민팅되기 전에 대기 중인 토큰을 보여줄 수 있습니다.
- `dereify(message)`(선택): 온체인 토큰을 소각하고 *다른* 컨트랙트나 체인용 메시지로 되돌립니다. `Dereify`를 emit합니다.
- `id`, `amount`, `uri`(선택): `meta`를 파싱하지 않고도 메시지가 나타내는 내용을 읽습니다.

컨트랙트는 [ERC-165](/eip-165/)를 지원해야 합니다. ERC-20/721/1155의 추상 버전은 메시지를 추가 인자로 받는 오버로드된 전송 함수를 더하므로, 수령자는 한 번의 호출로 reify와 전송을 할 수 있습니다.

`meta`와 `proof`는 의도적으로 단순한 bytes이므로, 어떤 자격 확인 방식(Merkle 트리, 발행자 서명, 새로운 방식)이든 들어맞습니다.

## 샘플 코드

지갑이 추상 에어드롭을 확인하고 클레임하는 예(ethers v6):

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

const abi = [
  "function status((uint256 chainId,address implementation,address owner,bytes meta,uint256 nonce,bytes proof)) view returns (uint8)",
  "function amount((uint256,address,address,bytes,uint256,bytes)) view returns (uint256)",
  "function reify((uint256,address,address,bytes,uint256,bytes))",
];
const provider = new JsonRpcProvider(process.env.RPC_URL);
const token = new Contract(tokenAddress, abi, new Wallet(process.env.PRIVATE_KEY!, provider));

// `msg` was handed to the user off-chain, e.g. by the project's API
const msg = [chainId, tokenAddress, owner, meta, nonce, proof];
const s = await token.status(msg);            // 0 invalid, 1 valid, 2 used
if (s === 1n) {
  console.log("claimable:", await token.amount(msg));
  await (await token.reify(msg)).wait();
}
```

## 알아둘 점

- 상태는 **Draft**입니다. 이름과 시그니처는 바뀔 수 있습니다.
- **메시지를 잃으면 토큰을 잃습니다.** reify되기 전까지 토큰은 메시지일 뿐입니다. 발행자는 사용자를 위해 메시지를 보관해야 하며, 이상적으로는 지갑이 메시지를 보관하는 것이 좋습니다.
- 컨트랙트가 이미 사용된 메시지에서 revert하면, 사본을 가진 누구든 프론트러닝으로 소유자 본인의 reify 호출을 방해할 수 있습니다. 그래서 명세는 사용된 메시지를 revert하는 대신 아무 일도 하지 않고 성공하도록 허용합니다.
- dereify/reify만으로 브리지를 구성하는 것은 안전하지 않습니다. 체인 B는 메시지가 체인 A에서 dereify되었는지 알 수 없으므로, 이중 사용을 막으려면 오라클이 필요합니다.
- 증명 방식은 명세의 범위 밖입니다. 총 공급량을 감사할 수 있는지는 전적으로 구현의 선택에 달려 있습니다.


---

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