Skip to content

Instantly share code, notes, and snippets.

@iamonuwa
Created November 15, 2020 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamonuwa/489d1ae0449004a20523fc53dbb36c0b to your computer and use it in GitHub Desktop.
Save iamonuwa/489d1ae0449004a20523fc53dbb36c0b to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.8.0;
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol';
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol';
contract ExampleToken is ERC20 {
using SafeMath for uint256;
uint8 public constant DECIMALS = 18;
constructor () ERC20("EXAToken", "ETN") public {}
function mint(address to, uint amount) public returns (bool) {
_mint(to, amount);
return true;
}
function burn(address to, uint256 amount) public returns (bool) {
_burn(to, amount);
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment