Skip to content

Commit c09f88b

Browse files
Add README.md for ERC-20 project
1 parent 2aed42b commit c09f88b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Foundry-ERC20
2+
This project implements an ERC-20 token using OpenZeppelin contracts and provides additional features for deployment and testing.
3+
4+
Overview
5+
The project contains the following key components:
6+
7+
1. OurToken.sol
8+
This is the main ERC-20 token contract.
9+
Inherits the standard ERC-20 implementation from OpenZeppelin.
10+
Implements all core functionalities of an ERC-20 token.
11+
2. ManualToken.sol
12+
A custom ERC-20 token implementation created manually for learning and experimentation purposes.
13+
Provides a basic understanding of how ERC-20 tokens work without relying on libraries.
14+
3. Tests
15+
Comprehensive tests for the token contracts are included to ensure their correctness and security.
16+
Uses Foundry for testing.
17+
Covers standard ERC-20 functionalities like transfer, approve, and transferFrom.
18+
4. Deployment Script
19+
Includes a script to deploy the token contracts on the blockchain.
20+
Script is flexible and supports deployment on test networks like Sepolia or local networks like Anvil.
21+
How to Use
22+
Install Dependencies
23+
Make sure you have Foundry installed. If not, install it by following the instructions here.
24+
25+
Clone the Repository
26+
bash
27+
Copy code
28+
git clone https://github.com/Hamadiftikharr/foundry-erc20.git
29+
cd foundry-erc20
30+
Run Tests
31+
To ensure everything is working as expected:
32+
33+
bash
34+
Copy code
35+
forge test
36+
Deploy the Contract
37+
To deploy the OurToken contract:
38+
39+
bash
40+
Copy code
41+
forge script script/DeployOurToken.s.sol:DeployOurToken --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast
42+
Key Features
43+
Reusable: Uses OpenZeppelin's highly tested and secure libraries for token implementation.
44+
Custom Implementation: ManualToken provides insight into the inner workings of ERC-20 contracts.
45+
Complete Setup: Includes tests and deployment scripts for a full development workflow.

0 commit comments

Comments
 (0)