Solidity
The primary language for smart contracts on Ethereum and compatible blockchains.
28 steps across 1 tours, from the basics to complete programs.
The tours
- First released
- 2015
- Created by
- Gavin Wood, Christian Reitwiessner, and the Ethereum team
- Typing
- Static and sized; the adversarial environment shapes every idiom
- Snippets target
- 0.8
- File extensions
- .sol
What it is for
Solidity is the dominant language of the Ethereum Virtual Machine and its many compatible chains: the code of tokens, exchanges, lending pools, DAOs, and NFT registries. What makes it unusual is not syntax — it reads like a compact JavaScript with types — but consequence: deployed contracts are immutable and hold real funds, so a bug is a loss, sometimes a nine-figure one, and every operation costs gas the caller pays for. The language is small; the discipline around it is not.
That environment produced idioms found nowhere else. Pull-payments instead of push, because sending money to an unknown address hands it control. Checks-effects-interactions ordering, because reentrancy drained the original DAO. Custom errors over message strings, indexed event topics, unchecked blocks, and data-location keywords, all because bytes and computation are metered. Security reviews are a professional field of their own, and much production code assembles audited OpenZeppelin components rather than reinventing them.
The toolchain is its own world: Foundry and Hardhat for testing (often with fuzzing), solc compiling to EVM bytecode, and testnets standing in for staging. Career-wise it is a niche expert's language — a small community relative to the majors, unusually well paid, where reading skill matters as much as writing because so much of the job is auditing other people's contracts.
Where it came from
Solidity was proposed by Gavin Wood in 2014 and developed under Christian Reitwiessner at the Ethereum project, shipping in 2015 alongside the network it was built for. Early inspirations were JavaScript's approachability and C++'s type discipline; the contract-oriented model — code plus storage living at an address — came from Ethereum's own design.
The 2016 DAO hack, a reentrancy exploit that drained a then-enormous treasury and split Ethereum into two chains, taught the ecosystem its defining lesson: the language's users are adversaries. The years after brought steady hardening — explicit data locations and stricter visibility in 0.5, ABIEncoderV2, and 0.8's checked arithmetic by default, which retired the SafeMath library an entire generation of contracts had depended on.
Since 0.8 the language has evolved carefully — custom errors, user-defined value types, transient storage support — while the center of gravity moved to layer-2 chains that keep the EVM and therefore Solidity. Vyper and other EVM languages exist, but network effects, auditor familiarity, and the OpenZeppelin ecosystem keep Solidity the default.
What it is like to type
Solidity types like a security checklist: long, exact words — uint256, external, immutable, calldata — repeated until they are reflex, with SCREAMING_CASE constants and camelCase functions. The ceremony is constant (SPDX line, pragma, contract braces) and the vocabulary is compact but dense: require and revert and emit open lines, msg.sender appears everywhere, and mapping(address => uint256) is practically one word. Long identifiers mean fewer tokens per keystroke than most languages, so the pace stat runs lower here — deliberate typing for a deliberate language.
28 steps across 1 tours, from the basics to complete programs.
Official documentation
- soliditylang.org
- The language documentation
- Solidity by Example
- OpenZeppelin Contracts
- The Ethereum developer portal