solidity/test/libsolidity/semanticTests/various/senders_balance.sol
2022-05-23 13:37:50 +02:00

24 lines
379 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: 170627
// gas legacy: 222977
// gas legacyOptimized: 169779
// f() -> 27