Buy Me A Coffee is a popular website that creators, educators, entertainers, and all kinds of people use to create a landing page where anyone can send some amount of money as a thank you for their services. However, in order to use it, you must have a bank account and a credit card. Not everyone has that!
A benefit of decentralized applications built on top of a blockchain is that anyone from around the world can access the app using just an Ethereum wallet, which anyone can set up for free in under 1 minute. Let's see how we can use that to our advantage!
This project is a deployed(Goerli Testnet) decentralized "Buy Me a Coffee" smart contract that allows visitors to send you (fake) ETH as tips and leave nice messages, using Alchemy, Hardhat, Ethers.js, and Ethereum Goerli.
-
Clone the repository and run
yarn install
ornpm install
-
Compile the contract by running
npx hardhat compile
-
Deploy the smart contract in the localhost network :
npx hardhat run --network localhost scripts/deploy.js
You can target any network from your Hardhat config using: npx hardhat run --network <your-network> scripts/deploy.js
Congrats! You have compiled and deployed the smart contract.
-
Change the directory to the clients folder :
cd client
-
Install the dependencies needed to run the project:
yarn install
ornpm install
-
Run
yarn dev
ornpm run dev
to start the project locally.
Have Fun!