solidity/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol
2020-03-26 17:47:36 +01:00

11 lines
277 B
Solidity

contract C {
bytes data;
function f(bytes memory _data) public returns (uint256, bytes memory) {
data = _data;
return abi.decode(data, (uint256, bytes));
}
}
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"