A robust, production-ready smart contract system for decentralized crowdfunding built with Solidity and Foundry.
- Real-time Price Feeds: Integrates Chainlink Oracle for accurate ETH/USD conversion
- Gas Optimized: Implements gas-efficient patterns including constant/immutable variables
- Multi-Network Support: Seamlessly operates on:
- Ethereum Mainnet
- Sepolia Testnet
- Local Development
- Automated Testing: Comprehensive test suite with:
- Unit Tests
- Integration Tests
- Forked Network Tests
- Gas Usage Reports
- Price Feed System: Chainlink Oracle integration for real-time ETH/USD conversion
- Smart Contract Security:
- Reentrancy protection
- Access control mechanisms
- Gas optimization patterns
- Testing Coverage: 100% test coverage across critical functions
- Clone the repository
git clone https://github.com/SquilliamX/foundry-fund-me-f23.git
cd foundry-fund-me-f23
- Install dependencies
forge install
forge build
forge script script/DeployFundMe.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY
Track gas usage with:
forge snapshot
The platform automatically configures for:
- Ethereum Mainnet
- Sepolia Testnet
- Local Anvil Chain
Our testing strategy encompasses:
- Unit Tests: Individual component testing
- Integration Tests: Cross-component interaction testing
- Fork Tests: Production environment simulation
- Gas Optimization Tests: Performance benchmarking
- Withdrawal pattern implementation
- Access control modifiers
- Secure fund management
- Input validation
- Gas optimization
FundMe.sol
: Main funding contractPriceConverter.sol
: ETH/USD conversion logicMockV3Aggregator.sol
: Price feed simulation for testing
- Chainlink Price Feeds
- Custom withdrawal mechanisms
- Gas-optimized fund management
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Open pull request
MIT
Built with 💙 using Foundry and Chainlink.