This repository contains the Solidity source code for the DegenToken
smart contract, an ERC20 token with extended features and functionalities. The contract leverages the OpenZeppelin library to provide standard ERC20 functionality, token burning, and ownership management. The token is designed to be used in a decentralized gaming ecosystem.
The DegenToken
contract implements the following features:
-
Token Information:
- Name: DegenGaming Token
- Symbol: DMT
-
Initial Supply:
- The contract's constructor allows the deployment address to mint an initial supply of tokens.
-
Minting:
- The contract owner can mint additional tokens to specified addresses.
-
Account Balance:
- Users can check their own token balance using the
checkAccountBalance
function.
- Users can check their own token balance using the
-
Custom Transfer:
- Users can initiate custom transfers of tokens using the
customTransfer
function, with additional checks for balance sufficiency.
- Users can initiate custom transfers of tokens using the
-
Redemption of Stationary Items:
- Users can redeem stationary items by providing an item code (1, 2, or 3) and having a sufficient balance of tokens. The item's price varies based on the item code.
- Redeemed tokens are transferred to the contract owner's address.
-
Token Burning:
- Users can burn their tokens using the
burnTokens
function.
- Users can burn their tokens using the
To deploy and interact with the DegenToken
smart contract, follow these steps:
- Deploy the contract, providing a name, symbol, and initial supply of tokens.
- As the contract owner, mint tokens to specific addresses using the
mintTokens
function. - Users can check their token balance with the
checkAccountBalance
function. - Users can initiate custom transfers using the
customTransfer
function. - Users can redeem stationary items using the
redeemStationaryItems
function, providing the correct item code and sufficient balance. - Users can burn their tokens using the
burnTokens
function.
This smart contract is licensed under the MIT License. You can find the license text in the SPDX-License-Identifier field in the source code files.
Please note that this README provides a high-level overview of the DegenToken
smart contract. Always review the source code thoroughly before deploying or interacting with any smart contract. Additionally, consider security audits and best practices for smart contract development.