ERC20 Token Contract Details
1. ERC20 Token Contract
The ERC20 contract allows users to create and manage their own custom tokens. Each token created has its own:
- Name and Symbol (e.g., "MyToken" / "MTK")
- Total Supply assigned at deployment
- Owner (the creator of the token)
- Transfer Functionality (Users can transfer tokens between addresses)
- Minting Capability (Token owner can create more tokens)
- Ownership Transfer (The owner can transfer token ownership to another user)
2. ERC20 Token Factory Contract
The ERC20TokenFactory contract acts as a factory to deploy new ERC720 tokens. It allows users to:
- Create a new custom ERC720 token with a chosen name, symbol, and initial supply.
- Keep track of all tokens they have created.
- Earn rewards for every 3 tokens they create.
Reward System
- The contract includes a reward mechanism, issuing 100 reward tokens each time a user creates their 3rd, 6th, 9th (etc.) token.
- The reward tokens are minted from a predefined reward token contract, which the contract owner can set.
Security & Admin Controls
- Only the owner of a token can mint more tokens or transfer ownership.
- The factory owner can change the reward token if needed.
Use Case Scenarios
- Developers & Entrepreneurs: Create and manage multiple custom tokens for projects, loyalty programs, or governance.
- Gamification: Users can create tokens for in-game assets, with rewards incentivizing token creation.
- DeFi & Experimentation: Users can experiment with different tokens and manage their own token ecosystems.
ERC20 Dapp Details
The ECS ERC20 Token Manager is a decentralized application (dApp) built with React and Ethers.js. It allows users to interact with an ERC20 token factory contract deployed on the Ethereum blockchain (Sepolia testnet). The app provides a user-friendly interface for managing tokens, authorizing accounts, and performing various token-related operations.
Key Features
1. Wallet Connection
-
Functionality: Users can connect their Ethereum wallet (e.g., MetaMask) to the app.
-
Purpose: This enables the app to interact with the blockchain on behalf of the user.
-
How It Works:
-
The app detects if MetaMask is installed.
-
It requests permission to access the user's wallet address.
-
Once connected, the app displays the user's wallet address and balance.
-
2. Token Management
-
Functionality: Users can create new ERC20 tokens and manage existing ones.
-
Purpose: This allows users to deploy their own tokens and interact with them.
-
How It Works:
-
Users input the token name, symbol, and initial supply.
-
The app interacts with the token factory contract to deploy a new token.
-
Users can view the deployed token's address, symbol, and total supply.
-
3. Account Authorization
-
Functionality: Users can authorize or revoke accounts to interact with the token factory.
-
Purpose: This ensures that only authorized accounts can perform certain actions (e.g., creating tokens).
-
How It Works:
-
Users select an account from a dropdown list.
-
They can authorize or revoke the selected account using the token factory contract.
-
4. Token Operations
-
Functionality: Users can perform token operations such as minting, burning, and transferring tokens.
-
Purpose: This allows users to manage the supply and distribution of their tokens.
-
How It Works:
-
Mint Tokens: Users specify an address and amount to mint new tokens.
-
Burn Tokens: Users specify an amount to burn (destroy) tokens.
-
Transfer Tokens: Users specify a recipient address and amount to transfer tokens.
-
5. Transaction History
-
Functionality: Users can view their recent wallet transactions.
-
Purpose: This provides transparency and allows users to track their activity on the blockchain.
-
How It Works:
-
The app fetches transaction data from the Etherscan API.
-
It displays details such as transaction hash, sender, recipient, amount, and status.
-
Technical Details
Technologies Used
-
Frontend: React.js (for building the user interface).
-
Blockchain Interaction: Ethers.js (for connecting to the Ethereum blockchain and interacting with smart contracts).
-
Styling: CSS (for custom styles and theming).
-
APIs: Etherscan API (for fetching transaction data).
Smart Contract
-
The app interacts with a Token Factory Contract deployed on the Ethereum Sepolia testnet.
-
The contract allows users to:
-
Create new ERC20 tokens.
-
Authorize/revoke accounts.
-
Mint, burn, and transfer tokens.
-
User Flow
-
Connect Wallet:
-
Users connect their Ethereum wallet to the app.
-
The app displays their wallet address and balance.
-
-
Create Token:
-
Users input token details (name, symbol, initial supply).
-
The app deploys a new ERC20 token and displays its details.
-
-
Authorize/Revoke Accounts:
-
Users select an account from the dropdown.
-
They authorize or revoke the account using the token factory contract.
-
-
Perform Token Operations:
-
Users mint, burn, or transfer tokens using the app's interface.
-
-
View Transactions:
-
Users can view their recent wallet transactions fetched from the Etherscan API.
-
Purpose and Use Cases
-
Token Creation: Users can create their own ERC20 tokens for testing or real-world use.
-
Token Management: Users can manage token supply and distribution.
-
Account Management: Users can control which accounts are authorized to interact with the token factory.
-
Transaction Tracking: Users can monitor their wallet activity on the blockchain.
Conclusion
The ECS ERC20 Token Manager is a powerful and user-friendly dApp for managing ERC20 tokens on the Ethereum blockchain. It combines essential token management features with a sleek and professional design, making it a valuable tool for developers, businesses, and blockchain enthusiasts.
Create Your Own Website With Webador