- 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 web3 folder create a .env file and fill it with the following
Note: for this application we need at least 2 user which can be demonstrated y creating another wallet account. format:
PRIVATE_KEY={COPIED_PRIVATE_KEY}
- you have to create an api key in thirdweb.com. connect you wallet. got to
Homeand create APIKey. - Inside web3 directory
npm install
npm run deploy
- if asked for APIKey enter the created API key.
- 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
clientfolder in thesrc/context/index.jsxin line 10 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.
- publishAsset: Create an asset
- removeAsset: Remove an asset
- fetchAssets: Get Assets
- requestForExchange: request for exchange between one of our item with one of the other's
- acceptExchange: Accept the exchange
- requestForWithdraw: withdraw the exchange
- getOffers: get all the offers