ERC-6047 Mandating a Transfer event on mint (ERC-721 Balance indexing via Transfer event)

Stagnant · NFTs & multi-token · created 2022-11-26

Requires that a Transfer event always be emitted even when an NFT is minted inside the constructor at contract creation, so that indexing services never miss any minting activity.

Why it is needed

ERC-721 requires a Transfer event to be emitted when an NFT is transferred, minted (transferred from 0x0), or burned (transferred to 0x0), but it makes an exception during contract creation (while the constructor is executing), not mandating event emission there. As a result, some contracts can mint NFTs directly inside their constructor at deployment without ever emitting a Transfer log. Tools such as wallets, explorers, and analytics services that compute holdings or total supply purely by reading on-chain logs will permanently miss these mint-at-creation tokens. By contrast, the ERC-1155 standard, which serves a similar role, already mandates event emission regardless of whether it occurs during creation, leaving ERC-721 as the only one with this gap.

In depth

Compliance requirements

A contract following this standard must implement ERC-721 and must emit a Transfer event whenever a token is transferred, minted from 0x0, or burned to 0x0, including when this occurs during contract creation. In other words, all it does is remove the creation-time exception that ERC-721 previously allowed.

The ERC-721 gap and the difference from ERC-1155

The original ERC-721 standard requires a Transfer event on transfer, mint, and burn, but makes an exception during contract creation. Because of this, a contract can mint NFTs during creation without an event being emitted. ERC-1155, in contrast, requires event emission regardless of whether it occurs during creation, so it has no such gap. This standard removes that exception from ERC-721, aligning its behavior with ERC-1155.

Why no new event was created

Rather than creating a separate new event such as Creation, this standard reuses the existing Transfer event. This way, indexing services or off-chain applications already built to process Transfer events remain compatible without needing any changes.

Backward compatibility

Every contract that follows this standard also complies with ERC-721. However, the reverse does not hold: not every contract that complies with ERC-721 also complies with this standard. Existing ERC-721 contracts that omit the Transfer event during minting do not satisfy this standard.

Proposal status

This proposal is registered as Stagnant, so discussion has stalled and is not progressing further. Discussion may resume or the content may change in the future.

Original ERC · ← ERCs