Skip to content

Instantly share code, notes, and snippets.

@arif-1498
Created February 25, 2025 13:34
Show Gist options
  • Select an option

  • Save arif-1498/48d496002a959bae16cf7d53146ee557 to your computer and use it in GitHub Desktop.

Select an option

Save arif-1498/48d496002a959bae16cf7d53146ee557 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.22;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";
import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
contract MyToken is ERC20, ERC20Burnable, Ownable, ERC20Permit, ERC20FlashMint {
constructor(address initialOwner)
ERC20("Gold Token Coin", "GTC")
Ownable(initialOwner)
ERC20Permit("MyToken")
{}
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
}
@arif-1498
Copy link
Author

Token code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment