Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luloxi/alchemy-buymeacoffee
Solidity contract & scripts for using BuyMeACoffee
https://github.com/luloxi/alchemy-buymeacoffee
Last synced: about 2 months ago
JSON representation
Solidity contract & scripts for using BuyMeACoffee
- Host: GitHub
- URL: https://github.com/luloxi/alchemy-buymeacoffee
- Owner: luloxi
- Created: 2022-09-30T23:23:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-30T23:30:38.000Z (over 2 years ago)
- Last Synced: 2024-04-15T05:03:19.998Z (9 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 0
- Watchers: 2
- 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 `npm install`.
Set up by creating a `.env` file, and filling out these variables:
```
GOERLI_URL="your Alchemy RPC URL"
GOERLI_API_KEY="your Alchemy API key"
PRIVATE_KEY="your wallet private key"
```Deploy your contract with:
```
npx hardhat run scripts/deploy.js
```Run an example buy coffee flow locally with:
```
npx hardhat run scripts/buy-coffee.js
```Once you have a contract deployed to Goerli testnet, grab the contract address and update the `contractAddress` variable in `scripts/withdraw.js`, then:
```
npx hardhat run scripts/withdraw.js
```will allow you to withdraw any tips stored on the contract.