LOGBOOK

HELP

Quiz Entry - updated: 2026.07.30

What are the four function/variable visibility specifiers in Solidity?

public, private, external, and internal — they control who is allowed to call a function or read a variable.

Scope figure mapping each caller — outside caller, this contract, derived contract — to the visibility specifiers it can reach

* Who can reach what: public is open to all three callers, external only to the outside, internal to this contract and its children, private to this contract alone *

Specifier Who can access it
public Anyone — callable from inside the contract, from derived contracts, and from outside
private Only this exact contract (not even child contracts)
internal This contract and contracts that inherit from it
external Only callers outside the contract (not internal calls)

If you give a function or variable no specifier, it defaults to internal. That is why an unmarked variable does not show up as a callable button in Remix — outsiders cannot reach it. Note private does not mean the data is secret: everything on a public blockchain is readable off-chain; it only restricts which code may call the accessor.

Go deeper:

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