golem-base-sdk
    Preparing search index...

    Function formatEther

    • Converts numerical wei to a string representation of ether.

      Parameters

      • wei: bigint
      • Optionalunit: "wei" | "gwei"

      Returns string

      import { formatEther } from 'viem'

      formatEther(1000000000000000000n)
      // '1'