Address

class Address(address_prefix: iconservice.base.address.AddressPrefix, address_body: bytes, ignore_length_validate: bool = False)

Address class

body

Returns 20-byte address body part

Returns:20 byte data standing for address
static from_bytes(buf: bytes) → iconservice.base.address.Address

Create Address object from bytes data

Parameters:bufbytes bytes data including Address information
Returns:Address
static from_data(prefix: iconservice.base.address.AddressPrefix, data: bytes)

creates an address object using given body bytes

Parameters:
  • prefix – address prefix
  • data – 20-bytes address body
Returns:

Address

static from_string(address: str)

creates an address object from given 42-char string address

Returns:Address
is_contract

Whether the address is SCORE

Returns:True(contract) False(Not contract)
prefix

Returns address prefix part

Returns:AddressPrefix AddressPrefix.EOA(0) or AddressPrefix.CONTRACT(1)
to_bytes() → bytes

Returns data as bytes from the address object

Returns:bytes data including information of Address object