2021-01-13 14:35:55 +00:00
|
|
|
contract D { constructor() payable {} }
|
|
|
|
contract C {
|
|
|
|
uint public x;
|
|
|
|
constructor() payable {}
|
|
|
|
function f(uint amount) public returns (D) {
|
|
|
|
x++;
|
|
|
|
return (new D){value: amount}();
|
|
|
|
}
|
|
|
|
function stack(uint depth) public payable returns (address) {
|
|
|
|
if (depth > 0)
|
|
|
|
return this.stack(depth - 1);
|
|
|
|
else
|
|
|
|
return address(f(0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// EVMVersion: >=byzantium
|
|
|
|
// ----
|
|
|
|
// constructor(), 20 wei
|
2022-06-03 20:04:16 +00:00
|
|
|
// gas irOptimized: 184005
|
2022-03-07 18:13:35 +00:00
|
|
|
// gas legacy: 294335
|
2022-06-03 20:04:16 +00:00
|
|
|
// gas legacyOptimized: 173427
|
2022-09-16 13:53:19 +00:00
|
|
|
// f(uint256): 20 -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a
|
2021-01-13 14:35:55 +00:00
|
|
|
// x() -> 1
|
|
|
|
// f(uint256): 20 -> FAILURE
|
|
|
|
// x() -> 1
|
|
|
|
// stack(uint256): 1023 -> FAILURE
|
2022-05-23 10:54:18 +00:00
|
|
|
// gas irOptimized: 260987
|
2021-10-27 15:26:44 +00:00
|
|
|
// gas legacy: 483942
|
2022-06-03 20:04:16 +00:00
|
|
|
// gas legacyOptimized: 302349
|
2021-01-13 14:35:55 +00:00
|
|
|
// x() -> 1
|
2022-09-16 13:53:19 +00:00
|
|
|
// stack(uint256): 10 -> 0x87948bd7ebbe13a00bfd930c93e4828ab18e3908
|
2021-01-13 14:35:55 +00:00
|
|
|
// x() -> 2
|