β OpenZeppelin ERC721
Intro
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():
You are the owner.
You are the operator set by
setApprovalForAll().You are approved to handle this
tokenId.
safeTransferFrom
The receiving contract must implement onERC721Received().
Last updated
Was this helpful?
