---
eip: 7015
label: ERC-7015
title: NFT Creator Attribution
status: Review
type: Standards Track
category: ERC
created: 2023-05-11
requires: 55, 155, 712, 721, 1155
official: https://eips.ethereum.org/EIPS/eip-7015
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7015.md
canonical: https://eips.huatuo.xyz/ko/eip-7015/
lang: ko
tldr: NFT 컨트랙트가 배포 시 서명된 `CreatorAttribution` 이벤트를 발생시켜, 다른 누군가(스마트 지갑, 릴레이어, 첫 컬렉터)가 배포 비용을 냈더라도 플랫폼이 실제 크리에이터를 인정할 수 있게 한다.
tags: [nft, creator, attribution, eip-712, signatures]
---

# ERC-7015: NFT Creator Attribution

> Extending NFTs with cryptographically secured creator attribution.

**TL;DR:** NFT 컨트랙트가 배포 시 서명된 `CreatorAttribution` 이벤트를 발생시켜, 다른 누군가(스마트 지갑, 릴레이어, 첫 컬렉터)가 배포 비용을 냈더라도 플랫폼이 실제 크리에이터를 인정할 수 있게 한다.

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

NFT 플랫폼은 보통 컬렉션 컨트랙트를 배포한 사람을 그 크리에이터로 취급합니다. 이 방식은 점점 더 맞지 않게 되고 있습니다. 크리에이터가 스마트 지갑을 쓰거나, 플랫폼이 가스비를 대신 내거나, "레이지" 흐름에서 첫 컬렉터가 민팅할 때 컨트랙트를 배포하기도 합니다. 어느 경우든 배포자는 작가가 아니며, 엉뚱한 계정이 공을 인정받게 됩니다.

ERC-7015는 크리에이터가 생성 파라미터에 오프체인으로 서명하게 합니다. 누가 배포하든 컨트랙트가 그 서명을 검증하고, 플랫폼이 확인할 수 있는 이벤트에 기록합니다.

## 어떻게 동작하나요?

1. **크리에이터가 서명합니다.** 크리에이터는 생성 내용(예: 이름, 심볼, 메타데이터 URI, 가격)을 기술한 [EIP-712](/eip-712/) 타입 메시지에 서명합니다. 구조체는 앱이 정하며, 나중에 필요한 것은 그 해시(`structHash`)뿐입니다. EIP-712 도메인의 `verifyingContract`는 NFT 컨트랙트의 주소이며, 배포 전에 계산할 수 있습니다.
2. **컨트랙트가 검증하고 이벤트를 발생시킵니다.** 배포 트랜잭션 중에 NFT 컨트랙트가 서명을 확인하고 다음 이벤트를 발생시킵니다.

```solidity
event CreatorAttribution(
  bytes32 structHash,
  string domainName,
  string version,
  address creator,
  bytes signature
);
```

3. **플랫폼이 확인합니다.** 인덱서는 `domainName`, `version`, 체인 id, 이벤트를 발생시킨 컨트랙트(`verifyingContract`)로 EIP-712 다이제스트를 다시 만들고, `signature`에서 서명자를 복구합니다. 그것이 `creator`와 일치하면 공은 트랜잭션 발신자가 아니라 `creator`에게 **반드시** 돌아가야 합니다.

`chainId`와 `verifyingContract`는 트랜잭션과 이벤트 발생자에서 알 수 있으므로 이벤트에 들어 있지 않습니다. 레퍼런스 구현은 EOA뿐 아니라 [ERC-1271](/eip-1271/)을 통해 스마트 계정 크리에이터도 지원합니다.

## 샘플 코드

컨트랙트 측(레퍼런스 구현에서 발췌):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";

abstract contract ERC7015 is EIP712 {
    event CreatorAttribution(bytes32 structHash, string domainName, string version, address creator, bytes signature);
    error Invalid_Signature();

    constructor() EIP712("ERC7015", "1") {}

    function _attribute(bytes32 structHash, address creator, bytes memory sig) internal {
        bytes32 digest = _hashTypedDataV4(structHash);
        if (!SignatureChecker.isValidSignatureNow(creator, digest, sig)) revert Invalid_Signature(); // EOA or ERC-1271
        emit CreatorAttribution(structHash, "ERC7015", "1", creator, sig);
    }
}
```

플랫폼 측, 이벤트로 EOA 크리에이터 확인(ethers v6):

```ts
import { TypedDataEncoder, concat, keccak256, recoverAddress } from "ethers";

const { structHash, domainName, version, creator, signature } = log.args;
const domainSep = TypedDataEncoder.hashDomain({
  name: domainName, version, chainId, verifyingContract: log.address,
});
const digest = keccak256(concat(["0x1901", domainSep, structHash]));
const ok = recoverAddress(digest, signature).toLowerCase() === creator.toLowerCase();
```

## 알아둘 점

- **상태: Review.** 아직 Final이 아닙니다.
- 이벤트는 **배포 트랜잭션**에서 발생해야 하므로, 기존 NFT 컨트랙트는 사후에 도입할 수 없습니다.
- 이는 어떤 *주소*가 동의했음을 증명할 뿐, 그 뒤의 사람이 누구인지는 증명하지 않습니다.
- 크리에이터는 자신이 서명하는 내용을 읽어야 합니다. 피싱 사이트가 의도하지 않은 컬렉션의 귀속에 서명하도록 속일 수 있습니다.
- [ERC-5375](/eip-5375/)는 오프체인 데이터로 비슷한 문제를 다룹니다. ERC-7015는 증명을 완전히 온체인에 두며 컬렉션 전체를 포괄할 수 있습니다.


---

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