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 ...

Get Solidity Programming Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.