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

14 lines
243 B
Solidity
Raw Normal View History

contract test {
2020-06-23 12:14:24 +00:00
constructor() payable {}
function getBalance() public returns (uint256 balance) {
return address(this).balance;
}
}
// ====
// compileViaYul: also
// ----
// constructor(), 23 wei ->
// getBalance() -> 23