Skip to content

private-vars

Enforces that all state variables are private.

Examples of incorrect code for this rule:

contract Example {
uint public x;
uint internal y;
}

Examples of correct code for this rule:

contract Example {
uint private x;
uint private y;
}