Web3 Documentation

Your foundation for understanding Web3, Ethereum, and Solidity development.

Overview

This documentation introduces the core concepts of Web3 development. You’ll learn how Ethereum works under the hood: from transactions and gas to smart contracts and the EVM itself.

Tip: If you're new — start with this page. After that continue with Hardhat → Foundry → OpenZeppelin.

What is Blockchain?

Blockchain is a distributed database with no central owner. Every node in the network holds a copy of the same state (balances, contracts, data).

Key Properties

  • Decentralized
  • Immutable
  • Transparent
  • Secure through cryptography
Important: Ethereum is not “just a blockchain”. It is a programmable blockchain.

What is Ethereum?

Ethereum is a global, decentralized computer. Developers can deploy programs (smart contracts) that run on the Ethereum Virtual Machine.

Ethereum consists of:

  • Execution Layer (EVM)
  • Consensus Layer
  • Networking Layer
  • Storage (state trie)

What is EVM?

EVM — Ethereum Virtual Machine — is a sandboxed runtime environment where all smart contracts execute.

EVM is deterministic: Every node must execute contracts and produce the same output.

EVM executes bytecode

600A600C80600A39...

Solidity compiles into bytecode → EVM executes it during transactions.

What is Solidity?

Solidity is the most popular smart contract language for Ethereum. Created by Gavin Wood (2014).

Example:

pragma solidity ^0.8.20;

contract Counter {
    uint256 public count;

    function inc() external {
        count++;
    }
}

Solidity is similar to JavaScript + C++, but with strict types and deterministic behavior.

Smart Contracts

Smart contracts are programs stored on the blockchain. Each contract has:

  • Address
  • Storage (state)
  • Code (bytecode)

Contract structure

contract MyContract {
    uint public value;

    function set(uint x) external {
        value = x;
    }
}

ABI & Bytecode

ABI (Application Binary Interface) describes how to interact with a contract: functions, arguments, outputs.

ABI Example

[
  {
    "inputs": [],
    "name": "value",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256"}],
    "stateMutability": "view",
    "type": "function"
  }
]

Gas & Fees

Gas is the cost of performing operations on Ethereum.

Basic formula

Fee = GasUsed * GasPrice
Gas tip: Writing to storage is the most expensive operation.

Transactions

A transaction is a signed instruction from a user to the network (send ETH, call contract function).

to: "0xabc..."
data: "0x095ea7b3..."
gas: 21000

Nonce

Nonce is a transaction counter for each wallet. Prevents double-spending and ensures order.

RPC Nodes

RPC nodes allow you to read blockchain state and send transactions.

Popular RPC Providers

  • Alchemy
  • Infura
  • Tenderly
  • Ankr

Testnets

Testnets allow developers to test contracts without using real ETH.

Main testnets:

  • Sepolia
  • Holesky