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.
You can view the deployed contract on Sepolia here.
- 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.
- Solidity (version 0.8.18)
- Foundry - development and testing framework
- Chainlink Price Feeds - real and mock data for funding calculations
- Clone the repository:
git clone https://github.com/RomThpt/foundry-fund-me-f24.git
- Navigate to the project directory:
cd foundry-fund-me-f24
- Install dependencies:
forge install
- Compile the smart contracts:
forge build
- Run tests:
forge test
For convenience, the project includes a Makefile with pre-defined commands:
- Build: Compile the contracts
make build
- Deploy to Sepolia: Deploy the contract to the Sepolia test network
make deploy-sepolia
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.
Contributions are welcome! Please open an issue or submit a pull request to discuss any potential changes.
This project is licensed under the MIT License.
Thanks @cyfrin for the course