🛠️ Build Your First Transaction
Create, sign, and broadcast a real blockchain transaction
Your Progress
0 / 5 completed🛠️ Building Transactions
Now let's put it all together! Build your own transaction and see how all the pieces fit.
🎮 Interactive Transaction Builder
Fill in the fields below to create a transaction:
This is your wallet address (read-only)
Standard transfer = 21,000
Higher = faster confirmation
21000 gas × 50 Gwei
📋 Step-by-Step: Real Transaction Flow
User connects MetaMask or other Web3 wallet to your dApp
Gather: to address, value, gas limit, gas price
web3.eth.sendTransaction({from, to, value, gas, gasPrice})Get latest transaction count for the account
const nonce = await web3.eth.getTransactionCount(address, 'pending')Wallet prompts user to approve and sign with private key (happens in wallet, not your code)
Signed transaction sent to Ethereum nodes via RPC
const txHash = await web3.eth.sendSignedTransaction(signedTx)Transaction sits in pending pool until picked up by miner/validator
Validator adds transaction to block, becomes part of blockchain
const receipt = await web3.eth.getTransactionReceipt(txHash)Wait for additional blocks for finality (1-12+ confirmations depending on risk tolerance)
⚡ Transaction Status Tracking
Transaction broadcast but not yet in a block
- Sitting in mempool waiting to be picked up
- Can be sped up by resubmitting with higher gas
- Can be cancelled by sending 0 ETH to self with same nonce
Included in latest block
- Transaction is on the blockchain
- Still possible to reorg (rare)
- Most apps consider this "successful"
Multiple confirmations deep
- Extremely unlikely to be reversed
- Exchanges typically wait 12-35 confirmations
- Considered permanent
Transaction rejected or reverted
- Common reasons: out of gas, revert in smart contract
- Gas is still consumed (paid to validators)
- Nonce is still incremented
💡 Best Practices
Check address format, balance, and amount before sending
Use eth_estimateGas to avoid out-of-gas errors
Let users review all details before signing
Keep users informed: pending → confirmed → finalized