Skip to content

Commit

Permalink
Add README.md for ERC-20 project
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamadiftikharr committed Nov 28, 2024
1 parent 2aed42b commit c09f88b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Foundry-ERC20
This project implements an ERC-20 token using OpenZeppelin contracts and provides additional features for deployment and testing.

Overview
The project contains the following key components:

1. OurToken.sol
This is the main ERC-20 token contract.
Inherits the standard ERC-20 implementation from OpenZeppelin.
Implements all core functionalities of an ERC-20 token.
2. ManualToken.sol
A custom ERC-20 token implementation created manually for learning and experimentation purposes.
Provides a basic understanding of how ERC-20 tokens work without relying on libraries.
3. Tests
Comprehensive tests for the token contracts are included to ensure their correctness and security.
Uses Foundry for testing.
Covers standard ERC-20 functionalities like transfer, approve, and transferFrom.
4. Deployment Script
Includes a script to deploy the token contracts on the blockchain.
Script is flexible and supports deployment on test networks like Sepolia or local networks like Anvil.
How to Use
Install Dependencies
Make sure you have Foundry installed. If not, install it by following the instructions here.

Clone the Repository
bash
Copy code
git clone https://github.com/Hamadiftikharr/foundry-erc20.git
cd foundry-erc20
Run Tests
To ensure everything is working as expected:

bash
Copy code
forge test
Deploy the Contract
To deploy the OurToken contract:

bash
Copy code
forge script script/DeployOurToken.s.sol:DeployOurToken --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast
Key Features
Reusable: Uses OpenZeppelin's highly tested and secure libraries for token implementation.
Custom Implementation: ManualToken provides insight into the inner workings of ERC-20 contracts.
Complete Setup: Includes tests and deployment scripts for a full development workflow.

0 comments on commit c09f88b

Please sign in to comment.