- Thirdweb React this project Vite.js as a frontend framework.
- Tailwind CSS with Vite.js for decorating.
- Hardhat to deploy smart contract.
- go to https://metamask.io/
- download and install chrom extention
- Click on I agree ... and then create new wallet.
- Click on I agree
- Create password and and confirmation and click on Create a new wallet
- Watch the video, and then click Secure my wallet.
- Click Reveal Secret Recovery Phrase.
- Save 12 words somewhere
- fill security question
- Now the wallet is created
- Open the MetaMask page.
- Click on Ethereum Mainnet

- Enable Show test networks
- Click on Sepolia
- Copy the wallet key and go to https://sepoliafaucet.com/

- Log in, enter your key and click Send Me ETH
- After a few seconds a few ETH should be transfered to your account.
- In MetaMask page, click on Account 1 then click on 3 dots on right side of the Accound 1 and click Account Details

- click Show Private Key
- Enter password and copy the private key
- inside charityfund folder create a .env file and fill it with the following format:
PRIVATE_KEY={COPIED_PRIVATE_KEY}
- Inside charityfund directory
npm install
npm run deploy
- In this step after successful deploy you have to see a link in the command line
- Open the link and go to the ThirdWeb website
- Click connect wallet (if not connected before)
- Click Deploy Now keep eye on notification in MetaMask's extension (you probably need to click 2 times on Config), this will take a several seconds.
- in the ThirdWeb website in the contracts menu you should be able to see you contract (CharityFund). copy the contract address.
- go to client folder in the
src/context/index.jsxin line 15 replace your contract address with the existing one. - in clinet folder run
npm install
npm run dev
- open the browser using the given link in the terminal and now try to connect and create charity campaign or donate exisiting ones.
- publishCampaign: Users can create your own campaign
- getCampaigns: see all the campaign published on the website
- getUserCampaigns: Get your own campaign
- donate: Donate campaign
- getDonations: Explore donators on each campaign
- refundDonations: Refund donation if votes are enough