MetaMask Capabilities:
Request wallet access
Sign transactions
Switch networks
Connect to dApps automatically
Tips:
Always check if MetaMask is installed:
Javascript
if (typeof window.ethereum !== ‘undefined’) {
console.log(‘MetaMask is installed!’);
}
Listen for account/network changes:
javascript
ethereum.on(‘accountsChanged’, () => location.reload());
ethereum.on(‘chainChanged’, () => location.reload());
🧠 Summary:
You’ve now linked the blockchain to the front-end.
You learned to request wallet permissions and sign transactions.
You’re ready to deploy fully interactive dApps.
📝 Workbook Activities:
Create a simple HTML + JS interface to update a message contract.
Connect MetaMask and test submitting a transaction.
Build a form to collect user input and store it on-chain.
List two real-world dApps and describe their UI-blockchain interaction.