Skip to content

Instantly share code, notes, and snippets.

@alejandrade
Created February 5, 2021 06:36
Show Gist options
  • Save alejandrade/f02c97a4e8114286a29c7389c43c74ce to your computer and use it in GitHub Desktop.
Save alejandrade/f02c97a4e8114286a29c7389c43c74ce 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=
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