I developed this project, a decentralized crowdfunding platform on the Ethereum blockchain, as part of the Cyfrin Updraft curriculum. It served as a practical exercise to teach core smart contract development principles using the Foundry framework.
Features
- Fund Contribution: Users can send Ether to the contract to contribute funds.
- Minimum Contribution: The contract enforces a minimum contribution amount, denominated in USD, by using a Chainlink Price Feed to get the real-time ETH/USD exchange rate.
- Owner-only Withdrawal: Only the contract's owner can withdraw the accumulated funds, ensuring secure access control.
- Comprehensive Testing: The project includes a full suite of unit tests to ensure all functions work as expected and the contract is secure.
- zkSync Compatibility: Includes scripts and configurations to test and deploy on zkSync networks.
Requirements
Installation
- Clone the repository:
git clone https://github.com/brenda87/FundMe-Project.git
cd FundMe-Project
-
Install dependencies: This command installs all the necessary libraries, including forge-std and chainlink-brownie-contracts.
make allThis single command runs a full setup, including installing all necessary libraries and compiling the contracts.
Usage
All common tasks are automated with make commands.
Testing
Run all unit tests to verify contract logic.
make test
To deploy your contract, use the deploy command.
-
To a local Anvil network:
make anvilmake deploy -
To the Sepolia testnet:
Set up your SEPOLIA_RPC_URL and ACCOUNT environment variables, then run:
make deploy-sepolia
Interactions
After deploying, you can use the following commands to interact with your contract.
-
To fund the contract:
make fund SENDER_ADDRESS=<your_address> ARGS="--value 0.1ether"To withdraw funds:
make withdraw SENDER_ADDRESS=<owner_address>