Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
ERC-7439 proposes an interface for NFT-based event tickets that restricts unauthorized transfers while allowing recognized resale operators to manage legitimate secondary sales.
This article explains the following proposal, with additional context and examples.
The original article records ERC-7439 as being in Review on December 7, 2023. This is a historical status, not a verification of its current status.
You can find my other ERC articles here.
Overview
ERC-7439 builds on ERC-721 to address problems in secondary ticket markets. Its objective is to discourage unauthorized ticket resale while allowing customers to resell tickets through approved operators.
For background on ERC-721, see:
Ticket resale restrictions
The design allows ticket issuers to restrict token transfers according to their resale policies. Price limits and other sales rules require additional application logic; restricting transfers alone cannot prevent every form of unauthorized resale.
Authorized resale operators
Ticket holders can use an approved resale operator to transfer tickets through a recognized channel. This creates a controlled secondary market.
Smart contracts
Contracts can record ticket issuance, authorized transfers, resale status, and redemption. The corresponding operations execute when invoked and when their programmed conditions are satisfied.
Transparency and security
On-chain records can make ticket ownership and status changes auditable. Their security depends on the contract's authorization rules and the surrounding ticketing system.
Customizable policies
Event organizers and ticket agencies can define additional policies for their particular events, including authorized operators, pricing, refunds, and admission checks.
The proposal aims to reduce ticketing abuse and support a more transparent secondary market.
Motivation
The standard represents event tickets as ERC-721 tokens with restricted transfers.
Problems in secondary ticket markets
Large-scale ticket touting and fraudulent ticket sales can disadvantage fans, performers, and related businesses. Legal restrictions exist in some jurisdictions, but enforcement may be difficult.
Consumer-friendly resale
A resale interface that allows ticket holders to transfer or resell tickets at or below their original purchase price can provide an alternative to uncontrolled secondary markets. The relevant pricing rules must be implemented by the ticketing platform.
Restricted transfers
Paper tickets and email vouchers can be duplicated or fraudulently distributed. The proposed design restricts ticket transfers to approved accounts, such as ticket agencies, managers, promoters, and recognized resale platforms.
Additional ticket information
Each token has associated ticket information. Authorized accounts can update its status and expiration under the contract's rules.
Together, these mechanisms aim to help protect customers against fraudulent tickets and unauthorized transfers.
Specification
The proposal defines ticket information and lifecycle states for ERC-721 event tickets.
TokenInfo
- signature: Signed data supplied by a user or ticket agency. Implementations must define the message format and verification rules needed to establish authenticity.
- status: The ticket's current lifecycle state.
- expireTime: The expiration time, which may correspond to the end of the event.
TokenStatus
- Sold: The ticket has been sold and is considered usable under the applicable admission rules.
- Resell: The ticket has entered the approved resale process. The proposal treats it as a potentially usable ticket, subject to the applicable conditions.
- Void: The ticket has been invalidated and should not be accepted for admission.
- Redeemed: The ticket has already been used or exchanged. Recording redemption helps prevent repeated use.
These states allow ticketing applications to distinguish valid tickets from voided or redeemed ones.
/// @title IERC7439 Prevent Ticket Touting Interface
interface IERC7439 /* is ERC721 */ {
/// @dev TokenStatus represent the token current status, only specific role can change status
enum TokenStatus {
Sold, // 0
Resell, // 1
Void, // 2
Redeemed // 3
}
/// @param signature Data signed by user's private key or agent's private key
/// @param tokenStatus Token status changing to
/// @param expireTime Event due time
struct TokenInfo {
bytes signature;
TokenStatus tokenStatus;
uint256 expireTime;
}
/// @notice Used to notify listeners that the token with the specified ID has been changed status
/// @param tokenId The token has been changed status
/// @param tokenStatus Token status has been changed to
/// @param signature Data signed by user's private key or agent's private key
event TokenStatusChanged(
uint256 indexed tokenId,
TokenStatus indexed tokenStatus,
bytes signature
);
/// @notice Used to mint token with token status
/// @dev MUST emit the `TokenStatusChanged` event if the token status is changed.
/// @param to The receiptent of token
/// @param signature Data signed by user's private key or agent's private key
function safeMint(address to, bytes memory signature) external;
/// @notice Used to change token status and can only be invoked by a specific role
/// @dev MUST emit the `TokenStatusChanged` event if the token status is changed.
/// @param tokenId The token need to change status
/// @param signature Data signed by user's private key or agent's private key
/// @param tokenStatus Token status changing to
/// @param newExpireTime New event due time
function changeState(
uint256 tokenId,
bytes memory signature,
TokenStatus tokenStatus,
uint256 newExpireTime
) external;
}Data types and events
TokenStatus
enum TokenStatus {
Sold, // 0
Resell, // 1
Void, // 2
Redeemed // 3
}Overview
Defines the possible lifecycle states of a ticket.
Details
Only accounts with the appropriate role may change a ticket's status.
Values
- Sold: A sold ticket.
- Resell: A ticket undergoing resale.
- Void: An invalidated ticket.
- Redeemed: A ticket that has been used or redeemed.
TokenInfo
struct TokenInfo {
bytes signature;
TokenStatus tokenStatus;
uint256 expireTime;
}Overview
A struct containing ticket-related information.
Fields
- signature: Data signed by the user or ticket agency.
- tokenStatus: The ticket's current status.
- expireTime: Expiration timestamp, such as the event's scheduled ending time.
The signature field stores signed data; its presence does not independently establish authenticity unless the application validates it.
TokenStatusChanged
event TokenStatusChanged(
uint256 indexed tokenId,
TokenStatus indexed tokenStatus,
bytes signature
);Overview
An event recording changes to a ticket's status.
Details
The event identifies the affected token, the updated status, and associated signature data. External systems can use it to monitor ticket lifecycle changes.
Parameters
- tokenId: Identifier of the affected ticket.
- tokenStatus: Updated ticket status.
- signature: Signed data associated with the update.
Functions
safeMint
function safeMint(address to, bytes memory signature) external;Overview
Mints a new ticket NFT and initializes its status.
Details
The function assigns a token to the specified recipient. It must emit TokenStatusChanged when the token's status changes.
Parameters
- to: Recipient address.
- signature: Data signed by the user or ticket agency.
The interface does not define payment collection, issuance quotas, or signature verification. Those require additional implementation logic.
changeState
function changeState(
uint256 tokenId,
bytes memory signature,
TokenStatus tokenStatus,
uint256 newExpireTime
) external;Overview
Changes a ticket's lifecycle state through a restricted operation.
Details
Only an account with the appropriate role may invoke the operation. It updates the ticket information, including its status and expiration, and must emit TokenStatusChanged when the status changes.
Parameters
- tokenId: Identifier of the ticket being updated.
- signature: Signed data associated with the update.
- tokenStatus: New lifecycle state.
- newExpireTime: Updated expiration timestamp.
A conforming implementation must return true when supportsInterface is called with interface ID 0xd010ceae.
Rationale
Priorities of ticket agencies, performers, and audiences
Ticket agencies
Ticket agencies aim to sell available tickets while managing the distribution process. The original proposal discusses the risk of intermediaries contributing to uncontrolled resale markets in pursuit of sales.
A transparent initial sale channel and a recognized secondary market can help align ticket distribution with the interests of audiences and performers.
The safeMint function provides an issuance entry point. TokenInfo includes a signature that the relevant user or agency can verify under an application-defined scheme.
In the reference design, the _beforeTokenTransfer hook implements access control so that accounts with PARTNER_ROLE can perform the relevant restricted transfers. The actual public pricing and payment mechanism is not defined by safeMint alone.
Performers and event organizers
Performers and organizers want tickets to reach genuine attendees rather than be concentrated in uncontrolled resale channels. Transparent ticket issuance and resale records can help them understand distribution and monitor lifecycle changes.
Audiences
Attendees primarily need valid tickets that will be accepted at the event. Clear pricing, verifiable ticket status, and recognized resale channels can reduce uncertainty compared with purchasing an unverifiable ticket from an unknown intermediary.
For background on ERC-20, see:
A healthy ticketing ecosystem
A ticketing system needs clear distribution rules, transparent prices, and a secondary market that accommodates legitimate changes in attendees' plans.
Users can obtain ticket NFTs through an issuance mechanism and use approved secondary-market channels when they need to resell them.
The reference design restricts changeState to PARTNER_ROLE, allowing recognized operators to record resale status and other authorized lifecycle transitions.
This establishes a basis for controlled resale, but enforcement of resale price limits and payment rules depends on the surrounding application.
Ticketing workflows
The proposed system represents tickets as NFTs and can combine them with ERC-20 payment tokens or other settlement mechanisms.
A ticketing application may use additional logic to process refunds when an event is canceled. Before admission, the operator checks the ticket's status, expiration, and any required proof of entitlement. Following successful admission, the operator can change the status to Redeemed.
The proposal illustrates three workflows.
Normal Flow

