Code has been added to clipboard!

Conversion to Fixed Size Byte in Solidity

Example
bytes2 a = hex"1234"; // works
bytes2 b = "xy"; // works
bytes2 c = hex"12"; // not allowed
bytes2 d = hex"123"; // not allowed
bytes2 e = "x"; // not allowed
bytes2 f = "xyz"; // not allowed