solidity/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol
Daniel Kirchner 5989f45e9e Test updates.
2022-06-14 18:26:16 +02:00

15 lines
358 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"
// gas irOptimized: 135787
// gas legacy: 137377
// gas legacyOptimized: 136125