Locked and staked NFTs

Stop trading on tokens or collections whose transfers are locked

If a token can't be transferred, emit one of the events below. OpenSea marks it ineligible for trading, so users can't list or buy a token the contract will reject.

Emit them from the token contract itself, the address the tokens live at. For a proxy, that's the proxy address, and the events have to come from the implementation it runs. OpenSea applies each event to the contract that emitted it, so the same event from an extension, a transfer approval contract, or a wrapper that mints through the token contract leaves the tokens tradable.

Single tokens

StandardEventsOpenSea checks onchain
ERC-5192Locked(uint256 tokenId), Unlocked(uint256 tokenId)locked(tokenId)
ERC-6982Locked(uint256 indexed tokenId, bool locked)locked(tokenId)
ERC-5753Lock(address indexed unlocker, uint256 indexed id), Unlock(uint256 indexed id)getLocked(tokenId)
StakingStake(uint256 indexed tokenId), Unstake(uint256 indexed tokenId, uint256 stakedAtTimestamp, uint256 removedFromStakeAtTimestamp)isUnlocked(tokenId)
OtherTokenLocked(uint256 indexed tokenId, address indexed approvedContract), TokenUnlocked(uint256 indexed tokenId, address indexed approvedContract), Staked(address indexed user, uint256[] tokenIds, uint256 stakeTime), Unstaked(address indexed user, uint256[] tokenIds)None

If the onchain check fails, OpenSea uses the event.

Whole collections

Emit ERC-6982's DefaultLocked(bool locked) and implement defaultLocked(). For example, emit DefaultLocked(true) at deployment to pause trading during a mint, and DefaultLocked(false) when trading opens.

While the contract reports DefaultLocked(true), OpenSea:

  • Rejects new listings and offers.
  • Marks existing listings invalid and blocks accepting offers.
  • Treats every token as locked, including any unlocked with Locked(tokenId, false).

Minting is not affected, and DefaultLocked(false) makes the listings valid again. This works for ERC-721 and ERC-1155; for ERC-1155, tokenId is the token type ID.

Permanent locks

For a collection that will never be transferable, also implement ERC-8451 (draft): emit DefaultLocked(true), then PermanentlyLocked(), and revert holder transfers with TokenLocked(uint256 tokenId). OpenSea treats the collection as locked and reports TokenLocked reverts as transfer locked. It does not yet show permanent locks differently from paused ones.