Docs

shortenAddress

Checksums and formats an address if valid. Note this function does not check if the provided address is an ENS.

Example

import { shortenAddress } from "thirdweb/utils";
shortenAddress("0xa0cf798816d4b9b9866b5330eea46a18382f251e");
//=> '0xA0Cf...251e'

Parameters

Returns

The shortened address.