|
|
|
|
|
|
|
pragma solidity ^0.8.9; |
|
|
|
import "./ERC20.sol"; |
|
import "./ERC20Burnable.sol"; |
|
import "./ERC20Snapshot.sol"; |
|
import "./Ownable.sol"; |
|
import "./Pausable.sol"; |
|
import "./draft-ERC20Permit.sol"; |
|
import "./ERC20Votes.sol"; |
|
import "./ERC20FlashMint.sol"; |
|
|
|
contract ONTACT is ERC20, ERC20Burnable, ERC20Snapshot, Ownable, Pausable, ERC20Permit, ERC20Votes, ERC20FlashMint { |
|
constructor() ERC20("Ontact Token", "ONT") ERC20Permit("Ontact Token") { |
|
_mint(msg.sender, 3000000000 * 10 ** decimals()); |
|
} |
|
|
|
function snapshot() public onlyOwner { |
|
_snapshot(); |
|
} |
|
|
|
function pause() public onlyOwner { |
|
_pause(); |
|
} |
|
|
|
function unpause() public onlyOwner { |
|
_unpause(); |
|
} |
|
|
|
function mint(address to, uint256 amount) public onlyOwner { |
|
_mint(to, amount); |
|
} |
|
|
|
function _beforeTokenTransfer(address from, address to, uint256 amount) |
|
internal |
|
whenNotPaused |
|
override(ERC20, ERC20Snapshot) |
|
{ |
|
super._beforeTokenTransfer(from, to, amount); |
|
} |
|
|
|
|
|
|
|
function _afterTokenTransfer(address from, address to, uint256 amount) |
|
internal |
|
override(ERC20, ERC20Votes) |
|
{ |
|
super._afterTokenTransfer(from, to, amount); |
|
} |
|
|
|
function _mint(address to, uint256 amount) |
|
internal |
|
override(ERC20, ERC20Votes) |
|
{ |
|
super._mint(to, amount); |
|
} |
|
|
|
function _burn(address account, uint256 amount) |
|
internal |
|
override(ERC20, ERC20Votes) |
|
{ |
|
super._burn(account, amount); |
|
} |
|
} |
|
|