Address
An address is a 20 bytes data type. It is specifically designed to hold account addresses in Ethereum, which are 160 bits or 20 bytes in size. It can hold contract account addresses as well as externally owned account addresses. Address is a value type and it creates a new copy while being assigned to another variable.
Address has a balance property that returns the amount of Ether available with the account and has a few functions for transferring Ether to accounts and invoking contract functions.
It provides the following two functions to transfer Ether:
- transfer
- send
The transfer function is a better alternative for transferring Ether to an account than the send function. The send function returns a boolean value depending on ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access