2020-03-09 21:14:07 +00:00
|
|
|
contract C {
|
|
|
|
function f() public view returns (uint256) {
|
|
|
|
return msg.sender.balance;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contract D {
|
|
|
|
C c = new C();
|
|
|
|
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor() payable {}
|
2020-03-09 21:14:07 +00:00
|
|
|
|
|
|
|
function f() public view returns (uint256) {
|
|
|
|
return c.f();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-09 19:59:17 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
|
|
|
// constructor(), 27 wei ->
|
2022-03-15 16:25:35 +00:00
|
|
|
// gas irOptimized: 175157
|
2021-11-15 15:19:33 +00:00
|
|
|
// gas legacy: 222977
|
|
|
|
// gas legacyOptimized: 169779
|
2020-03-09 21:14:07 +00:00
|
|
|
// f() -> 27
|