---
eip: 2309
label: ERC-2309
title: ERC-721 Consecutive Transfer Extension
status: Final
type: Standards Track
category: ERC
created: 2019-10-08
requires: 721
official: https://eips.ethereum.org/EIPS/eip-2309
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2309.md
canonical: https://eips.huatuo.xyz/eip-2309/
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]
---

# ERC-2309: ERC-721 Consecutive Transfer Extension

> A standardized event emitted when creating/transferring one, or many non-fungible tokens using consecutive token identifiers.

**TL;DR:** 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.

## What problem does it solve?

[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.

That 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.

## How it works

ERC-2309 defines one event and nothing else. It does not say how you implement batch minting or transfers, only how you announce them:

```solidity
event ConsecutiveTransfer(
    uint256 indexed fromTokenId,
    uint256 toTokenId,
    address indexed fromAddress,
    address indexed toAddress
);
```

The rules:

- `fromTokenId` to `toTokenId` must be a consecutive range of IDs.
- Minting uses `fromAddress == address(0)`; burning uses `toAddress == address(0)`.
- `fromTokenId`, `fromAddress` and `toAddress` are indexed; `toTokenId` is not and lives in the log data.
- The caller must own every token in the range or be an approved operator.
- 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.

The event works for a single token too: `ConsecutiveTransfer(1, 1, address(0), alice)` mints token 1.

## Sample code

Emitting the event when minting a batch (bookkeeping simplified for illustration):

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

contract BatchNFT {
    event ConsecutiveTransfer(
        uint256 indexed fromTokenId,
        uint256 toTokenId,
        address indexed fromAddress,
        address indexed toAddress
    );

    uint256 public nextId = 1;
    // A real contract stores ownership compactly, e.g. one entry per batch.
    mapping(uint256 => address) internal batchOwner; // keyed by first id of batch

    function mintBatch(address to, uint256 quantity) external {
        require(quantity > 0, "qty");
        uint256 first = nextId;
        uint256 last = first + quantity - 1;
        batchOwner[first] = to;
        nextId = last + 1;
        emit ConsecutiveTransfer(first, last, address(0), to); // one log for the whole range
    }
}
```

Listening from an indexer (ethers v6):

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

const provider = new JsonRpcProvider(process.env.RPC_URL);
const nft = new Contract(nftAddress, [
  "event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress)",
], provider);

nft.on("ConsecutiveTransfer", (fromId, toId, from, to) => {
  console.log(`tokens ${fromId}..${toId}: ${from} -> ${to}`);
});
```

## Things to know

- 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.
- OpenZeppelin's `ERC721Consecutive` extension uses this event for batch minting during construction.
- 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.
- Detecting that a contract is an NFT is still done through [ERC-165](/eip-165/) `supportsInterface`; the event itself has no interface ID.


---

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