export function toEllipsis(str: string, max = 8) {
  const isHex = str.startsWith('0x');
  const adjustedMax = isHex ? max + 2 : max;
  return str.length > adjustedMax ? `${str.slice(0, adjustedMax)}…` : str;
}
