Skip to content

Instantly share code, notes, and snippets.

@paulwu0903
paulwu0903 / GuessNumber.sol
Created November 4, 2023 01:52
猜數字範例
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
contract GuessNumber {
@paulwu0903
paulwu0903 / PaulToken.sol
Created October 26, 2022 11:54
基本題ERC20
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract PaulToken is ERC20{
uint256 public initialSupply = 10000;
@paulwu0903
paulwu0903 / PaulToken.sol
Created October 25, 2022 12:32
基本題ERC721
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract PaulToken is ERC20{
constructor () ERC20 ("PaulToken", "PT"){}
@paulwu0903
paulwu0903 / PaulNFT.sol
Created October 25, 2022 12:15
基本題ERC721
//SPDX-License-Identifier: MIT
pragma solidity >= 0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract PaulNFT is ERC721{
constructor() ERC721("PaulNFT", "Paul"){
}