2020-11-12 14:29:08 +00:00
|
|
|
|
|
|
|
contract c {
|
|
|
|
function set() public returns (bool) { data1 = msg.data; return true; }
|
|
|
|
function reset() public returns (bool) { data1 = data2; return true; }
|
|
|
|
bytes data1;
|
|
|
|
bytes data2;
|
|
|
|
}
|
2020-11-12 10:54:37 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-11-12 14:29:08 +00:00
|
|
|
// ----
|
|
|
|
// set(): 1, 2, 3, 4, 5 -> true
|
2022-02-15 11:20:28 +00:00
|
|
|
// gas irOptimized: 177390
|
2022-03-07 18:13:35 +00:00
|
|
|
// gas legacy: 177653
|
|
|
|
// gas legacyOptimized: 177493
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 0
|
2020-11-12 14:29:08 +00:00
|
|
|
// reset() -> true
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 1
|