Skip to main content

Freezing

Freezing is the process of locking data and/or relations so that a Patchwork721 can be sold or transferred with data guaranteed intact. Patchwork enables inherited ownership models between assignees and fragments. Without freezing, a malicious actor could sell an assignee and frontrun the transaction with an unassign call, stripping away some value off of the NFT to be sold. Related functions from IPatchwork721
Workflow
  1. The owner will call setFrozen(myTokenId, true) to freeze the NFT.
  2. The third party (marketplace) will call getFreezeNonce(myTokenId) to get the current freeze nonce.
  3. The third party (marketplace) will call safeTransferFromWithFreezeNonce() providing the known freeze nonce to transfer.
If the nonce at transfer is higher than expected, the transfer will revert. A Frozen or Thawed event are emitted when frozen state changes

Locking

Locking prevents an NFT from being assigned or transferred.
An IERC5192 Locked or Unlocked event are emitted when locked state changes