An open API service indexing awesome lists of open source software.

https://github.com/signor1/a-set-and-get-message-dapp

A-Set-And-Get-Message-Dapp for tutorials
https://github.com/signor1/a-set-and-get-message-dapp

Last synced: 7 months ago
JSON representation

A-Set-And-Get-Message-Dapp for tutorials

Awesome Lists containing this project

README

          

# Decentralized Application (Dapp) - Message Setter and Getter

This decentralized application (Dapp) allows users to get and set messages on the Ethereum blockchain. It utilizes React for the frontend, Solidity for smart contract development, and Hardhat as the development environment.

contract Address = 0xbb17c0DE13a76eF57e9b00020f712A1740A8cf01

## Getting Started

Follow the steps below to set up and run the Dapp on your local machine.

### Prerequisites

Make sure you have the following tools installed:

- [Node.js](https://nodejs.org/)
- [npm](https://www.npmjs.com/)
- [Hardhat](https://hardhat.org/)
- [MetaMask](https://metamask.io/)

### Installation

1. Clone the repository:

```bash
git clone
cd
```

2. Install dependencies:

```bash
npm install
```

3. Compile the smart contracts:

```bash
npx hardhat compile
```

4. Start the local development blockchain:

```bash
npx hardhat node
```

5. Deploy the smart contract to the local blockchain:

```bash
npx hardhat run scripts/deploy.js --network localhost
```

6. Copy the contract address and update it in the `App.js` file.

### Usage

1. Start the React app:

```bash
npm start
```

2. Open your browser and navigate to `http://localhost:3000/`. Connect your MetaMask wallet to the local blockchain.

3. Use the Dapp to set and get messages on the Ethereum blockchain.

### Smart Contracts

- **MyMessage.sol**: Solidity smart contract for getting and setting messages.

### Frontend

- **src/App.js**: React component for interacting with the smart contract.

## Contributing

Feel free to contribute to the development of this Dapp. Fork the repository, make your changes, and submit a pull request.