Tron blockchain adopted a custom type of addresses. It is similar to Base58 encoding format, with some modifications.

Under basic tron address encoding format an address can be encoded as:

base58encode ( concat ( <constant-prefix>, <address>, <checksum> ) )

Functions

from_tron_address()

from_tron_address(varchar)varbinary

Converts a Tron address string to the corresponding VARBINARY hex address.

SELECT 
    from_tron_address('THHRK1bA7YRPZBcLnTP1SZy9ipUpsRwpo6')
-- results in VARBINARY 0x503aa4ad108bd3a89ba0310e23b49fb654cd6986

to_tron_address()

to_tron_address(varbinary)varchar

Encodes a VARBINARY hex address to the corresponding Tron address.

SELECT 
    to_tron_address(0x503aa4ad108bd3a89ba0310e23b49fb654cd6986)
-- results 'THHRK1bA7YRPZBcLnTP1SZy9ipUpsRwpo6'