← Back to Projects
WORKSHOP - 15 MINUTES
Your First Smart Contract
Deploy to a Real Blockchain Today
Goal:
Deploy your first smart contract to Sepolia testnet in 15 minutes. No prior experience required!
Prerequisites
- Browser (Chrome recommended)
- 15 minutes of time
- No coding experience required!
Step-by-Step Guide
1Install MetaMask
- Go to metamask.io
- Click Download and add to browser
- Create new wallet
- SAVE YOUR SEED PHRASE!
Never share your seed phrase with anyone. Write it down on paper.
2Get Test ETH
- Open MetaMask, switch to Sepolia test network
- Copy your wallet address
- Go to sepoliafaucet.com
- Paste address and request ETH
- Wait 1-2 minutes
3Open Remix IDE
- Go to remix.ethereum.org
- In file explorer, click contracts folder
- Create new file:
HelloWorld.sol
4Write Your Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract HelloWorld {
string public greeting;
event GreetingChanged(string oldGreeting, string newGreeting);
constructor(string memory _greeting) {
greeting = _greeting;
}
function getGreeting() public view returns (string memory) {
return greeting;
}
function setGreeting(string memory _newGreeting) public {
string memory old = greeting;
greeting = _newGreeting;
emit GreetingChanged(old, _newGreeting);
}
}
5Compile
- Click Solidity Compiler icon (left sidebar)
- Select compiler:
0.8.20
- Click Compile HelloWorld.sol
- Green checkmark = success!
6Deploy
- Click Deploy & Run icon
- Environment: Injected Provider - MetaMask
- Connect MetaMask when prompted
- Enter greeting:
"Hello, Blockchain!"
- Click Deploy
- Confirm in MetaMask
- Save your contract address!
7Interact
- Read (free): Click
greeting or getGreeting
- Write (costs gas): Enter new message in
setGreeting, click transact
8View on Etherscan
- Go to sepolia.etherscan.io
- Paste your contract address
- See your contract and transactions!
Troubleshooting
| Problem | Solution |
| "Insufficient funds" | Get more test ETH from faucet |
| "Transaction failed" | Check gas limit, retry |
| MetaMask not connecting | Refresh page, unlock MetaMask |
| Wrong network | Switch to Sepolia in MetaMask |
What You Learned
- Smart contracts are programs on the blockchain
- Solidity is the main language for Ethereum
- Deployment costs gas (paid in ETH)
- Reading is free, writing costs gas
- Testnets let you practice without real money
Next Steps
Ready for more? Try the Create Cryptocurrency workshop to build your own ERC-20 token!