For detailed documentation on interacting with the contract, refer to the documentation.
This document provides an overview of the 42T project, an ERC-20 token deployed using Hardhat.
42T is an ERC-20 token designed for interaction within a blockchain-based ecosystem where users can buy zombies (creatures) with the token. It integrates ERC-20 functionality with unique use cases, including buying and managing in-game assets.
The contract was developed and deployed using Hardhat, with a focus on simplicity, testing, and scalability.
- Name: 42T
- Symbol: 42T
- Decimals: 18 (standard for ERC-20)
- Total Supply: 1,000,000 tokens
- Zombie Price: 100 tokens per zombie
- Zombie Creation: Players can purchase zombies using 42T tokens, each with unique stats.
- Token Transfers: The token follows the standard ERC-20 functionality, allowing for transfers, approvals, and balance checks.
Hardhat was chosen for this project because of its:
- Ease of Use: Simplifies development and testing processes.
- Built-in Network: Hardhat Network provides a local blockchain for development and testing.
- Comprehensive Tools: Includes powerful features for debugging, script automation, and console testing.
The project leverages OpenZeppelin's trusted contracts, including:
- ERC20: The base implementation for the token.
Before running the project, ensure you have the following tools installed:
- Node.js (LTS version)
- npm or yarn
Clone the repository and install the dependencies:
git clone https://github.com/...
cd Tokenizer
npm installCompile the smart contracts using Hardhat:
npm run compileRun the tests to ensure everything is working as expected:
npm run test-
Start a local Hardhat node:
npx hardhat node
-
In another terminal, deploy the contract using Hardhat Ignition:
npx hardhat ignition deploy ./ignition/modules/T42TModule.js --network localhost
-
Verify the deployment:
npx hardhat run deploy/check.js --network localhost
-
Interact with the deployed contract:
npx hardhat run deploy/interact.js --network localhost
42T can be used to buy in-game assets, such as zombies, each with the following stats:
- Name: Default-Zombie
- Health: 100
- Attack: 10
- Defense: 5
Feel free to open issues or submit pull requests to enhance the functionality and features of the project.
This project is open-source and licensed under the MIT License.
For further details on interacting with the contract or testing the functionality, refer to the specific module documentation inside the ./ignition/modules.