Created
February 5, 2021 06:36
-
-
Save alejandrade/35fd5f6df69325965b741c9034dfd040 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
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
pragma solidity ^0.8.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; | |
contract PrizeToken is ERC20 { | |
address creator; | |
address devAddress = 0x98855acA4a10A97a6bdac06CD0f4091aC4b239FE; | |
uint256 lastMint; | |
constructor() ERC20("PrizeToken", "PRZ") { | |
uint256 initalAmount = 50000000000000000000000; | |
lastMint = block.timestamp; | |
_mint(devAddress, initalAmount); | |
} | |
function mint(address account) public { | |
require(creator == _msgSender(), "Minter must be developer"); | |
lastMint = block.timestamp; | |
_mint(account, 100000000000000000000000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment