SmartElectrum ERC-20 Token code
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: UNLICENSED | |
pragma solidity >=0.7.0 <0.9.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
/** | |
* @title Implementation of ERC20 interface | |
* @author Michal Wojcik | |
* @notice This is SmartElectrum project ERC20 token implementation | |
*/ | |
contract SelectToken is ERC20, Ownable { | |
/** | |
* @dev Initializes the contract with correct parameters. | |
*/ | |
constructor() ERC20("SmartElectrum", "SELECT") { | |
_mint(msg.sender, 100_000_000 * 10 ** decimals()); | |
} | |
/** | |
* @notice Destroy given amount of tokens and reduce the total supply. | |
* Can be called ONLY by contract OWNER. | |
* @param amount amount of tokens to destroy | |
* @dev Emits a {Transfer} event with `to` set to the zero address. | |
*/ | |
function burnTokens(uint amount) external onlyOwner() { | |
_burn(msg.sender, amount); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment