---
eip: 7832
label: ERC-7832
title: Sustainable collaborative NFT collections
status: Review
type: Standards Track
category: ERC
created: 2024-12-04
requires: 721
official: https://eips.ethereum.org/EIPS/eip-7832
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7832.md
canonical: https://eips.huatuo.xyz/ja/eip-7832/
lang: ja
tldr: 共同制作の NFT コレクション向けの ERC-721 拡張。有料のクリエイターロール、サイクル内でミント数が増えるほど下がるミント手数料、クリエイターへの寄付、固定の間隔でしか変更できない管理者条件を備える。
tags: [nft, erc-721, creators, fees, governance]
---

# ERC-7832: Sustainable collaborative NFT collections

> Economically sustainable collaborative NFT collections with dynamic fees and donation-based engagement.

**TL;DR:** 共同制作の NFT コレクション向けの ERC-721 拡張。有料のクリエイターロール、サイクル内でミント数が増えるほど下がるミント手数料、クリエイターへの寄付、固定の間隔でしか変更できない管理者条件を備える。

## 何を解決するのか

NFT コレクションの中には、1 人のアーティストではなく多数のクリエイターによって作られるものがあります。その運営では、誰がミントできるのか、少数のアカウントが供給を氾濫させないようにミントの価格をどう設定するか、支援者がどうクリエイターに直接資金を送れるか、管理者が好きなときに手数料を変えるのをどう防ぐか、といった問題が繰り返し起こります。

ERC-7832 は、これらへの答えを [ERC-721](/eip-721/) の上の 1 つのインターフェースにまとめます。

## 仕組み

**ロール。** 3 つのロール識別子があります。`ADMIN_ROLE`、`CREATOR_ROLE`、`CONTRIBUTOR_ROLE` です。デプロイヤーはコンストラクタで管理者とクリエイターのロールを得ます。

- 誰でも `getCreatorSignature()` を呼び、`creatorSignatureFee` を支払うことでクリエイターになれます。
- 誰でも（そのクリエイター本人を除く）クリエイターに ETH を `donate(creator)` できます。寄付者は `CONTRIBUTOR_ROLE` を受け取り、`DonationReceived` イベントが発行されます。

**ミント。** クリエイターだけが `safeMint(uri)` を呼べ、`mintFee()` を支払います。

- 管理者は無料でミントします。
- それ以外の場合、手数料は `mintBaseFee` を、呼び出し元が現在のサイクルで何回ミントしたかの対数（リファレンス実装では log2）で割ったものです。そのため、繰り返しミントするほど徐々に安くなります。
- クリエイターが `maxMintsPerUserInCycle` を超えると、そのカウンターはリセットされ、割引は最初からやり直しになります。

**安定した条件。** 管理者は `updateTerms` を通じて `mintBaseFee`、`creatorSignatureFee`、`maxMintsPerUserInCycle` を設定します。最初はコンストラクタで、その後は `UPDATE_INTERVAL` ごとに最大 1 回です。仕様は少なくとも 720 時間（30 日）を推奨しています。変更のたびに `CreatorTermsUpdated` が発行されます。

**管理者の権限。** `pause`/`unpause`、およびコントラクトが保持する資金の `withdraw(amount)` です。トークンの所有者は自分のトークンを `burn` できます。

## サンプルコード

インターフェースの中核部分（仕様から抜粋）:

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

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IERC7832 is IERC721 {
    event CreatorTermsUpdated(uint256 mintBaseFee, uint256 creatorSignatureFee, uint256 maxMintsPerUserInCycle);
    event DonationReceived(address from, address to, uint256 amount);

    function mintBaseFee() external view returns (uint256);
    function creatorSignatureFee() external view returns (uint256);
    function maxMintsPerUserInCycle() external view returns (uint256);
    function mintsPerUserInCycle(address user) external view returns (uint256);
    function mintFee() external view returns (uint256);
    function UPDATE_INTERVAL() external pure returns (uint256);

    function getCreatorSignature() external payable;
    function safeMint(string memory uri) external payable;
    function donate(address creator) external payable;
    function updateTerms(uint256 mintBaseFee, uint256 creatorSignatureFee, uint256 maxMintsPerUserInCycle) external;
    function withdraw(uint256 amount) external;
    function burn(uint256 tokenId) external;
    function pause() external;
    function unpause() external;
}
```

リファレンス実装の手数料計算（OpenZeppelin の `Math.log2`）:

```solidity
function mintFee() public view returns (uint256) {
    if (hasRole(ADMIN_ROLE, msg.sender)) return 0;
    uint256 userMints = mintsPerUserInCycle[msg.sender];
    uint256 divisor = userMints <= 1 ? 1 : Math.log2(userMints);
    return mintBaseFee / divisor;
}
```

## 知っておくべきこと

- ステータスは **Review** です。そのため、詳細はまだ変わる可能性があります。
- 整数の `log2` は切り捨てられます。過去のミントが 2 回または 3 回のとき、除数は 1 です。したがって、最初の実質的な割引は 4 回目のミント（半額）で現れます。
- 「クリエイター署名（creator signature）」は有料のロール付与であり、暗号学的な署名ではありません。
- ミント手数料とクリエイター手数料はコントラクトに支払われ、管理者はそこから ETH を `withdraw` できます。したがって管理者は信頼される主体です。寄付された ETH がどのようにクリエイターに届くかは、仕様に詳しく書かれていません。実装を確認してください。
- 仕様は、`safeMint`、`withdraw`、`donate` にリエントランシー対策を入れることを推奨しています。


---

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