LOGBOOK

HELP

Quiz Entry - updated: 2026.07.30

What are Solidity's basic primitive types, and what does each hold?

bool (true/false), uint (unsigned/non-negative whole number), int (signed whole number), address (a 20-byte account/contract address), plus bytes (raw byte data) and string (text).

Type Holds Example
bool true or false bool hasNumber = true;
uint non-negative whole number uint256 favoriteNumber = 5;
int positive or negative whole number int256 temp = -5;
address an account or contract address address owner = 0xAb...;
bytes raw low-level byte data bytes32 data = "cat";
string text (secretly an array of bytes) string name = "Patrick";

uint is short for uint256. A string is really just a bytes array restricted to text — a short literal like "cat" can be auto-converted to a bytes value. Types exist to tell the compiler what each variable is and how much space it needs.

Go deeper:

From Quiz: IOTHACK / Smart Contracts & the Remix IDE | Updated: Jul 30, 2026