This proposal extends ERC-6982 so that a lock can be marked permanent, so that the same interface applies to ERC-1155 contracts as well as ERC-721 contracts, and so that minting and burning are defined while tokens are locked. Contracts keep using ERC-6982’s DefaultLocked and Locked events to lock and unlock tokens. This proposal adds one event, one view function, and one custom error. Marketplaces, wallets, and indexers can then tell a temporary trading pause, such as one during a public mint, from a collection that will never be transferable.
Motivation
Creators often disable secondary transfers for a period: while a public mint is running, before a reveal, or during a migration. Other collections are non-transferable for good, such as credentials, memberships, and achievement badges. In both cases marketplaces need to stop offering listings, offers, and sales that the contract would reject.
ERC-6982 already gives contracts a way to lock or unlock every token with one DefaultLocked event, and to override single tokens with Locked events. It leaves three gaps:
A consumer cannot tell a collection-wide lock that will lift from one that never will. A wallet cannot label a token as non-transferable, and a marketplace cannot tell whether to keep orders for when trading resumes.
ERC-6982 requires ERC-721, so ERC-1155 contracts have no equivalent signal.
ERC-6982 does not say whether minting and burning continue while tokens are locked. Pausing trading during a mint depends on minting continuing.
ERC-5192 covers permanent locks, but only with one event per token, so a 10,000 token collection needs 10,000 logs at deployment.
Specification
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119 and RFC 8174.
Definitions
A holder transfer is a transfer of a token where both the sender (from) and the recipient (to) are not the zero address. Mints (from is the zero address) and burns (to is the zero address) are not holder transfers.
A token is locked when ERC-6982’s locked(tokenId) returns true.
A contract is permanently locked once it has emitted PermanentlyLocked.
For an ERC-1155 contract, tokenId is the token type ID, and a token ID exists while its total supply is greater than zero.
For a contract deployed as a proxy or clone, deployment in ERC-6982’s requirement to emit DefaultLocked at deployment means the transaction that initializes it, and the proxy or clone address emits the event.
Interface
A compliant contract MUST implement ERC-721 or ERC-1155, MUST implement ERC-6982, and MUST implement the following interface:
// SPDX-License-Identifier: CC0-1.0
pragmasolidity^0.8.4;/// @dev The ERC-165 identifier for this interface is 0x9051c597.
interfaceIERC8451/* is IERC165, IERC6982 */{/// @notice Emitted when every token in the contract becomes permanently locked.
eventPermanentlyLocked();/// @notice Thrown when a holder transfer of a locked token is attempted.
errorTokenLocked(uint256tokenId);/// @notice Returns true if every token in the contract is permanently locked.
functionpermanentlyLocked()externalviewreturns(bool);}
Behavior
The contract MUST return true from supportsInterface for 0x9051c597, for the ERC-6982 identifier 0x6b61a747, and for the ERC-721 identifier 0x80ac58cd or the ERC-1155 identifier 0xd9b67a26, as defined by ERC-165.
The requirements of ERC-6982 apply to ERC-1155 contracts that implement this proposal, with tokenId read as the token type ID.
Locking restricts holder transfers only. A locked status MUST NOT by itself prevent minting. The contract MAY allow burning locked tokens.
A holder transfer that reverts because the token is locked SHOULD revert with TokenLocked(tokenId). For a batch transfer, tokenId SHOULD be the first locked token ID in the order the batch lists them.
When the contract emits PermanentlyLocked, defaultLocked() MUST already return true.
Before the contract emits PermanentlyLocked, it MUST emit Locked(tokenId, true) for every token ID whose most recent Locked event set it to false, whether or not that token ID exists at the time.
After the contract emits PermanentlyLocked:
defaultLocked() MUST return true for the life of the contract, and locked(tokenId) MUST return true for every token ID that exists, including token IDs minted later and regardless of any earlier Locked event.
The contract MUST revert every holder transfer, including transfers made by the holder and by any approved operator.
The contract MUST NOT emit DefaultLocked(false) or Locked(tokenId, false) for any token ID.
permanentlyLocked() MUST return false until the contract emits PermanentlyLocked, and true from then on.
The contract MUST NOT revert a call that removes an existing approval because a token is locked, including after PermanentlyLocked. Such a call is setApprovalForAll(operator, false) while isApprovedForAll(caller, operator) returns true, or, for ERC-721, approve(address(0), tokenId) by an account that ERC-721 allows to approve for that token while getApproved(tokenId) returns a nonzero address. After PermanentlyLocked, once such a call returns, isApprovedForAll(caller, operator) MUST return false until the caller approves that operator again, and after the ERC-721 call getApproved(tokenId) MUST return the zero address until the token is approved again. While permanentlyLocked() returns false, the contract SHOULD NOT revert a call that grants an approval solely because a token is locked.
Consumers
Consumers SHOULD NOT create, display, or fulfill listings, offers, or sales of a locked token.
Consumers MAY keep existing orders for a locked token while the contract’s permanentlyLocked() returns false, and show them again when the token is unlocked.
Consumers MAY present every token of a permanently locked contract as non-transferable, and other locked tokens as temporarily unavailable for trading.
Consumers that observe PermanentlyLocked() or read permanentlyLocked() == true SHOULD treat every token in the contract as non-transferable, including tokens minted later.
Consumers MAY treat a holder transfer that reverts with TokenLocked(tokenId) as a sign that the token is locked, even when they have not seen a lock event. Before recording the token as locked, consumers SHOULD confirm that locked(tokenId) returns true, and otherwise treat the revert as a failure of that transfer only.
Consumers MAY treat every token in a contract as locked while its defaultLocked() returns true, without tracking Locked events for individual tokens.
Consumers that rebuild lock status from events SHOULD, when a chain reorganization removes a DefaultLocked, Locked, or PermanentlyLocked event, read the current status from defaultLocked(), locked(tokenId), or permanentlyLocked() instead of reversing the removed event.
Rationale
Building on ERC-6982
An earlier draft of this proposal defined its own range event for pausing a whole collection. ERC-6982 already covers that case with DefaultLocked, and per-token exceptions with Locked. Reusing it means existing ERC-6982 contracts keep working, and indexers learn one base standard. This proposal adds only what ERC-6982 leaves open. A range event is not included: the default status covers a whole collection, Locked covers single tokens, and nothing in the motivating cases needs a partial range.
A separate permanence event
ERC-6982 is Final, so its events cannot gain a field. A separate PermanentlyLocked event lets a contract mark permanence without changing how ERC-6982 consumers read lock status. Behavior rules 5 and 6 require the default lock, and a lock on every token that had been unlocked individually, to be in place before the contract is marked permanent. A consumer that only understands ERC-6982 then sees every token as locked, whether it calls locked or rebuilds lock status from ERC-6982 events, where a token’s latest Locked event overrides the default. Rule 6 also covers token IDs that do not exist when the contract is marked permanent, such as an ERC-1155 ID whose whole supply was burned. Such an ID can be minted again later, and a consumer replaying events would otherwise reuse its old unlocked status.
Rule 6 has a cost for contracts that unlock single tokens. Such a contract has to track which token IDs are unlocked, and making the lock permanent then emits one event per unlocked ID, which for a large set can exceed the block gas limit. The rule constrains only the event history at the moment PermanentlyLocked is emitted, so a contract can re-lock unlocked IDs in batches over earlier transactions, or refuse to become permanent while any ID is still unlocked.
Permanence goes one way. A contract can move from locked to permanently locked, but never back. A consumer that has seen the event can rely on it without polling.
Permanence for whole collections only
Permanence applies to the whole contract, not to single tokens. The motivating cases lock whole collections: a drop pauses trading for every token, and a credential collection is non-transferable from the start. A per-token permanence event and view would double the interface for a case ERC-5192 already covers for ERC-721, since a contract can implement ERC-5192 alongside this proposal through the shared locked(uint256) function. An ERC-1155 contract that needs one token type to stay non-transferable can keep it locked with ERC-6982’s Locked(tokenId, true).
The event and view drop ERC-6982’s Default prefix because permanence is not a default that Locked events can override: once it is set, every token is locked. permanentlyLocked() is kept as a view so that a consumer can read permanence before any token is minted, and so that an indexer can re-read it after a chain reorganization removes the event.
A standard revert
TokenLocked(tokenId) gives every compliant contract the same revert data for a transfer blocked by a lock. A consumer that simulates or submits a fill can recognize the failure and stop offering the order, instead of reporting an unknown revert.
The revert data does not name the contract that raised it. A safe transfer to a contract calls the recipient’s onERC721Received or onERC1155Received hook, and common implementations pass a revert from that hook up unchanged, so a recipient can revert with TokenLocked(tokenId) for a token that is not locked. A consumer that recorded such a revert as a lock would hide valid orders with no lock event to clear them, which is why consumer rule 5 asks for a locked(tokenId) check first.
Strict reverts only for permanent locks
ERC-6982 notes that a locked token may still be transferable under some conditions, for example when a designated protector wallet starts the transfer. This proposal keeps that flexibility for temporary locks, since marketplaces only need to know not to offer the token. A permanent lock is a promise to holders that the token is non-transferable, so behavior rule 7 makes that promise binding on the contract.
Consumer shortcuts
Consumer rule 6 lets a marketplace or indexer track one status per contract. It may then refuse to trade a token that an ERC-6982 Locked(tokenId, false) override has unlocked, which costs a missed trade but never offers one that reverts. Consumer rule 7 exists because a removed event does not say what the status was before it: the same status may have been set by an earlier event, so reversing the removed one can unlock a token that is still locked. The view functions answer that directly.
Behavior rule 1 requires the ERC-721 or ERC-1155 identifier because a contract often emits DefaultLocked(true) at deployment, before any token exists. A consumer that first learns about the contract from that event needs to know which token standard to expect.
Mints and burns
Pausing secondary trading during a mint is the main temporary use case, so locking restricts holder transfers only. A permanently locked contract can still allow burning, so holders of a non-transferable token can dispose of it.
This proposal does not say who may burn a locked token. Limiting burns of permanently locked tokens to the holder would block two common patterns: an issuer revoking a credential, and burn-to-redeem, where a separate redemption contract burns the token as an approved operator. A redemption flow that instead transfers the token to a burn address makes a holder transfer, which behavior rule 7 rejects after PermanentlyLocked, so an operator burn is the only way to redeem a permanently locked token. ERC-5484 defines how a soulbound ERC-721 token declares who may burn it.
ERC-1155
ERC-6982’s interface uses only a tokenId, which maps directly to an ERC-1155 token type ID. Applying the same events and functions to ERC-1155 gives multi-token contracts a lock signal without a parallel standard. ERC-6982 requires locked to revert for tokens that do not exist, so ERC-1155 needs a definition of existence. A token ID exists while its total supply is above zero, which matches ERC-721, where a burned token stops existing and locked reverts for it. An ERC-1155 contract therefore needs to track supply per token ID, which some libraries offer only as an extension, such as OpenZeppelin’s ERC1155Supply.
No time-based changes
ERC-6982 requires defaultLocked to reflect the most recent DefaultLocked event, so lock status already changes only through events. Behavior rule 8 applies the same rule to permanence. Some pauses have a known end, such as the close of a public mint, but this proposal leaves out an end time field. Pauses often end early or late, and a consumer that trusted a stale end time would offer orders that revert.
Approvals
Blocking approve and setApprovalForAll during a temporary lock would stop holders from preparing listings and would add no protection, since the transfer itself already reverts or is not offered.
Revoking an approval stays possible in every state because a lock takes away the holder’s other defense against an operator it no longer trusts. A holder who can transfer can move the token to another address. A holder of a locked token cannot, and after PermanentlyLocked never can. In a contract that lets approved operators burn, revoking the approval is then the only way to stop that operator from destroying the token. Without behavior rule 9, a contract that accepted approvals during a temporary lock and rejected every approval call after PermanentlyLocked would leave those approvals in place for good.
Rule 9 applies only to approvals that exist. A contract that is permanently locked from deployment can reject every approval, which saves holders from paying for approvals that can never lead to a sale. A contract can also reject new approvals after PermanentlyLocked, or stop honoring approvals granted before it so that isApprovedForAll and getApproved report none. Rejecting new approvals also blocks the operator burns described in Mints and burns.
Some contracts build in an operator, such as a marketplace’s transfer contract or a transfer validator, by having isApprovedForAll return true for it whatever the holder has stored. A call to revoke that operator succeeds and leaves the approval in place. After PermanentlyLocked, rule 9 requires the approval to be gone once the call returns, because revoking is then the holder’s only remedy for good, and the operator has no transfers left to make, so the contract loses nothing by dropping it. During a temporary lock, rule 9 only forbids the revert. Requiring the approval to be gone then would make every contract with a built-in operator store a per-holder opt-out, and that operator is what lets trading resume when the lock lifts.
Relationship to ERC-5192
ERC-5192 and ERC-6982 share the locked(uint256) function, so a contract can implement both. Every token of a permanently locked contract is what ERC-5192 calls a soulbound token. A permanently non-transferable collection can emit DefaultLocked(true) and PermanentlyLocked() once at deployment instead of one ERC-5192 Locked event per token. ERC-5192 remains the way to make single tokens soulbound.
Backwards Compatibility
Every contract that implements this proposal is also a valid ERC-6982 contract. Consumers that only understand ERC-6982 see the tokens of a permanently locked contract as locked, whether they call locked or replay ERC-6982 events, which is the safe reading. Behavior rule 6 is what makes the event history agree with the view. Contracts deployed before this proposal do not implement it, and consumers continue to handle them as they do today.
Test Cases
The following lifecycle checks behavior rules 6 and 7 for a token ID that is unlocked, burned, and minted again. It applies to ERC-1155 contracts and to ERC-721 contracts that can mint a burned token ID again.
The contract emits DefaultLocked(true) and mints token ID 1.
The contract emits Locked(1, false). locked(1) returns false.
The whole supply of token ID 1 is burned. Token ID 1 no longer exists, and locked(1) reverts.
The contract emits Locked(1, true) and then PermanentlyLocked(), as rule 6 requires even though token ID 1 does not exist.
Token ID 1 is minted again.
locked(1) and permanentlyLocked() return true, and the most recent Locked event for token ID 1 sets it to true, so a consumer that replays ERC-6982 events also sees it as locked.
A holder transfer of token ID 1 reverts.
Reference Implementation
The following ERC-721 contract locks every token at deployment. The owner can unlock, lock again, or make the lock permanent, after which it can no longer change. It uses the _update hook of OpenZeppelin Contracts 5.x, which runs for mints, burns, and transfers. It never unlocks single tokens, so behavior rule 6 needs no extra events before lockPermanently emits PermanentlyLocked. The IERC6982 interface is copied from ERC-6982.
An ERC-1155 contract applies the same check to each ID in _update(from, to, ids, values).
Security Considerations
The lock status is reported by the token contract itself. A contract can report a token as unlocked and still revert transfers, or report it as permanently locked and allow them. Consumers should treat the signal as a way to hide orders that will fail, and should keep simulating fulfillments rather than trusting the signal to approve them.
A permanent lock is only as permanent as the contract’s code. If the contract sits behind an upgradeable proxy, or delegates its transfer checks to logic an administrator can replace, an upgrade can make tokens transferable again without emitting any unlock event. Wallets and marketplaces that label tokens as non-transferable should check whether the contract is upgradeable and who controls the upgrade.
Whoever controls the lock controls the secondary market for the affected tokens. A creator can make a lock permanent at any time, which removes the secondary market for good. A creator can also keep a temporary lock in place indefinitely, or lock just before a sale to make outstanding orders unfillable. Holders and buyers should be able to see who can change the lock and whether it can still be lifted. Consumers may want to show that information alongside the token.
The risk grows when locking comes with a contract template rather than from a creator’s choice to use it. Every owner account, including one whose private key was stolen, can then end trading in a live collection for good. Such contracts can limit when the lock can become permanent, for example only before the first token is minted.
A temporary lock can also outlive whoever controls it. If the last account able to unlock gives up that ability, for example by renouncing ownership, the lock can never lift, yet permanentlyLocked() still returns false, and consumers following consumer rule 2 keep orders waiting for an unlock that cannot happen. Contracts can refuse to give up the ability to unlock while tokens are locked, or make the lock permanent first. Consumers may want to check whether any account can still unlock.
A lock also changes what an approval allows. A holder of a locked token cannot move it away from an approved operator, and after PermanentlyLocked never can. In contracts that let approved operators burn, as OpenZeppelin’s ERC721Burnable and ERC1155Burnable do, an approval still in place lets that operator destroy the token, and revoking the approval is the holder’s only remedy. Behavior rule 9 keeps revocation available. Wallets should show outstanding approvals on locked tokens. Contracts with no use for operator burns, such as credentials without a burn-to-redeem flow, can limit burning to the holder or the issuer, or reject approvals altogether.
Some contracts preapprove an operator, such as a marketplace’s transfer contract, by having isApprovedForAll always return true for it. During a temporary lock, a call to revoke that operator meets behavior rule 9 by not reverting, but the approval can stay. If that operator can burn, the holder of a temporarily locked token has no remedy until the lock lifts, so such a contract should not let that operator burn locked tokens. After PermanentlyLocked, rule 9 requires a revoked approval to be gone.
A transfer can make external calls before balances change, for example to a transfer validator. If the called contract can change the lock, a transfer that already passed its lock check can complete after the contract emits PermanentlyLocked in the same transaction. Contracts that make such calls should check the lock again after they return.
The lock status can change between the time an order is created and the time it is filled. A buyer’s transaction can revert if the creator locks in the same block. Consumers should check the status close to fulfillment.
Consumers calling locked or permanentlyLocked should bound the gas they pass to the call, since the functions run arbitrary contract code, and should handle the revert locked raises for tokens that do not exist.