# Address
Structure of an address.
# Constructor
Address(bytes: ByteVector)
# Fields
# | Name | Data type | Description |
---|---|---|---|
1 | bytes | ByteVector | Array of bytes of the address |
# Examples
Get all types of balance in WAVES for the current account (in a dApp script or an account script):
wavesBalance(this)
For any account:
let address=base58'3N4iKL6ikwxiL7yNvWQmw7rg3wGna8uL6LU'
wavesBalance(Address(address))
Get an entry value by key from the account data storage:
let address2=base58'3N6dFJ6XBQsWz1VV1i5aW4CyYpVKc39MUGZ'
getBoolean(Address(address2),"allow_orders")
Convert the address that invoked the function to a base58 string:
{-# STDLIB_VERSION 8 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
@Callable(i)
func foo(question: String) = {
let callerAddress = toBase58String(i.caller.bytes)
...
}
Check the recipient's address in the Transfer transaction:
{-# STDLIB_VERSION 8 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ACCOUNT #-}
# Bank dApp address
let BANK = base58'3MpFRn3X9ZqcLimFoqNeZwPBnwP7Br5Fmgs'
match (tx) {
case t: TransferTransaction => addressFromRecipient(t.recipient).bytes == BANK
case _ => false
}