This is a simple ERC20 token contract written in Solidity. It allows for the creation, transfer, and burning of tokens. The contract also includes an onlyOwner modifier to restrict access to certain functions.
- Implements the ERC20 token standard
- Allows the owner of the contract to mint new tokens
- Allows the owner of the contract to burn tokens
- Supports name, symbol, and decimals metadata
To use this contract, you will need a Solidity development environment and a wallet that supports ERC20 tokens, such as MetaMask.
- Clone this repository.
- Open the contract file in a Solidity IDE.
- Compile and deploy the contract to your preferred blockchain network.
- Interact with the contract using a wallet that supports ERC20 tokens.
- mint(address account, uint256 amount): Allows the contract owner to mint new tokens to an account.
- burn(address account, uint256 amount): Allows the contract owner to burn tokens from an account.
- transfer(address to, uint256 amount): Allows an account to transfer tokens to another account.
- approve(address spender, uint256 amount): Allows an account to approve another account to spend a certain amount of tokens on their behalf.
- transferFrom(address from, address to, uint256 amount): Allows an account with approved allowance to transfer tokens from another account.
- onlyOwner(): Restricts access to certain functions to the contract owner.
- name(): Returns the name of the token.
- symbol(): Returns the symbol of the token.
- decimals(): Returns the number of decimal places used by the token.