A modern, decentralized application for sending Ethereum transactions on the blockchain. Built with React, Tailwind CSS, and Hardhat.
- 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
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
- React 19 - UI library
- Vite - Build tool
- Tailwind CSS - Styling
- Ethers.js - Ethereum library
- Solidity 0.8.28 - Smart contract language
- Hardhat - Development environment
- Ethers.js - Ethereum interactions
- Node.js (v18 or higher)
- MetaMask browser extension
- Git
cd Client
npm install
npm run devThe frontend will run on http://localhost:3000
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 compileImportant: Create a .env file in the Contract/ directory with:
ALCHEMY_URL- Your Alchemy API endpoint for SepoliaPRIVATE_KEY- Your wallet's private key for deployment
See .env.example for the template.
cd Contract
npx hardhat run scripts/deploy.ts --network sepoliaAfter deployment, update the contract address in Client/src/utils/constants.ts
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 editorRequired 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.
Update the contract address in Client/src/utils/constants.ts after deployment:
export const ContractAddress = "YOUR_DEPLOYED_CONTRACT_ADDRESS";The app is configured for Sepolia testnet. Make sure MetaMask is connected to Sepolia.
-
Connect Wallet
- Click "Connect Wallet" button
- Approve MetaMask connection
- Ensure you're on Sepolia testnet
-
Send Transaction
- Fill in recipient address
- Enter amount in ETH
- Add keyword and message
- Click "Send Now"
- Confirm transaction in MetaMask
-
View Transactions
- All transactions are displayed in the Recent Transactions section
- Transactions are fetched automatically from the blockchain
- Network: Sepolia Testnet
- Chain ID: 11155111
- Contract Address:
0x9edCe95b7eBeb2eFbE393c7Ea7280C1234c69c71
The Transaction.sol contract provides:
addToBlockchain()- Send ETH with message and keywordgetAllTransactions()- Retrieve all transactionsgetTransactionCount()- Get total transaction count
- All transactions require MetaMask approval
- Network validation ensures Sepolia testnet usage
- Input validation on all form fields
- Balance checks before transactions
-
Get Sepolia ETH from a faucet:
-
Connect MetaMask to Sepolia testnet
-
Send test transactions
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
npx hardhat compile- Compile contractsnpx hardhat run scripts/deploy.ts --network sepolia- Deploy to Sepolia
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
ISC
Built with ❤️ for decentralized transactions
Note: This is a testnet application. Do not use with mainnet ETH or real funds.