This is the frontend client for interacting with ERC-20 standard tokens. While it is currently configured to work with the Kal-El Token, it can be adapted to interact with any ERC-20 token by updating the environment variables.
- Wallet Integration: Connect your wallet to interact with the blockchain.
- Token Operations:
- View token balance.
- Transfer tokens.
- Approve allowances.
- Check allowances.
- Owner Operations:
- Mint and burn tokens.
- Pause and unpause token operations.
- Transfer ownership.
- Frontend Framework: Next.js
- UI Library: Chakra UI
- Blockchain Interaction: wagmi, viem
- Styling: Tailwind CSS (for additional customization)
Ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/Azeem-0/kal-el-token-dashboard.git
-
Navigate to the project directory:
cd kal-el-token-dashboard
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env.local
file in the root directory and add the following:NEXT_PUBLIC_CONTRACT_ADDRESS=<Your Contract Address> - Use the address of your deployed contract or any existing ERC20 contract address
-
Start the development server:
npm run dev
-
Open your browser and navigate to:
http://localhost:3000
- Click the "Connect Wallet" button to connect your Ethereum wallet.
- Ensure you are on the correct network (e.g., Sepolia).
- View Balance: Displays your current token balance.
- Transfer Tokens: Transfer tokens to another address.
- Approve Allowance: Approve a spender to use a specified amount of tokens.
- Check Allowance: View the allowance for a specific spender.
- Mint Tokens: Add new tokens to the total supply.
- Burn Tokens: Remove tokens from the total supply.
- Pause/Unpause: Toggle the paused state of the token contract.
- Transfer Ownership: Assign ownership of the contract to a new address.
- Owner-Only Functions : The functions that are intended to be restricted to the owner (such as minting, burning, pausing, and transferring ownership) are made public in this contract for testing purposes only. In a production environment, these functions should be restricted to the owner using modifiers like onlyOwner to prevent unauthorized access.