Function formatAddress

Format an address to a more readable format

formatAddress('0xbF6692795A07684147838fC54A2764aa884C440c') // '0xbF66...440c'
formatAddress('0xbF6692795A07684147838fC54A2764aa884C440c', 8, 8) // '0xbF6692...884C440c'
  • Parameters

    • address: string = ''

      The address to format

    • n: number = 6

      The number of characters to keep at the beginning

    • p: number = 4

      The number of characters to keep at the end

    Returns string

    The formatted address