βœ…OpenZeppelin ERC721

Intro

OpenZeppelin ERC721 implementation

Important functions:

  • setApprovalForAll()

  • transferFrom()

  • safeTransferFrom()

setApprovalForAll

This function is extremely dangerous: it approves an "operator" to handle all of your NFTs. You can imagine that it is hazardous in a phishing scenario.

transferFrom

There is no transfer function in ERC721 (only _transfer() exists).

There are 3 cases where you can call transferFrom():

  1. You are the owner.

  2. You are the operator set by setApprovalForAll().

  3. You are approved to handle this tokenId.

safeTransferFrom

The receiving contract must implement onERC721Received().

Last updated