Skip to content

DevAyomi/Send

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Send - Ethereum Transaction DApp

A modern, decentralized application for sending Ethereum transactions on the blockchain. Built with React, Tailwind CSS, and Hardhat.

🚀 Features

  • Secure Wallet Integration - Connect with MetaMask wallet
  • Send Transactions - Transfer ETH with messages and keywords
  • Transaction History - View all your blockchain transactions
  • Modern UI - Beautiful, responsive design with Tailwind CSS
  • Sepolia Testnet - Deployed on Ethereum Sepolia testnet
  • Real-time Updates - Transactions update automatically

📁 Project Structure

Bblockchainnn/
├── Client/          # Frontend React application
│   ├── src/
│   │   ├── Components/    # React components
│   │   ├── context/        # Transaction context
│   │   └── utils/          # Utilities and constants
│   └── package.json
│
└── Contract/       # Smart contract (Hardhat)
    ├── contracts/   # Solidity contracts
    ├── scripts/     # Deployment scripts
    └── package.json

🛠️ Tech Stack

Frontend

  • React 19 - UI library
  • Vite - Build tool
  • Tailwind CSS - Styling
  • Ethers.js - Ethereum library

Smart Contract

  • Solidity 0.8.28 - Smart contract language
  • Hardhat - Development environment
  • Ethers.js - Ethereum interactions

📦 Installation

Prerequisites

  • Node.js (v18 or higher)
  • MetaMask browser extension
  • Git

Frontend Setup

cd Client
npm install
npm run dev

The frontend will run on http://localhost:3000

Smart Contract Setup

cd Contract
npm install

# Create .env file from example
cp .env.example .env

# Edit .env and add your Alchemy URL and Private Key
# Then compile
npx hardhat compile

Important: Create a .env file in the Contract/ directory with:

  • ALCHEMY_URL - Your Alchemy API endpoint for Sepolia
  • PRIVATE_KEY - Your wallet's private key for deployment

See .env.example for the template.

🚀 Deployment

Deploy Contract to Sepolia

cd Contract
npx hardhat run scripts/deploy.ts --network sepolia

After deployment, update the contract address in Client/src/utils/constants.ts

🔧 Configuration

Environment Variables

Create a .env file in the Contract/ directory:

# Copy the example file
cp Contract/.env.example Contract/.env

# Edit with your values
nano Contract/.env  # or use your preferred editor

Required variables:

  • ALCHEMY_URL - Your Alchemy API endpoint (get from https://www.alchemy.com/)
  • PRIVATE_KEY - Your wallet's private key for deployment (without 0x prefix)

Security Note: Never commit .env files to git. They are already in .gitignore.

Contract Address

Update the contract address in Client/src/utils/constants.ts after deployment:

export const ContractAddress = "YOUR_DEPLOYED_CONTRACT_ADDRESS";

Network Configuration

The app is configured for Sepolia testnet. Make sure MetaMask is connected to Sepolia.

📝 Usage

  1. Connect Wallet

    • Click "Connect Wallet" button
    • Approve MetaMask connection
    • Ensure you're on Sepolia testnet
  2. Send Transaction

    • Fill in recipient address
    • Enter amount in ETH
    • Add keyword and message
    • Click "Send Now"
    • Confirm transaction in MetaMask
  3. View Transactions

    • All transactions are displayed in the Recent Transactions section
    • Transactions are fetched automatically from the blockchain

🌐 Network

  • Network: Sepolia Testnet
  • Chain ID: 11155111
  • Contract Address: 0x9edCe95b7eBeb2eFbE393c7Ea7280C1234c69c71

📄 Smart Contract

The Transaction.sol contract provides:

  • addToBlockchain() - Send ETH with message and keyword
  • getAllTransactions() - Retrieve all transactions
  • getTransactionCount() - Get total transaction count

🔒 Security

  • All transactions require MetaMask approval
  • Network validation ensures Sepolia testnet usage
  • Input validation on all form fields
  • Balance checks before transactions

🧪 Testing

Test on Sepolia

  1. Get Sepolia ETH from a faucet:

  2. Connect MetaMask to Sepolia testnet

  3. Send test transactions

📚 Scripts

Frontend

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build

Contract

  • npx hardhat compile - Compile contracts
  • npx hardhat run scripts/deploy.ts --network sepolia - Deploy to Sepolia

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📄 License

ISC

👤 Author

Built with ❤️ for decentralized transactions


Note: This is a testnet application. Do not use with mainnet ETH or real funds.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published