Remix发布ERC20合约

阅读 97

2022-01-15

通过Remix发布ERC20合约

https://remix.ethereum.org/

准备好合约代码

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract ERC20Token is ERC20, ERC20Burnable, Ownable {
    constructor() ERC20("ERC20Token", "ETK") {
        _mint(msg.sender, 1200000000 * 10 ** decimals());
    }

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }
}

精彩评论(0)

0 0 举报