Code has been added to clipboard!
Solidity Conversion Between Elementary Types Example 2
Example
uint32 x = 0x12345678;
uint16 y = uint16(x); // y is going to be 0x5678 now
Code has been added to clipboard!
uint32 x = 0x12345678;
uint16 y = uint16(x); // y is going to be 0x5678 now