โ Blockchain & Smart Contracts (Solidity) learning pathBlockchain & Smart Contracts (Solidity) ยท Module 3 of 10
Solidity basics
Write your first contract.
๐ Key ideas
- Start with SPDX licence and pragma solidity ^0.8.x;
- contract Counter { uint256 public count; function increment() public { count += 1; } }
- Types: uint256, int, bool, address, string, bytes.
- Visibility: public, external, internal, private.
- Solidity 0.8+ checks arithmetic overflow automatically.
๐ก Real-life example: A contract is a class whose state lives forever on the blockchain.
pragmaCompiler version directive
uint256Unsigned 256-bit integer
addressEthereum account type
publicVisible to everyone, auto getter