-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Foundry Fund Me F24 | ||
|
||
A decentralized funding platform built with Solidity, utilizing the Foundry framework for development, testing, and deployment. This project allows users to securely contribute funds to a smart contract, enabling a transparent and decentralized way to support projects. | ||
|
||
--- | ||
|
||
## π Table of Contents | ||
|
||
- [Foundry Fund Me F24](#foundry-fund-me-f24) | ||
- [π Table of Contents](#-table-of-contents) | ||
- [π Features](#-features) | ||
- [βοΈ Tech Stack](#οΈ-tech-stack) | ||
- [π Installation](#-installation) | ||
- [π€Έ Usage](#-usage) | ||
- [π οΈ Makefile Commands](#οΈ-makefile-commands) | ||
- [π§ Configuration Details](#-configuration-details) | ||
- [π€ Contributing](#-contributing) | ||
- [π License](#-license) | ||
|
||
--- | ||
|
||
## π Features | ||
|
||
- **Decentralized Funding**: Users can fund projects directly through the smart contract. | ||
- **Smart Contracts with Solidity**: Transactions are secure and transparent, leveraging the Ethereum blockchain. | ||
- **Network Compatibility**: Configurations for Sepolia, Mainnet, and Anvil test environments. | ||
- **Mock Price Feeds**: Uses `MockV3Aggregator` for simulating price feeds on local Anvil networks. | ||
|
||
--- | ||
|
||
## βοΈ Tech Stack | ||
|
||
- **Solidity** (version 0.8.18) | ||
- **Foundry** - development and testing framework | ||
- **Chainlink Price Feeds** - real and mock data for funding calculations | ||
|
||
--- | ||
|
||
## π Installation | ||
|
||
1. **Clone the repository**: | ||
```sh | ||
git clone https://github.com/RomThpt/foundry-fund-me-f24.git | ||
``` | ||
2. **Navigate to the project directory**: | ||
```sh | ||
cd foundry-fund-me-f24 | ||
``` | ||
3. **Install dependencies**: | ||
```sh | ||
forge install | ||
``` | ||
|
||
--- | ||
|
||
## π€Έ Usage | ||
|
||
1. **Compile the smart contracts**: | ||
```sh | ||
forge build | ||
``` | ||
2. **Run tests**: | ||
```sh | ||
forge test | ||
``` | ||
|
||
--- | ||
|
||
## π οΈ Makefile Commands | ||
|
||
For convenience, the project includes a Makefile with pre-defined commands: | ||
|
||
- **Build**: Compile the contracts | ||
```sh | ||
make build | ||
``` | ||
- **Deploy to Sepolia**: Deploy the contract to the Sepolia test network | ||
```sh | ||
make deploy-sepolia | ||
``` | ||
|
||
## π§ Configuration Details | ||
|
||
The project includes configurations for different networks, with automatic selection based on `block.chainid`: | ||
|
||
- **Sepolia Network**: Uses Chainlink's Sepolia price feed at `0x694AA1769357215DE4FAC081bf1f309aDC325306`. | ||
- **Mainnet**: Configured with the mainnet price feed at `0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419`. | ||
- **Anvil (Local)**: Creates a mock price feed with `MockV3Aggregator` if no other configuration is found. | ||
## π€ Contributing | ||
Contributions are welcome! Please open an issue or submit a pull request to discuss any potential changes. | ||
## π License | ||
This project is licensed under the MIT License. | ||
--- | ||
Thanks @cyfrin for the course |