solidity/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol
Daniel Kirchner 1a0605c594 Update tests.
2021-11-03 12:39:55 +01:00

17 lines
389 B
Solidity

contract C {
bytes data;
function f(bytes memory _data) public returns (uint256, bytes memory) {
data = _data;
return abi.decode(data, (uint256, bytes));
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"
// gas irOptimized: 135918
// gas legacy: 137190
// gas legacyOptimized: 136082