Void Flow

Resell Flow

Backward compatibility
ERC-7439 builds on the ERC-721 interface. However, its additional transfer restrictions may prevent ordinary ERC-721 marketplace workflows from functioning without integration with the approved ticketing operators.
Tests
const { expectRevert } = require("@openzeppelin/test-helpers");
const { expect } = require("chai");
const ERC7439 = artifacts.require("ERC7439");
contract("ERC7439", (accounts) => {
const [deployer, partner, userA, userB] = accounts;
const expireTime = 19999999;
const tokenId = 0;
const signature = "0x993dab3dd91f5c6dc28e17439be475478f5635c92a56e17e82349d3fb2f166196f466c0b4e0c146f285204f0dcb13e5ae67bc33f4b888ec32dfe0a063e8f3f781b"
const zeroHash = "0x";
beforeEach(async () => {
this.erc7439 = await ERC7439.new({
from: deployer,
});
await this.erc7439.mint(userA, signature, { from: deployer });
});
it("Should mint a token", async () => {
const tokenInfo = await this.erc7439.tokenInfo(tokenId);
expect(await this.erc7439.ownerOf(tokenId)).to.equal(userA);
expect(tokenInfo.signature).equal(signature);
expect(tokenInfo.status).equal("0"); // Sold
expect(tokenInfo.expireTime).equal(expireTime);
});
it("should ordinary users cannot transfer successfully", async () => {
expectRevert(await this.erc7439.transferFrom(userA, userB, tokenId, { from: userA }), "ERC7439: You cannot transfer this NFT!");
});
it("should partner can transfer successfully and chage the token info to resell status", async () => {
const tokenStatus = 1; // Resell
await this.erc7439.changeState(tokenId, zeroHash, tokenStatus, { from: partner });
await this.erc7439.transferFrom(userA, partner, tokenId, { from: partner });
expect(tokenInfo.tokenHash).equal(zeroHash);
expect(tokenInfo.status).equal(tokenStatus); // Resell
expect(await this.erc7439.ownerOf(tokenId)).to.equal(partner);
});
it("should partner can change the token status to void", async () => {
const tokenStatus = 2; // Void
await this.erc7439.changeState(tokenId, zeroHash, tokenStatus, { from: partner });
expect(tokenInfo.tokenHash).equal(zeroHash);
expect(tokenInfo.status).equal(tokenStatus); // Void
});
it("should partner can change the token status to redeemed", async () => {
const tokenStatus = 3; // Redeemed
await this.erc7439.changeState(tokenId, zeroHash, tokenStatus, { from: partner });
expect(tokenInfo.tokenHash).equal(zeroHash);
expect(tokenInfo.status).equal(tokenStatus); // Redeemed
});
it("should partner can resell the token and change status from resell to sold", async () => {
let tokenStatus = 1; // Resell
await this.erc7439.changeState(tokenId, zeroHash, tokenStatus, { from: partner });
await this.erc7439.transferFrom(userA, partner, tokenId, { from: partner });
expect(tokenInfo.status).equal(tokenStatus); // Resell
expect(tokenInfo.tokenHash).equal(zeroHash);
tokenStatus = 0; // Sold
const newSignature = "0x113hqb3ff45f5c6ec28e17439be475478f5635c92a56e17e82349d3fb2f166196f466c0b4e0c146f285204f0dcb13e5ae67bc33f4b888ec32dfe0a063w7h2f742f";
await this.erc7439.changeState(tokenId, newSignature, tokenStatus, { from: partner });
await this.erc7439.transferFrom(partner, userB, tokenId, { from: partner });
expect(tokenInfo.status).equal(tokenStatus); // Sold
expect(tokenInfo.tokenHash).equal(newSignature);
});
});The historical test examples are preserved unchanged. They illustrate intended behavior, including issuance, restricted transfers, and status changes. They have not been executed as part of this translation. Some test calls use different method signatures from the displayed implementation, so they require reconciliation before they can serve as a reliable test suite.
Reference implementation
// SPDX-License-Identifier: CC0-1.0
pragma solidity 0.8.19;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
// If you need additional metadata, you can import ERC721URIStorage
// import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./IERC7439.sol";
contract ERC7439 is ERC721, AccessControl, IERC7439 {
using Counters for Counters.Counter;
bytes32 public constant PARTNER_ROLE = keccak256("PARTNER_ROLE");
Counters.Counter private _tokenIdCounter;
uint256 public expireTime;
mapping(uint256 => TokenInfo) public tokenInfo;
constructor(uint256 _expireTime) ERC721("MyToken", "MTK") {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(PARTNER_ROLE, msg.sender);
expireTime = _expireTime;
}
function safeMint(address to, bytes memory signature) public {
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(to, tokenId);
tokenInfo[tokenId] = TokenInfo(signature, TokenStatus.Sold, expireTime);
emit TokenStatusChanged(tokenId, TokenStatus.Sold, signature);
}
function changeState(
uint256 tokenId,
bytes memory signature,
TokenStatus tokenStatus,
uint256 newExpireTime
) public onlyRole(PARTNER_ROLE) {
tokenInfo[tokenId] = TokenInfo(signature, tokenStatus, newExpireTime);
emit TokenStatusChanged(tokenId, tokenStatus, signature);
}
function _burn(uint256 tokenId) internal virtual override(ERC721) {
super._burn(tokenId);
if (_exists(tokenId)) {
delete tokenInfo[tokenId];
// If you import ERC721URIStorage
// delete _tokenURIs[tokenId];
}
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(AccessControl, ERC721) returns (bool) {
return
interfaceId == type(IERC7439).interfaceId ||
super.supportsInterface(interfaceId);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721) {
if (!hasRole(PARTNER_ROLE, _msgSender())) {
require(
from == address(0) || to == address(0),
"ERC7439: You cannot transfer this NFT!"
);
}
super._beforeTokenTransfer(from, to, tokenId);
}
}The historical reference implementation uses OpenZeppelin ERC-721 and AccessControl to represent tickets and restrict lifecycle operations.
It is an illustrative implementation, not a complete ticket sales or admission system. In particular, safeMint needs an appropriate issuance policy for production use, and storing signature data does not replace signature verification.
Security considerations
The original article states that no special security considerations were identified for the standard.
In practice, implementations should protect partner and administrator roles, validate signed ticket information, enforce allowed status transitions, prevent duplicate redemption, and define the relationship between expiration and admission. Pricing restrictions and refund behavior also require explicit settlement logic.
Citation
LeadBest Consulting Group service@getoken.io, Sandy Sung (@sandy-sung-lb), Mars Peng mars.peng@getoken.io, Taien Wang taien.wang@getoken.io, "ERC-7439: Prevent ticket touting [DRAFT]," Ethereum Improvement Proposals, no. 7439, July 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7439.
Conclusion
ERC-7439 proposes a common interface for restricted NFT ticket transfers and lifecycle management. It can support authorized resale and ticket redemption, provided the surrounding application implements the necessary issuance, pricing, payment, and admission rules.
If you have questions, feel free to contact me on Twitter.
You can also find my work on the following sites.


