I’m following cryptozombie’s example for my learning. In this example the transferFrom and approve functions are payable. I thought of using OpenZeppelin’s ERC721 smart contract but found out that both of the functions are not payable. Why there is a difference in OpenZeppelin’s implementation of ERC721 contract?
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
snippet from OpenZeppelin’s ERC721.sol
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
Also what’s the difference between ERC721.sol and IERC721.sol and which to inherit for smart contract?