Created
August 20, 2022 01:52
-
-
Save Hazelwu2/c592bcbb5423863f049de724016b526d to your computer and use it in GitHub Desktop.
基本題ERC20
This file contains hidden or 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.0; | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| contract HazelNFT is ERC721 { | |
| // TODO: 改掉 name, symbol | |
| constructor() ERC721("HazelNFT", "HZ") {} | |
| function mint(uint256 tokenId) public { | |
| _safeMint(msg.sender, tokenId); | |
| } | |
| // 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4 | |
| // mint 2個 nft (tokenId: 0, 1) | |
| // 2號 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment