August 2018
Beginner to intermediate
350 pages
11h 58m
English
This value type holds a 20-byte value, which is the size of an Ethereum address (40 hex characters or 160 bits). Take a look at this:
address a = 0xe2793a1b9a149253341cA268057a9EFA42965F83
This type has several members that can be used to interact with the contract. These members are as follows:
balance returns the balance of the address in units of wei, for example:
address a = 0xe2793a1b9a149253341cA268057a9EFA42965F83;uint bal = a.balance;
transfer is used to transfer from one address to another address, for example:
address a = 0xe2793a1b9a149253341cA268057a9EFA42965F83;address b = 0x126B3adF2556C7e8B4C3197035D0E4cbec1dBa83;if (a.balance > b.balance) b.transfer(6);
Almost the ...
Read now
Unlock full access