Skip to content

Instantly share code, notes, and snippets.

@Filip3Dev
Created July 5, 2020 16:33
Show Gist options
  • Save Filip3Dev/6568d64ef36a2f510e1f77d14a6d1a3b to your computer and use it in GitHub Desktop.
Save Filip3Dev/6568d64ef36a2f510e1f77d14a6d1a3b 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.6.2+commit.bacdbe57.js&optimize=false&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20Burnable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
contract STKToken is ERC20, ERC20Burnable, Ownable {
constructor(uint256 initialSupply) public ERC20("Stonks", "STK") {
_setupDecimals(2);
_mint(msg.sender, initialSupply);
}
function mintMore(address to, uint256 value) public onlyOwner returns (bool){
_mint(to, value);
}
}
pragma solidity ^0.6.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
contract STKToken is ERC20 {
constructor(uint256 initialSupply) public ERC20("Stonks", "STK") {
_mint(msg.sender, initialSupply);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment