GithubHelp home page GithubHelp logo

querylab / paybeermarket-erc20 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 321 KB

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.

Home Page: https://pay-beer-market-erc-20.vercel.app

License: MIT License

Solidity 4.47% JavaScript 80.03% HTML 10.68% CSS 4.81%
dapp erc20 ethersjs ethreum reactjs solidity sepolia hardhat marketplace

paybeermarket-erc20's Introduction

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/

paybeermarket-erc20's People

Contributors

querylab avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.