Welcome to the Fund Me Smart Contract project! This decentralized application (DApp) allows users to fund the contract by sending Ethereum (ETH) and withdraw funds when needed. The contract also ensures that a minimum funding amount in USD is met before accepting contributions.
-
Funding: Users can fund the contract by sending Ethereum (ETH) to the contract's address.
-
Minimum Funding Amount: The contract sets a minimum funding value in USD, and users must send enough ETH to meet this requirement for their contribution to be accepted.
-
Withdrawal: The contract owner (deployer) can withdraw the accumulated funds from the contract to their account.
The smart contract for Fund Me is written in Solidity and is designed to accept funding from users and allow the contract owner to withdraw funds. The contract utilizes the Chainlink Price Feed to convert the contributed ETH amount to USD for the minimum funding amount check.
The following are the main functions provided by the smart contract:
-
fund()
: Allows users to fund the contract by sending the specified amount of ETH. The function checks if the contribution meets the minimum funding value in USD before accepting it. -
withdraw()
: Allows the contract owner (deployer) to withdraw the accumulated funds from the contract. It transfers the ETH balance of the contract to the owner's address. -
getFunder(uint256 index)
: View function that returns the address of a user who has funded the contract based on the given index in the funders array. -
getAddressToAmountFunded(address funder)
: View function that returns the amount of ETH funded by a specific user. -
getPriceFeed()
: View function that returns the address of the Chainlink Price Feed used in the contract.
To deploy the Fund Me smart contract on your local development environment or the Ethereum mainnet/testnet, you will need:
-
A compatible Ethereum wallet (e.g., MetaMask) to interact with the smart contract.
-
The Solidity contract source code, which can be found in the
contracts
directory. -
The address of a funded Chainlink Price Feed contract.
While efforts have been made to ensure the security and reliability of the smart contract, it is essential to perform a thorough security audit before deploying the contract on the Ethereum mainnet or any other public network.
This project is for educational and informational purposes only. Use it at your own risk. The developers of this project are not responsible for any losses or damages that may occur from using this application or the underlying smart contract.
This Fund Me Smart Contract project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.
For any questions, feedback, or contributions, please contact [email protected]. Happy funding!