Skip to content

This project in Solidity, Reactjs and Etherjs allows users to pay for a beer and leave a message. When the contract is deployed, an ownership address is assigned.

License

Notifications You must be signed in to change notification settings

querylab/PayBeerMarket-ERC20

Repository files navigation

PayBeerMarket-ERC20 🍻💰

This project in Solidity, Reactjs and Etherjs allows users to pay for a beer and leave a message. When the contract is deployed, an ownership address is assigned. Users can make the payment by providing a name and a message, as long as the value sent is greater than zero. The Ether received is transferred to the contract owner and a new note is recorded that includes the name, message, timestamp and sender address. The contract also offers the functionality to get all memos recorded so far. Deployed on Sepolia testnet, it ensures reliable testing before deploying it on a main blockchain network.

Setting Up


1. Clone the repository

2. Install dependencies

$ cd PayBeerMarket-ERC20
$ npm install --save-dev hardhat
$ npm install --save dotenv @nomiclabs/hardhat-etherscan @openzeppelin/contracts @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-toolbox @nomiclabs/hardhat-ethers

3. Change variables in Files

# hardhat.config.js
$ ALCHEMY_SEPOLIA_URL
$ PRIVATE_KEY
# src/App.js
$ contractAddress

4. Deployment Solidity Contract Addresses

$ npx hardhat clean
$ npx hardhat compile
$ npx hardhat run scripts/deploy.js --network sepolia

#After deploying the paybeer.sol replace this address in src/App.js file with the variable:

 const contractAddress = "0x36D7D7880f78b156b4B10205736D1E3fc4fceF55";

5. Localhost Deployment

npm install 
npm start 
http://localhost:3000/

About

This project in Solidity, Reactjs and Etherjs allows users to pay for a beer and leave a message. When the contract is deployed, an ownership address is assigned.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published