Untitled
unknown
plain_text
a year ago
1.6 kB
6
Indexable
// SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts@5.0.2/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts@5.0.2/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts@5.0.2/token/ERC20/extensions/ERC20Pausable.sol"; import "@openzeppelin/contracts@5.0.2/access/Ownable.sol"; import "@openzeppelin/contracts@5.0.2/token/ERC20/extensions/ERC20Permit.sol"; import "@openzeppelin/contracts@5.0.2/token/ERC20/extensions/ERC20Votes.sol"; import "@openzeppelin/contracts@5.0.2/token/ERC20/extensions/ERC20FlashMint.sol"; contract TestERC20 is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit, ERC20Votes, ERC20FlashMint { constructor(address initialOwner) ERC20("TestERC20", "TERC20") Ownable(initialOwner) ERC20Permit("TestERC20") { _mint(msg.sender, 1000000 * 10 ** decimals()); } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function mint(address to, uint256 amount) public onlyOwner { _mint(to, amount); } // The following functions are overrides required by Solidity. function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Pausable, ERC20Votes) { super._update(from, to, value); } function nonces(address owner) public view override(ERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } }
Editor is loading...
Leave a Comment