EthFund is a decentralized funding platform built on the Ethereum blockchain that allows users to contribute Ether (ETH) to projects or individuals. The smart contract leverages Chainlink price feeds to ensure contributions meet a minimum USD threshold. It is built using Solidity and utilizes OpenZeppelin's libraries for secure and efficient smart contract development.
- Sepolia Etherscan Link: View Contract on Etherscan
- Contract Address:
0xEf31cb7a45499e26ab6FFcD6eF14A020C24e087F
- Contribute Ether (ETH) to projects or individuals.
- Minimum contribution amount enforced via Chainlink price feeds.
- Only the contract owner can withdraw funds.
- Pausable contract functionality.
- Secure smart contract development with OpenZeppelin libraries.
- Git
- Ensure Git is installed by running
git --version
.
- Ensure Git is installed by running
- Foundry
- Ensure Foundry is installed by running
forge --version
.
- Ensure Foundry is installed by running
- Make
- Ensure Make is installed by running
make --version
.
- Ensure Make is installed by running
Clone the repository and remove dependencies:
git clone https://github.com/obinnafranklinduru/ethfund
cd ethfund
make remove
install dependencies:
make install
Update dependencies to the latest versions:
make update
Ensure you have the necessary environment variables set in a .env
file:
SEPOLIA_RPC_URL=<your_sepolia_rpc_url>
PRIVATE_KEY=<your_private_key>
ETHERSCAN_API_KEY=<your_etherscan_api_key>
Deploy the contract using the Makefile:
make deploy ARGS="--network sepolia"
Users can fund a project by sending Ether (ETH) to the contract. The contract ensures the minimum contribution amount is met.
function fund() public payable whenNotPaused {
require(msg.value >= MINIMUM_USD, "You need to spend more ETH!");
// Function logic...
}
Only the contract owner can withdraw funds from the contract.
function withdraw() public payable onlyOwner nonReentrant whenNotPaused {
// Function logic...
}
Run tests to ensure the contract functions as expected.
make test
- The contract only supports contributions in ETH. It does not allow for contributions in other cryptocurrencies or tokens, limiting its flexibility.
PRs are welcome!
git clone https://github.com/obinnafranklinduru/ethfund
cd ethfund
make help