🚀 FundChain - Smart Contract (Foundry) This repository contains the Foundry-based smart contracts for FundChain, a decentralized crowdfunding platform.
📌 Table of Contents Overview
Tech Stack
Setup & Installation
Smart Contract Details
Testing
Deployment
Contributing
License
📜 Overview FundChain is a blockchain-powered crowdfunding platform that allows users to create campaigns and receive funds transparently. It utilizes Foundry for smart contract development and Next.js for the frontend.
🛠 Tech Stack Solidity → Smart contract language
Foundry → Smart contract development framework
Ethers.js → Blockchain interaction
Hardhat (Optional) → Testing & Deployment
Next.js + TailwindCSS → Frontend
📥 Setup & Installation To set up and run this project locally, follow these steps:
1️⃣ Clone the repository sh Copy Edit git clone https://github.com/your-username/fundchain-foundry.git cd fundchain-foundry 2️⃣ Install Foundry sh Copy Edit curl -L https://foundry.paradigm.xyz | bash foundryup 3️⃣ Install dependencies sh Copy Edit forge install 4️⃣ Compile the contracts sh Copy Edit forge build 5️⃣ Run tests sh Copy Edit forge test 📜 Smart Contract Details FundChain.sol (Core Contract) The FundChain contract enables: ✅ Creating campaigns ✅ Funding campaigns ✅ Withdrawing funds ✅ Refunding contributors
Contract Functions Function Description createCampaign() Creates a new campaign fundCampaign() Allows users to donate withdrawFunds() Campaign owner withdraws funds getCampaigns() Fetches all campaigns 🚀 Deployment Deploy your contract using Foundry:
sh Copy Edit forge script script/Deploy.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast OR using Hardhat (if configured):
sh Copy Edit npx hardhat run scripts/deploy.js --network goerli 🤝 Contributing Feel free to fork the repo, create a pull request, or open an issue. 🚀
📜 License This project is MIT Licensed.
You can create a README.md file and paste this content:
sh Copy Edit nano README.md Paste the content and save. Then push it back to GitHub:
sh Copy Edit git add README.md git commit -m "Added README file" git push origin main