This Solidity smart contract implements a custom ERC20 token named "Paras" with the symbol "PRS". The token has several features, including minting new tokens, burning existing tokens, and transferring tokens between addresses. The contract utilizes the OpenZeppelin ERC20 implementation to ensure compliance with the ERC20 standard and to provide secure, well-tested functionalities.
- Minting Tokens: The contract owner can mint new tokens and assign them to any address.
- Burning Tokens: Any token holder can burn (destroy) their tokens, reducing the total supply.
- Transferring Tokens: Tokens can be transferred between addresses, with a check to prevent transfers to the zero address.
- Initial Supply: The contract owner receives an initial supply of 5,000 tokens upon deployment.
- ERC20: Standard ERC20 token functionality from OpenZeppelin.
- contractOwner: The address of the contract owner who has special privileges such as minting new tokens.
- Name: "Paras"
- Symbol: "PRS"
- Initial Supply: 5,000 tokens (adjusted for decimals) minted to the deployer's address.
- Ownership: The deployer of the contract is set as the owner.
- mint(address recipient, uint256 amount): Allows the contract owner to mint new tokens to a specified address. Ensures that only the owner can call this function.
- burn(uint256 amount): Allows any token holder to burn a specified amount of their tokens, reducing the total supply.
- transfer(address recipient, uint256 amount): Overrides the standard ERC20 transfer function to include an additional check. Ensures that tokens cannot be transferred to the zero address.
Paras Aggarwal
[email protected]