Files
solidity/docs
Naveen Sahu 2e2094ad82 plain address can be sent Ether too
The docs state that a plain `address` cannot be sent Ether. But even though `send` and `transfer` members are not available for plain `address`, the `call` is. And `call` can be invoked upon a plain `address` type to send Ether to the address.

For instance, the `someone` (`address` type) can be sent Ether by invoking `sendSomeone()` method in the following `Dummy` contract:

```
contract Dummy {
    address someone = 0xAb8...cb2;

    function balanceOf(address addr) public view returns (uint) {
        return addr.balance;
    }

    function sendToSomeone() public payable returns (bool) {
        (bool sent, ) = someone.call{value: msg.value}("");
        return sent;
    }
}
```
2022-02-07 12:44:21 +01:00
..
2022-01-10 12:49:30 +05:30
2022-02-07 12:44:21 +01:00
2021-12-13 11:36:07 +01:00
2021-12-20 13:15:58 +01:00
2021-07-15 10:13:30 +02:00
2022-01-24 10:21:01 +01:00
2021-03-30 23:04:32 +02:00
2015-12-07 22:35:51 +01:00
2022-01-31 20:21:42 +01:00
2021-10-26 11:30:30 +02:00
2021-10-26 11:30:30 +02:00