August 2019
Intermediate to advanced
486 pages
13h 52m
English
The int, uint, bool, and address data types are also called value types. The variables of these types will always be passed by value. This means that their values are always copied when they are used as the function arguments or assigned to another variable.
Some int and uint value types in Solidity support various sizes to reduce gas consumption and storage space. You should choose the appropriate value type based on your data requirements. The bool and address value types do not have different sizes, as their size is fixed. The size of the value types is as follows:
| Value type | Different sizes | When size is undefined |
| int | int8, int16, int24 .... int256 (a step of 8) | int uses int256 |
| uint | uint8, uint16 ... |