Le type de données uint est un entier non signé,
For an integer type X, you can use type(X).minand type(X).maxto access the minimum and maximum value representable by the type.
The result of a shift operation has the type of the left operand, truncating the result to match the type. The right operand must be of unsigned type, trying to shift by a signed type will produce a compilation error.
Shifts can be “simulated” using multiplication by powers of two in the following way. Note that the truncation to the type of the left operand is always performed at the end, but not mentioned explicitly.
x << y is equivalent to the mathematical expression x * 2**y.x >> y is equivalent to the mathematical expression x / 2**y, rounded towards negative infinity.The address type comes in two flavours, which are largely identical:
address: Holds a 20 byte value (size of an Ethereum address).address payable: Same as address, but with the additional members transfer and send.The idea behind this distinction is that address payable is an address you can send Ether to, while a plain address cannot be sent Ether.
Type conversions:
Implicit conversions from address payable to address are allowed, whereas conversions from address to address payable must be explicit via payable(<address>).
Explicit conversions to and from address are allowed for uint160, integer literals, bytes20 and contract types.
Only expressions of type address and contract-type can be converted to the type address payable via the explicit conversion payable(...). For contract-type, this conversion is only allowed if the contract can receive Ether, i.e., the contract either has a receive or a payable fallback function. Note that payable(0) is valid and is an exception to this rule.
Function types come in two flavours - internal and external functions:
Internal functions can only be called inside the current contract (more specifically, inside the current code unit, which also includes internal library functions and inherited functions) because they cannot be executed outside of the context of the current contract. Calling an internal function is realized by jumping to its entry label, just like when calling a function of the current contract internally.