2021-01-13 17:33:49 +00:00
|
|
|
pragma abicoder v2;
|
|
|
|
contract C {
|
|
|
|
bytes[] a;
|
|
|
|
|
|
|
|
function f() public {
|
|
|
|
a.push("abc");
|
2021-05-05 06:57:19 +00:00
|
|
|
a.push("abcdefghabcdefghabcdefghabcdefgh");
|
|
|
|
a.push("abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh");
|
2021-01-13 17:33:49 +00:00
|
|
|
assert(a[0][0] == "a");
|
2021-05-05 06:57:19 +00:00
|
|
|
assert(a[1][31] == "h");
|
|
|
|
assert(a[2][32] == "a");
|
2021-01-13 17:33:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2021-03-12 23:02:36 +00:00
|
|
|
// f() ->
|
2023-04-26 11:03:17 +00:00
|
|
|
// gas irOptimized: 179165
|
|
|
|
// gas legacy: 181014
|
|
|
|
// gas legacyOptimized: 180413
|