# Alt - TestToken Script **Published by:** [My Web3 Article](https://paragraph.com/@nikka/) **Published on:** 2023-04-17 **URL:** https://paragraph.com/@nikka/alt-testtoken-script ## Content // SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin contracts/token/ERC20/ERC20.sol"; import "@openzeppelin contracts/access/Ownable.sol"; contract BitKuy is ERC20, Ownable { uint256 private constant MAX_SUPPLY = 21_000_000 10*18; constructor() ERC20("TestToken", "TEST") { uint256 initialSupply = 1_000_000 10*18; // Minting 1,000,000 tokens initially _mint(msg.sender, initialSupply); } function mint(address to, uint256 amount) public onlyOwner { require(totalSupply() + amount <= MAX_SUPPLY, "TestToken: Max supply exceeded"); _mint(to, amount); } } ## Publication Information - [My Web3 Article](https://paragraph.com/@nikka/): Publication homepage - [All Posts](https://paragraph.com/@nikka/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@nikka): Subscribe to updates ## Optional - [Collect as NFT](https://paragraph.com/@nikka/alt-testtoken-script): Support the author by collecting this post - [View Collectors](https://paragraph.com/@nikka/alt-testtoken-script/collectors): See who has collected this post