> ## Documentation Index
> Fetch the complete documentation index at: https://developers.paxoslabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Token Balances

> Read ERC-20 token balances directly from the blockchain

Read ERC-20 token balances directly from the blockchain. Equivalent to the SDK's internal `getErc20Balance()`.

## Contract Methods

### `balanceOf(account)`

Returns the token balance for an address.

| Parameter | Type      | Description             |
| --------- | --------- | ----------------------- |
| `account` | `address` | Wallet address to query |

**Returns**: `uint256` — token balance in the token's smallest unit

### `decimals()`

Returns the number of decimals the token uses.

**Returns**: `uint8` — decimal places (e.g., `6` for USDC, `18` for account shares)

## ABI

```json theme={null}
[
  {
    "inputs": [{ "name": "account", "type": "address" }],
    "name": "balanceOf",
    "outputs": [{ "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "decimals",
    "outputs": [{ "name": "", "type": "uint8" }],
    "stateMutability": "view",
    "type": "function"
  }
]
```

## Usage

Call these on any ERC-20 token contract, including:

| What to check         | Contract to call | Address source from [Account Discovery](/v0.5.2/intro/products/earn/developers/guides/direct-contract/vault-queries/vault-discovery) |
| --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Account share balance | **BoringVault**  | `vault.boringVaultAddress`                                                                                                           |
| Deposit token balance | **ERC-20 token** | `vault.supportedAssets[].address`                                                                                                    |

<Info>
  To convert a raw balance to a human-readable amount, divide by
  `10 ^ decimals`. For example, a USDC `balanceOf` of `1000000000` with
  `decimals` of `6` = 1,000 USDC.
</Info>
