Skip to content

Instantly share code, notes, and snippets.

@Hazelwu2
Created August 20, 2022 01:52
Show Gist options
  • Select an option

  • Save Hazelwu2/c592bcbb5423863f049de724016b526d to your computer and use it in GitHub Desktop.

Select an option

Save Hazelwu2/c592bcbb5423863f049de724016b526d to your computer and use it in GitHub Desktop.
基本題ERC20
// 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