Reference · Solidity reference
Solidity cheatsheet
Type limits, units, globals, selectors and gas facts you keep looking up, on one page.
Filter by name or value. Try “gwei”, “max”, “sender” or a raw number.
Addresses
Unsigned integer limits
Signed integer limits
Wei units
Time units
Solidity's time suffixes (seconds, minutes, hours, days, weeks) turn a number into seconds, the unit block.timestamp uses.
Global variables
Function selectors
A selector is the first 4 bytes of the keccak256 hash of the signature, written with no spaces or argument names.
Event topics
An event's topic0 is the full keccak256 hash of its signature. ERC-20 and ERC-721 Transfer events share one signature, so they share one topic0.
ERC-165 interface IDs
Pass one of these to supportsInterface(bytes4) to ask a contract whether it implements the standard.
Proxy storage slots
Gas
The block gas limit is not a fixed number: validators can move it a little with each block, and it has been raised several times since early 2025, so read the current value from a recent block on a block explorer. The per-transaction cap of 16,777,216 gas has applied since the Fusaka upgrade in December 2025.
About this tool
This Solidity cheatsheet collects the values developers look up again and again: the zero address, integer limits, wei and time units, global variables such as msg.sender, common function selectors and event topics, ERC-165 interface IDs and gas facts. Selectors, topics and interface IDs are computed with ethers.js when the page loads, and every value copies with a click. Use the search box to filter.
Common questions
What is the maximum value of uint256?
2^256 - 1, which is 115792089237316195423570985084269984665640564039457584007913129639935. In Solidity you can write it as type(uint256).max.
What is the Ethereum block gas limit?
It is not fixed. Validators can move it a little with each block, and it has been raised several times since early 2025, so read the current value from a recent block on a block explorer. Separately, since the Fusaka upgrade in December 2025, one transaction can use at most 16,777,216 gas (EIP-7825).
What is msg.sender?
The address that called the current function: a wallet for a direct transaction, or a contract when one contract calls another. tx.origin is always the wallet that signed the transaction, and should not be used for access control.