I'm having trouble understanding LowGasSafeMath. For example, how does this function work?
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
require(x == 0 || (z = x * y) / x == y);
}
The first thing that puzzled me is that this returns a value without a return statement. Then, how does the logic inside the require statement work? As a programmer, I'm familiar with boolean logic, but haven't seen it used like this before.
require
statement is the equivalent to return from the entire application , or in other wordsexit
so these statements are equivalent to Cassert
s