{"eip":2309,"title":"ERC-721 Consecutive Transfer Extension","description":"A standardized event emitted when creating/transferring one, or many non-fungible tokens using consecutive token identifiers.","authors":["Sean Papanikolas (@pizzarob)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2019-10-08","requires":[721],"discussionsTo":"https://github.com/ethereum/EIPs/issues/2309","repo":"ERCs","label":"ERC-2309","officialUrl":"https://eips.ethereum.org/EIPS/eip-2309","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2309.md","url":"https://eips.huatuo.xyz/eip-2309/","tldr":{"en":"An optional ERC-721 event, ConsecutiveTransfer, that reports the mint, transfer or burn of a whole range of token IDs in one log, so huge NFT batches don't need one Transfer event per token.","ja":"ERC-721 のオプションイベント ConsecutiveTransfer。トークン ID の範囲全体のミント・転送・バーンを 1 つのログで報告し、巨大な NFT バッチでもトークンごとに Transfer イベントを出さなくて済むようにする。","ko":"선택적 ERC-721 이벤트 ConsecutiveTransfer. 토큰 ID 범위 전체의 민팅, 전송, 소각을 로그 하나로 알려, 거대한 NFT 배치에서도 토큰마다 Transfer 이벤트를 내지 않아도 되게 한다.","zh":"一个可选的 ERC-721 事件 ConsecutiveTransfer，用一条日志报告整段 token ID 的铸造、转移或销毁，使超大规模的 NFT 批量操作不必为每个代币发出一个 Transfer 事件。"},"tags":["nft","erc721","events","batch","minting"],"explainers":{"en":{"lang":"en","tldr":"An optional ERC-721 event, ConsecutiveTransfer, that reports the mint, transfer or burn of a whole range of token IDs in one log, so huge NFT batches don't need one Transfer event per token.","tags":["nft","erc721","events","batch","minting"],"related":[721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2309/","markdown":"## What problem does it solve?\n\n[ERC-721](/eip-721/) says a `Transfer` event must be emitted whenever ownership of any NFT changes. Indexers, marketplaces and block explorers rely on those events to work out who owns what.\n\nThat rule makes large batches expensive. A contract can use clever data structures to mint a million tokens in one transaction, but emitting a million `Transfer` events in a loop would run out of gas. ERC-2309 gives such contracts a single, standard event that describes a whole range of consecutive token IDs at once.\n\n## How it works\n\nERC-2309 defines one event and nothing else. It does not say how you implement batch minting or transfers, only how you announce them:\n\n```solidity\nevent ConsecutiveTransfer(\n    uint256 indexed fromTokenId,\n    uint256 toTokenId,\n    address indexed fromAddress,\n    address indexed toAddress\n);\n```\n\nThe rules:\n\n- `fromTokenId` to `toTokenId` must be a consecutive range of IDs.\n- Minting uses `fromAddress == address(0)`; burning uses `toAddress == address(0)`.\n- `fromTokenId`, `fromAddress` and `toAddress` are indexed; `toTokenId` is not and lives in the log data.\n- The caller must own every token in the range or be an approved operator.\n- When you emit `ConsecutiveTransfer` for a set of tokens, you must **not** also emit `Transfer` for them. A contract may still use plain `Transfer` for ordinary single-token moves.\n\nThe event works for a single token too: `ConsecutiveTransfer(1, 1, address(0), alice)` mints token 1.\n\n## Sample code\n\nEmitting the event when minting a batch (bookkeeping simplified for illustration):\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract BatchNFT {\n    event ConsecutiveTransfer(\n        uint256 indexed fromTokenId,\n        uint256 toTokenId,\n        address indexed fromAddress,\n        address indexed toAddress\n    );\n\n    uint256 public nextId = 1;\n    // A real contract stores ownership compactly, e.g. one entry per batch.\n    mapping(uint256 =\u003e address) internal batchOwner; // keyed by first id of batch\n\n    function mintBatch(address to, uint256 quantity) external {\n        require(quantity \u003e 0, \"qty\");\n        uint256 first = nextId;\n        uint256 last = first + quantity - 1;\n        batchOwner[first] = to;\n        nextId = last + 1;\n        emit ConsecutiveTransfer(first, last, address(0), to); // one log for the whole range\n    }\n}\n```\n\nListening from an indexer (ethers v6):\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst nft = new Contract(nftAddress, [\n  \"event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress)\",\n], provider);\n\nnft.on(\"ConsecutiveTransfer\", (fromId, toId, from, to) =\u003e {\n  console.log(`tokens ${fromId}..${toId}: ${from} -\u003e ${to}`);\n});\n```\n\n## Things to know\n\n- Status is Final, but support is optional. An indexer that only listens for `Transfer` will miss ownership changes reported through `ConsecutiveTransfer`, so tools should watch both.\n- OpenZeppelin's `ERC721Consecutive` extension uses this event for batch minting during construction.\n- The spec positions it against [ERC-1155](/eip-1155/), which batches well for semi-fungible items but still logs per-ID data; ERC-2309 is aimed at minting very large numbers of unique tokens.\n- Detecting that a contract is an NFT is still done through [ERC-165](/eip-165/) `supportsInterface`; the event itself has no interface ID.\n"},"ja":{"lang":"ja","tldr":"ERC-721 のオプションイベント ConsecutiveTransfer。トークン ID の範囲全体のミント・転送・バーンを 1 つのログで報告し、巨大な NFT バッチでもトークンごとに Transfer イベントを出さなくて済むようにする。","tags":["nft","erc721","events","batch","minting"],"related":[721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2309/","markdown":"## 何を解決するのか\n\n[ERC-721](/eip-721/) は、NFT の所有権が変わるたびに `Transfer` イベントを emit しなければならないと定めています。インデクサー、マーケットプレイス、ブロックエクスプローラーは、誰が何を所有しているかを知るためにこのイベントに依存しています。\n\nこのルールは大規模なバッチを高コストにします。コントラクトは巧妙なデータ構造により 1 回のトランザクションで 100 万個のトークンをミントできますが、ループで 100 万個の `Transfer` イベントを emit すればガスが尽きます。ERC-2309 は、そのようなコントラクトに、連続したトークン ID の範囲全体を一度に記述する標準イベントを 1 つ提供します。\n\n## 仕組み\n\nERC-2309 が定義するのは 1 つのイベントだけです。バッチミントや転送をどう実装するかには触れず、それをどう通知するかだけを定めます。\n\n```solidity\nevent ConsecutiveTransfer(\n    uint256 indexed fromTokenId,\n    uint256 toTokenId,\n    address indexed fromAddress,\n    address indexed toAddress\n);\n```\n\nルール:\n\n- `fromTokenId` から `toTokenId` までは連続した ID の範囲でなければなりません。\n- ミントは `fromAddress == address(0)`、バーンは `toAddress == address(0)` を使います。\n- `fromTokenId`、`fromAddress`、`toAddress` は indexed です。`toTokenId` は indexed ではなく、ログデータに含まれます。\n- 呼び出し元は範囲内のすべてのトークンを所有しているか、承認済みオペレーターでなければなりません。\n- あるトークン群について `ConsecutiveTransfer` を emit する場合、それらについて `Transfer` を重ねて emit しては**なりません**。通常の単一トークンの移動には、これまでどおり `Transfer` を使えます。\n\nこのイベントは単一のトークンにも使えます。`ConsecutiveTransfer(1, 1, address(0), alice)` はトークン 1 をミントします。\n\n## サンプルコード\n\nバッチミント時にイベントを emit する例（帳簿管理は説明用に簡略化）:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract BatchNFT {\n    event ConsecutiveTransfer(\n        uint256 indexed fromTokenId,\n        uint256 toTokenId,\n        address indexed fromAddress,\n        address indexed toAddress\n    );\n\n    uint256 public nextId = 1;\n    // A real contract stores ownership compactly, e.g. one entry per batch.\n    mapping(uint256 =\u003e address) internal batchOwner; // keyed by first id of batch\n\n    function mintBatch(address to, uint256 quantity) external {\n        require(quantity \u003e 0, \"qty\");\n        uint256 first = nextId;\n        uint256 last = first + quantity - 1;\n        batchOwner[first] = to;\n        nextId = last + 1;\n        emit ConsecutiveTransfer(first, last, address(0), to); // one log for the whole range\n    }\n}\n```\n\nインデクサーからのリッスン（ethers v6）:\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst nft = new Contract(nftAddress, [\n  \"event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress)\",\n], provider);\n\nnft.on(\"ConsecutiveTransfer\", (fromId, toId, from, to) =\u003e {\n  console.log(`tokens ${fromId}..${toId}: ${from} -\u003e ${to}`);\n});\n```\n\n## 知っておくべきこと\n\n- ステータスは Final ですが、サポートは任意です。`Transfer` だけをリッスンするインデクサーは `ConsecutiveTransfer` で報告された所有権の変更を見逃すため、ツールは両方を監視すべきです。\n- OpenZeppelin の `ERC721Consecutive` 拡張は、コンストラクション中のバッチミントにこのイベントを使います。\n- 仕様は [ERC-1155](/eip-1155/) との位置づけを述べています。ERC-1155 はセミファンジブルなアイテムのバッチ処理には向いていますが、ID ごとのデータはログに残ります。ERC-2309 は非常に大量のユニークなトークンのミントを対象としています。\n- コントラクトが NFT であることの検出は、引き続き [ERC-165](/eip-165/) の `supportsInterface` で行います。このイベント自体にインターフェース ID はありません。\n"},"ko":{"lang":"ko","tldr":"선택적 ERC-721 이벤트 ConsecutiveTransfer. 토큰 ID 범위 전체의 민팅, 전송, 소각을 로그 하나로 알려, 거대한 NFT 배치에서도 토큰마다 Transfer 이벤트를 내지 않아도 되게 한다.","tags":["nft","erc721","events","batch","minting"],"related":[721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2309/","markdown":"## 어떤 문제를 해결하나요?\n\n[ERC-721](/eip-721/)은 어떤 NFT든 소유권이 바뀔 때마다 `Transfer` 이벤트를 emit해야 한다고 규정합니다. 인덱서, 마켓플레이스, 블록 탐색기는 누가 무엇을 소유하는지 알아내기 위해 이 이벤트에 의존합니다.\n\n이 규칙 때문에 대량 배치는 비용이 많이 듭니다. 컨트랙트는 영리한 자료구조로 한 트랜잭션에서 토큰 100만 개를 민팅할 수 있지만, 루프에서 `Transfer` 이벤트 100만 개를 emit하면 가스가 바닥납니다. ERC-2309는 이런 컨트랙트에 연속된 토큰 ID 범위 전체를 한 번에 설명하는 표준 이벤트 하나를 제공합니다.\n\n## 어떻게 동작하나요?\n\nERC-2309는 이벤트 하나만 정의합니다. 배치 민팅이나 전송을 어떻게 구현할지는 정하지 않고, 이를 어떻게 알릴지만 정합니다.\n\n```solidity\nevent ConsecutiveTransfer(\n    uint256 indexed fromTokenId,\n    uint256 toTokenId,\n    address indexed fromAddress,\n    address indexed toAddress\n);\n```\n\n규칙:\n\n- `fromTokenId`부터 `toTokenId`까지는 연속된 ID 범위여야 합니다.\n- 민팅은 `fromAddress == address(0)`, 소각은 `toAddress == address(0)`을 사용합니다.\n- `fromTokenId`, `fromAddress`, `toAddress`는 indexed이고, `toTokenId`는 indexed가 아니며 로그 데이터에 들어갑니다.\n- 호출자는 범위 안의 모든 토큰을 소유하고 있거나 승인된 오퍼레이터여야 합니다.\n- 어떤 토큰 집합에 대해 `ConsecutiveTransfer`를 emit했다면, 같은 토큰에 대해 `Transfer`를 함께 emit해서는 **안 됩니다**. 컨트랙트는 일반적인 단일 토큰 이동에는 여전히 `Transfer`를 쓸 수 있습니다.\n\n이 이벤트는 토큰 하나에도 쓸 수 있습니다. `ConsecutiveTransfer(1, 1, address(0), alice)`는 토큰 1을 민팅합니다.\n\n## 샘플 코드\n\n배치를 민팅할 때 이벤트 emit하기(장부 관리는 설명을 위해 단순화):\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract BatchNFT {\n    event ConsecutiveTransfer(\n        uint256 indexed fromTokenId,\n        uint256 toTokenId,\n        address indexed fromAddress,\n        address indexed toAddress\n    );\n\n    uint256 public nextId = 1;\n    // A real contract stores ownership compactly, e.g. one entry per batch.\n    mapping(uint256 =\u003e address) internal batchOwner; // keyed by first id of batch\n\n    function mintBatch(address to, uint256 quantity) external {\n        require(quantity \u003e 0, \"qty\");\n        uint256 first = nextId;\n        uint256 last = first + quantity - 1;\n        batchOwner[first] = to;\n        nextId = last + 1;\n        emit ConsecutiveTransfer(first, last, address(0), to); // one log for the whole range\n    }\n}\n```\n\n인덱서에서 리스닝하기(ethers v6):\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst nft = new Contract(nftAddress, [\n  \"event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress)\",\n], provider);\n\nnft.on(\"ConsecutiveTransfer\", (fromId, toId, from, to) =\u003e {\n  console.log(`tokens ${fromId}..${toId}: ${from} -\u003e ${to}`);\n});\n```\n\n## 알아둘 점\n\n- 상태는 Final이지만 지원은 선택 사항입니다. `Transfer`만 리스닝하는 인덱서는 `ConsecutiveTransfer`로 알려진 소유권 변경을 놓치므로, 도구는 둘 다 감시해야 합니다.\n- OpenZeppelin의 `ERC721Consecutive` 확장은 생성 중 배치 민팅에 이 이벤트를 사용합니다.\n- 스펙은 이를 [ERC-1155](/eip-1155/)와 비교합니다. ERC-1155는 준대체 가능 아이템의 배치 처리에는 좋지만 ID별 데이터를 여전히 로그로 남기며, ERC-2309는 아주 많은 수의 고유 토큰을 민팅하는 경우를 겨냥합니다.\n- 컨트랙트가 NFT인지 감지하는 일은 여전히 [ERC-165](/eip-165/)의 `supportsInterface`로 합니다. 이 이벤트 자체에는 인터페이스 ID가 없습니다.\n"},"zh":{"lang":"zh","tldr":"一个可选的 ERC-721 事件 ConsecutiveTransfer，用一条日志报告整段 token ID 的铸造、转移或销毁，使超大规模的 NFT 批量操作不必为每个代币发出一个 Transfer 事件。","tags":["nft","erc721","events","batch","minting"],"related":[721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2309/","markdown":"## 它解决什么问题？\n\n[ERC-721](/eip-721/) 规定，任何 NFT 的所有权发生变化时都必须发出 `Transfer` 事件。索引器、市场和区块浏览器都依赖这些事件来判断谁拥有什么。\n\n这条规则让大批量操作变得昂贵。合约可以借助巧妙的数据结构在一笔交易中铸造一百万个代币，但在循环中发出一百万个 `Transfer` 事件会耗尽 gas。ERC-2309 为这类合约提供了一个标准事件，一次性描述一整段连续的 token ID。\n\n## 它如何运作\n\nERC-2309 只定义了一个事件，别无其他。它不规定如何实现批量铸造或转移，只规定如何对外宣告：\n\n```solidity\nevent ConsecutiveTransfer(\n    uint256 indexed fromTokenId,\n    uint256 toTokenId,\n    address indexed fromAddress,\n    address indexed toAddress\n);\n```\n\n规则：\n\n- `fromTokenId` 到 `toTokenId` 必须是一段连续的 ID。\n- 铸造使用 `fromAddress == address(0)`；销毁使用 `toAddress == address(0)`。\n- `fromTokenId`、`fromAddress` 和 `toAddress` 是 indexed；`toTokenId` 不是，它位于日志数据中。\n- 调用者必须拥有该范围内的每个代币，或者是获批的操作者。\n- 为一组代币发出 `ConsecutiveTransfer` 时，**不得**再为它们发出 `Transfer`。合约仍可对普通的单个代币转移使用 `Transfer`。\n\n该事件也适用于单个代币：`ConsecutiveTransfer(1, 1, address(0), alice)` 铸造代币 1。\n\n## 示例代码\n\n批量铸造时发出该事件（为便于说明，簿记逻辑做了简化）：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract BatchNFT {\n    event ConsecutiveTransfer(\n        uint256 indexed fromTokenId,\n        uint256 toTokenId,\n        address indexed fromAddress,\n        address indexed toAddress\n    );\n\n    uint256 public nextId = 1;\n    // A real contract stores ownership compactly, e.g. one entry per batch.\n    mapping(uint256 =\u003e address) internal batchOwner; // keyed by first id of batch\n\n    function mintBatch(address to, uint256 quantity) external {\n        require(quantity \u003e 0, \"qty\");\n        uint256 first = nextId;\n        uint256 last = first + quantity - 1;\n        batchOwner[first] = to;\n        nextId = last + 1;\n        emit ConsecutiveTransfer(first, last, address(0), to); // one log for the whole range\n    }\n}\n```\n\n在索引器中监听（ethers v6）：\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst nft = new Contract(nftAddress, [\n  \"event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress)\",\n], provider);\n\nnft.on(\"ConsecutiveTransfer\", (fromId, toId, from, to) =\u003e {\n  console.log(`tokens ${fromId}..${toId}: ${from} -\u003e ${to}`);\n});\n```\n\n## 需要注意\n\n- 状态为 Final，但支持是可选的。只监听 `Transfer` 的索引器会漏掉通过 `ConsecutiveTransfer` 报告的所有权变更，因此工具应同时监听两者。\n- OpenZeppelin 的 `ERC721Consecutive` 扩展在构造期间使用该事件进行批量铸造。\n- 规范将它与 [ERC-1155](/eip-1155/) 作了对比：ERC-1155 适合批量处理半同质化物品，但仍会按 ID 记录日志数据；ERC-2309 面向的是铸造海量唯一代币。\n- 检测合约是否为 NFT 仍通过 [ERC-165](/eip-165/) 的 `supportsInterface` 完成；该事件本身没有接口 ID。\n"}}}
