bitcoin-sv / sol2scrypt

Solidity to sCrypt Transplier
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

address.balance #84

Closed zhfnjust closed 2 years ago

zhfnjust commented 2 years ago
contract C {

    uint immutable maxBalance;

    constructor(address _reference) {
        // Assignments to immutables can even access the environment.
        maxBalance = _reference.balance;
    }

    function isBalanceTooHigh(address _other) public view returns (bool) {
        return _other.balance > maxBalance;
    }
}