1

Actually I was reading this Answer https://ethereum.stackexchange.com/a/64109/55286 . And this person says The concept of payable and non-payable addresses only exists in the Solidity type system at compile-time. The difference between payable and non-payable addresses is gone in the compiled contract code.

Does this statement means that the address and address payable are only defined at the compile time but after the contract is deployed all the address reaching out the contract are payable as well?? I dunno I'm confused as hell

I tried but didn't understand please help

0
2

The difference allows the programmer to be aware which addresses are meant to receive ether and which don't, as explained at the bottom of the the answer you linked (under "Rationale"). It is a static safety measure provided by the language (like static type checking). address payable has members transfer and send, address does not (Solidity >= 0.5). Therefore:

address a = "0xsda";
address payable b = "0xsad";
a.transfer(1); // compilation error
b.transfer(1); // good

The doc link for more info: https://solidity.readthedocs.io/en/v0.5.3/types.html#address.

Not the answer you're looking for? Browse other questions tagged or ask your own question.