โ† Blockchain & Smart Contracts (Solidity) learning path
Blockchain & Smart Contracts (Solidity) ยท Module 3 of 10

Solidity basics

Write your first contract.

๐Ÿ“– Key ideas

  1. Start with SPDX licence and pragma solidity ^0.8.x;
  2. contract Counter { uint256 public count; function increment() public { count += 1; } }
  3. Types: uint256, int, bool, address, string, bytes.
  4. Visibility: public, external, internal, private.
  5. 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