August 2019
Intermediate to advanced
486 pages
13h 52m
English
In Solidity, there are data types that represent fixed-size integers. For example, all uint8 datatype from uint8, uint16, and moving up to uint256, increasing the bit value by 8 each time. Each type has a different limit to store an integer. For example, a variable of type uint8 can store values from 0 to 28-1 (0 to 255).
Similarly, int8 up to int256 (increasing the bit value by 8 each time) are also prone to integer overflow or underflow attacks.
When a value of the variable reaches the upper limit and further increases, it will cause integer overflow and the value goes back to zero. Also, when the value of the variable reaches the lower limit and further decreases, it will cause integer underflow, ...
Read now
Unlock full access