Contracts
Contracts in Solidity are similar to classes in object-oriented languages. Each contract can contain declarations of State Variables, Functions, Function Modifiers, Events, Struct Types and Enum Types. Furthermore, contracts can inherit from other contracts.
There are also special kinds of contracts called libraries and interfaces.
The section about contracts contains more details than this section, which serves to provide a quick overview.
contract SimpleStorage {
}
State Variables
State variables are variables whose values are permanently stored in contract storage.
uint storedData;
See the Types section for valid state variable types and Visibility and Getters for possible choices for visibility.
Functions
Functions are the executable units of code within a contract.
function bid() public payable {
}
Function Calls can happen internally or externally and have different levels of visibility towards other contracts.