Page 1: Introduction, Environment Setup (Remix)

1. Introduction, Environment Setup (Remix)

Solidity is a statically typed language used for writing smart contracts on EVM (Ethereum Virtual Machine) based blockchains like Ethereum.

1.1. Basic Solidity Structure

Every Solidity file begins by specifying the compiler version. The Contract, similar to a class, is the fundamental unit of a smart contract.

// SPDX-License-Identifier: MIT 
pragma solidity ^0.8.0;

contract SimpleStorage {
uint256 public data;

function set(uint256 x) public {
data = x;
}
}

1.2. Setting up the Remix IDE

For the initial development phase, the browser-based IDE Remix (remix.ethereum.org) is the most convenient. It handles file creation, compilation, deployment, and testing in one place.