solidity/test/libsolidity/semanticTests/array/push/nested_bytes_push.sol

19 lines
452 B
Solidity
Raw Normal View History

pragma abicoder v2;
contract C {
bytes[] a;
function f() public {
a.push("abc");
a.push("abcdefghabcdefghabcdefghabcdefgh");
a.push("abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh");
assert(a[0][0] == "a");
assert(a[1][31] == "h");
assert(a[2][32] == "a");
}
}
// ----
// f() ->
2022-08-10 16:45:38 +00:00
// gas irOptimized: 179170
2022-06-07 12:45:10 +00:00
// gas legacy: 181066
// gas legacyOptimized: 180435