ODCdataManagersERC721extensions

ERC721Mintable

Abstract contract that provides minting capabilities of the ERC721 Data Manager

onlyMinter

modifier onlyMinter()

Modifier to check if the caller is the minter

mint

function mint(address to, uint256 tokenId) public virtual

Mint token of id to to

The caller must be allowed to mint

Parameters

NameTypeDescription
toaddressAddress to mint token to
tokenIduint256Token id to mint

safeMint

function safeMint(address to, uint256 tokenId) public

_Mints tokenId, transfers it to to and checks for to acceptance.

Requirements:

  • tokenId must not exist.
  • If to refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.

Emits a {Transfer} event._

safeMint

function safeMint(address to, uint256 tokenId, bytes data) public

_Same as {xref-ERC721-safeMint-address-uint256-}[_safeMint], with an additional data parameter which is forwarded in {IERC721Receiver-onERC721Received} to contract recipients.

_checkMinter

function _checkMinter() internal virtual

SHOULD throw an error if the sender is not allowed to mint

On this page