solidity/test/libsolidity/semanticTests/various/senders_balance.sol
2023-08-07 17:33:16 +02:00

23 lines
378 B
Solidity

contract C {
function f() public view returns (uint256) {
return msg.sender.balance;
}
}
contract D {
C c = new C();
constructor() payable {}
function f() public view returns (uint256) {
return c.f();
}
}
// ----
// constructor(), 27 wei ->
// gas irOptimized: 168729
// gas legacy: 218459
// gas legacyOptimized: 167292
// f() -> 27