https://github.com/velopace739/buy-me-a-coffee
"Buy Me a Coffee" DeFi dapp
https://github.com/velopace739/buy-me-a-coffee
alchemy binance-smart-chain bscscan-api dapp defi hardhat nextjs react smart-contracts solidity typechain typescript
Last synced: 3 months ago
JSON representation
"Buy Me a Coffee" DeFi dapp
- Host: GitHub
- URL: https://github.com/velopace739/buy-me-a-coffee
- Owner: velopace739
- Created: 2024-12-20T20:18:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-20T20:20:56.000Z (over 1 year ago)
- Last Synced: 2025-05-20T07:35:46.623Z (about 1 year ago)
- Topics: alchemy, binance-smart-chain, bscscan-api, dapp, defi, hardhat, nextjs, react, smart-contracts, solidity, typechain, typescript
- Language: TypeScript
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BuyMeACoffee solidity contract
This repo contains a contract that implements tipping functionality.
Install dependencies with `yarn`.
Set up by creating a `.env` file, and filling out these variables:
```
BSC_TESTNET_URL=your Alchemy RPC URL
PRIVATE_KEY=your wallet private key
BSCSCAN_API_KEY=your bscscan api key
CONTRACT_ADDRESS=deployed contract address
```
You can get an Alchemy RPC URL for free [here](https://dashboard.alchemy.com/).
## !!! Be very careful with exporting your private key !!!
You can get your Private Key from MetaMask [like this](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key).
If you have any questions or concerns about this, please find someone you trust to sanity check you!
## !!! Be very careful with exporting your private key !!!
Deploy your contract with:
```
npx hardhat run .\scripts\deploy.ts --network bsc_testnet
```
Verify your contract with:
```
npx hardhat verify --network bsc_testnet CONTRACT_ADDRESS
```
Run an example buy coffee flow locally with:
```
npx hardhat run .\scripts\buy-coffee.ts --network bsc_testnet
```
It will allow you to withdraw any tips stored on the contract.
```
npx hardhat run .\scripts\withdraw.ts
```
## Contract Address
BSC testnet:
[0xc24634141D2aEAaf8b442dc6eCb78B5354766143](https://testnet.bscscan.com/address/0xc24634141D2aEAaf8b442dc6eCb78B5354766143#code)