Address
An address on the Tezos blockchain is a string whose suffix is the hash of the public key of an account.
If the account is a smart contract (sometimes known as an originated account), the address starts with
KT1
.If the account is a user account (sometimes known as an implicit account), the address starts with
tz1
,tz2
,tz3
, ortz4
.
For more information about Tezos addresses, see Accounts and addresses on docs.tezos.com.
The address
type represents a well-formed Tezos address.
However, the type being well-formed does not automatically mean that the address is valid and identifies a real account.
Beware of failures if the address is invalid.
To create an address in LIGO, cast a string to the address
type, as in this example:
To get the address of the current contract, see Contracts.
Sender
The sender is the address of the account (smart contract or user account) that initiated the current transaction. The sender can be different from the source of the transaction.
For example, suppose that user account A calls contract B and as a result, contract B calls contract C. In the context of contract C, contract B is the sender because it sent the immediate transaction to contract C. Conversely, account A is the source because it initiated the current chain of transactions. Account A is the source of all subsequent transactions in the chain, including any transactions that result from the call to contract C.
Source
The source is the address of the user (implicit) account that initiated the current chain of transactions. If there is more than one transaction in the chain, that address is different from the sender.