Skip to content

Instantly share code, notes, and snippets.

@nhancv
Last active October 29, 2021 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhancv/10c0243040befdadff745ee3690e2fbd to your computer and use it in GitHub Desktop.
Save nhancv/10c0243040befdadff745ee3690e2fbd to your computer and use it in GitHub Desktop.
MockERC721
// 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