Skip to content

getBalance

The getBalance method retrieves the native token balance of an address.

Usage

const { balance, decimals } = await evmChain.getBalance(
  '0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199'
)

Parameters

ParameterTypeDescription
addressstringThe address to check the balance for

Returns

The method returns a Promise that resolves to an object containing:

PropertyTypeDescription
balancebigintThe balance in the chain's base units (wei for Ethereum)
decimalsnumberThe number of decimals used to format the balance (18 for Ethereum)