Skip to content

larryjay007/helloweb3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello Web3 App

This is a simple Web3 application that allows users to interact with a deployed smart contract on the Ethereum Sepolia testnet. The contract stores a message string which can be retrieved or updated by connected users using MetaMask.

Features

  • Connect MetaMask wallet
  • Read current message from the smart contract
  • Update the message (on-chain transaction)

Technologies Used

  • Solidity (Smart contract)
  • Ethers.js (Frontend interaction)
  • MetaMask (Wallet connection)
  • Remix (Contract Deployment)
  • VS Code (Frontend development)

How to Use

  1. Open index.html in a web browser (preferably Chrome with MetaMask installed).
  2. Click “Connect Wallet” to link your MetaMask.
  3. Click “Get Message” to read the current value stored on-chain.
  4. Enter a new message and click “Update Message” to send a transaction.

Smart Contract

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.2 <0.9.0;

contract HelloWeb3 {
string public message;

constructor(string memory _message) {
message = _message;
}

function setMessage(string memory _newMessage) public {
message = _newMessage;
}

function getMessage() public view returns (string memory) {
return message;
}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages