Is it possible to encode and decode two consequent bytes using abi.encode
and abi.decode
(as following)?
bytes memory data = abi.encode(data1, data2);
// later on
(bytes memory data1_recovered, bytes memory data2_recovered) = abi.decode(data, bytes, bytes);