solidity/test/libsolidity/semanticTests/various/senders_balance.sol

24 lines
379 B
Solidity
Raw Normal View History

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 {}
function f() public view returns (uint256) {
return c.f();
}
}
// ----
// 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
// f() -> 27