Last active
October 29, 2021 11:33
-
-
Save nhancv/10c0243040befdadff745ee3690e2fbd to your computer and use it in GitHub Desktop.
MockERC721
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.4; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
contract MockERC721 is ERC721 { | |
constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) { | |
mint(msg.sender, 0); | |
} | |
function mint(address account, uint256 id) public { | |
_mint(account, id); | |
} | |
/** | |
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each | |
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty | |
* by default, can be overriden in child contracts. | |
*/ | |
function _baseURI() internal pure override returns (string memory) { | |
return "https://google.com"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment