SimpleNFT that inherits from OpenZeppelin's ERC721.SimpleNFT and symbol to SNFT.mintNFT that takes an address recipient and a uint256 tokenId and mints a new token to the recipient.ERC721 implementation for standard NFT behavior.SimpleNFT that inherits from OpenZeppelin's ERC721.SimpleNFT and symbol to SNFT.mintNFT that takes an address recipient and a uint256 tokenId and mints a new token to the recipient.ERC721 implementation for standard NFT behavior.SimpleNFT that imports OpenZeppelin's ERC721 contract from @openzeppelin/contracts/token/ERC721/ERC721.sol.Use import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; and declare contract SimpleNFT is ERC721.
SimpleNFT that calls the ERC721 constructor with the name "SimpleNFT" and symbol "SNFT".Use constructor() ERC721("SimpleNFT", "SNFT") {} to set the token name and symbol.
mintNFT that takes address recipient and uint256 tokenId as parameters and calls _mint(recipient, tokenId) to mint the token.Define function mintNFT(address recipient, uint256 tokenId) public and call _mint(recipient, tokenId); inside it.
mintNFT to mint token ID 1 to address 0x1234567890123456789012345678901234567890.Write a comment showing the call: simpleNFT.mintNFT(0x1234567890123456789012345678901234567890, 1);
What is the main purpose of the ERC-721 standard in blockchain?
Which of the following is the correct way to inherit OpenZeppelin's ERC721 contract in Solidity?
contract MyNFT is ? {}is ERC721 correctly inherits the NFT functionality.What will be the output of the following Solidity function when called?
function mintToken(address to, uint256 tokenId) public {
_mint(to, tokenId);
}
// Assume _mint works as expected and tokenId = 1, to = 0x123...What happens after calling mintToken(0x123..., 1)?
Identify the error in this Solidity snippet for minting an ERC-721 token:
function mint(address to, uint256 tokenId) public {
_mint(tokenId, to);
}You want to create an ERC-721 contract that only allows the contract owner to mint new tokens. Which of these Solidity code snippets correctly enforces this?
contract MyNFT is ERC721, Ownable {
function mint(address to, uint256 tokenId) public {
?
_mint(to, tokenId);
}
}Pass the test and this pattern moves unknown