Skip to content

haard18/Fundme-Web3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FundMe Smart Contract

Overview

This Solidity smart contract, named FundMe, facilitates crowdfunding by allowing users to contribute funds to a shared pool. The contract enforces a minimum contribution amount denominated in USD and allows the contract owner to withdraw accumulated funds.

Features

  • Fundraising: Users can contribute funds to the contract using Ether.
  • Minimum Contribution: Contributions must meet a minimum threshold denominated in USD.
  • Owner Management: The contract has a designated owner who can withdraw funds.
  • Withdrawal: The owner can withdraw funds from the contract.

Functionality

  • fund: Allows users to contribute funds to the contract. The contribution amount must meet the minimum USD threshold.
  • cheaperWithdraw: Allows the owner to withdraw funds from the contract without incurring the cost of updating the mapping.
  • withdraw: Enables the owner to withdraw the accumulated funds from the contract.
  • fallback and receive: Fallback and receive functions handle Ether sent to the contract.
  • getAddressToAmountFunded: Getter function retrieves the amount funded by a specific address.
  • getFunder: Getter function retrieves the address of a funder by index.
  • getOwner: Getter function retrieves the owner of the contract.

Dependencies

  • This contract imports the AggregatorV3Interface and PriceConverter from external Solidity files.
  • It relies on Chainlink's price feed contract (AggregatorV3Interface) to determine the USD conversion rate.
  • The PriceConverter library contains functions to convert ETH amounts to USD.

Concepts Covered

  • Usage of mappings, arrays, and modifiers.
  • Error handling with custom errors.
  • Use of external interfaces and libraries.
  • Access control with modifiers.
  • Fallback and receive functions for handling Ether transactions.
  • Getter functions to retrieve contract data.

Future Improvements

  • Implement additional features such as events, enumeration, or error handling.
  • Optimize gas usage and consider potential security vulnerabilities.
  • Enhance documentation and add more comments for clarity.

This readme provides an overview of the FundMe smart contract, its features, functionality, dependencies, and concepts covered. Further improvements and enhancements can be made based on specific project requirements and use cases.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published