export function toAbbreviation(str: string) {
  const prefixLength = str.startsWith('0x') ? 6 : 4;
  const minLength = str.startsWith('0x') ? 10 : 8;
  return str.length <= minLength
    ? str
    : `${str.substring(0, prefixLength)}…${str.substring(str.length - 4)}`;
}
