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: GPL-3.0 | |
pragma solidity ^0.4.24; | |
contract BasicToken { | |
uint256 totalSupply_; | |
mapping(address => uint256) balances; | |
constructor(uint256 _initialSupply) public { | |
totalSupply_ = _initialSupply; |
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.16; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
contract StakingToken is ERC20 { | |
constructor() ERC20("Staking Token", "ST") { | |
mint(msg.sender, 50000); | |
} |
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.16; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
/* | |
建立一個 Bank 銀行 | |
在 web3 世界人人都可以當銀行家!我們想開張一間去中心化金融中心,簡易小而美的銀行 | |
使用者可以將我們發行的 Staking Token (ERC20代幣)存入銀行 |
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.16; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
/* | |
建立一個 Bank 銀行 | |
在 web3 世界人人都可以當銀行家!我們想開張一間去中心化金融中心,簡易小而美的銀行 | |
使用者可以將我們發行的 Staking Token (ERC20代幣)存入銀行 |
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.16; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
contract RewardToken is ERC20 { | |
constructor() ERC20("Reward Token", "RT") { | |
_mint(msg.sender, 100 * 1e18); | |
} |
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; | |
contract XXXToken { | |
string public name; | |
string public symbol; | |
uint256 public totalSupply; | |
mapping(address => uint256) private balances; | |
address owner; |
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"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
contract XXXERC721 is ERC721 { | |
using Counters for Counters.Counter; | |
uint256 public mintPrice = 0.005 ether; |
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.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
contract WoWToken is ERC20 { | |
uint256 public _totalSupply = 10000; | |
constructor() ERC20("WoWToken", "WOW") { | |
_mint(msg.sender, _totalSupply); |
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.0; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
contract WoWNFT is ERC721 { | |
constructor() ERC721("WoWNFT", "WOW") {} | |
function mint(uint256 tokenId) public { | |
_safeMint(msg.sender, tokenId); |
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/ERC20/ERC20.sol"; | |
contract XDToken is ERC20 { | |
uint256 private _totalSupply = 10000; | |
address payable private owner; | |
constructor() ERC20("XDToken", "XD") { |
NewerOlder