A smart contract project for decentralized funding management.
This project has been built while following along the Cyfrin Updraft Foundry courses,
- ✅ Fund a project with ETH.
- ✅ Integrated Chainlink price feeds.
- ✅ Single-owner with secure withdrawal control.
A contract that manages ETH contributions and supports secure withdrawals. Key Functions:
fund(): Accept ETH contributions.withdraw(): Allow the owner to withdraw all funds.cheaperWithdraw(): Optimized withdrawal function.- View functions for retrieving funder information and contract state.
Performs ETH/USD conversion using Chainlink price feeds.
Key Functions:
getPrice(): Fetches the current ETH/USD price.getConversionRate(uint256): Converts a given ETH amount to USD.
- Solidity - Primary language for smart contract development.
- Foundry - Framework for testing and deployment.
- Chainlink - Oracles for secure price feeds.
- Install Foundry.
- Clone the repository:
git clone https://github.com/your-username/project-name.git cd project-name - Install dependencies:
forge install
Compile the smart contract:
forge build
Using Foundry
- Configure your environment variables:
export SEPOLIA_RPC_URL="https://sepolia.infura.io/v3/your-api-key"
export PRIVATE_KEY="your-private-key"
0xChaddB - Security Researcher
This project is licensed under the MIT License. See the LICENSE file for more details.