Address Functions

Addresses have multiple built-in functions you can use.

-

  fun toString(): String

Returns the string representation of the address.

    let someAddress: Address = 0x436164656E636521

    someAddress.toString()  // is "0x436164656E636521"

-

  fun toBigEndianBytes(): [UInt8]

Returns the byte array representation ([UInt8]) of the address.

    let someAddress: Address = 0x436164656E636521

    someAddress.toString()  // is `[67, 97, 100, 101, 110, 99, 101, 33]`

Last updated