Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.51 KB

Address Type.md

File metadata and controls

31 lines (24 loc) · 1.51 KB

The address type comes in two types:

  1. address: Holds a 20 byte value (size of an Ethereum address)

  2. address payable: Same as address, but with the additional members transfer and send. address payable is an address you can send Ether to, while a plain address cannot be sent Ether. 

  3. Operators are <=, <, ==, !=, >= and >

  4. Conversions: Implicit conversions from address payable to address are allowed, whereas conversions from address to address payable must be explicit via payable(<address>). Explicit conversions to and from address are allowed for uint160, integer literals, bytes20 and contract types. 

  5. Only expressions of type address and contract-type can be converted to the type address payable via the explicit conversion payable(...). For contract-type, this conversion is only allowed if the contract can receive Ether, i.e., the contract either has a receive or a payable fallback function.


Slide Screenshot

045.jpg


Slide Deck

  • Account Address: EOA/Contract
  • Keyword: account (payable) 20 Bytes
  • Operators are <=, <, ==, !=, >= and >
  • Implicit/Explicit Conversions
  • Security: Critical
  • Access Control, Balances etc.

References


Tags

Comparison & Bitwise Logic