Solidity Data Types Cheat Sheet (2026)

Solidity Data Types Cheat Sheet (2026)

DevTools Store

Solidity Data Types Quick Reference

Value Types

bool true/false
uint256 0 to 2^256-1 (default)
int256 signed integer
address 20 byte ETH address
bytes1-32 Fixed byte array
enum Custom enumeration

Reference Types

string Dynamic UTF-8
bytes Dynamic byte array
uint256[] Dynamic array
mapping(K=>V) Key-value
struct Custom data

Gas-Efficient Choices

bytes32 > string (cheaper)
uint256 > uint8 (native 256-bit)
mapping > array (O(1) lookup)
calldata > memory (read-only)
constant/immutable (no storage)

All cheat sheets: https://rentry.co/85pm7d8y

Report Page