-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHPMXToken
More file actions
30 lines (26 loc) · 981 Bytes
/
Copy pathHPMXToken
File metadata and controls
30 lines (26 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract HPMXToken is ERC20, Ownable {
constructor() ERC20("HPMX", "HPMX") Ownable(msg.sender) {
// Initial supply: 222,222,222 * (10 ** 18)
uint256 initialSupply = 222_222_222 * 10 ** decimals();
_mint(0xFA723ba7d35Df699AB76100D903754945D334c99, initialSupply);
}
/**
* @notice Mint new tokens.
* @param account The account to receive the tokens.
* @param amount The number of tokens to mint (in smallest units).
*/
function mint(address account, uint256 amount) external onlyOwner {
_mint(account, amount);
}
/**
* @notice Burn tokens from the caller's account.
* @param amount The number of tokens to burn (in smallest units).
*/
function burn(uint256 amount) external {
_burn(msg.sender, amount);
}
}