> ## 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.

# Allowance Checking

> Check ERC-20 approval allowances for deposits and withdrawals

Equivalent to SDK's `isDepositSpendApproved()` and `isWithdrawalSpendApproved()`.

## Contract Method

### `allowance(owner, spender)`

Returns the amount of tokens the `spender` is approved to transfer on behalf of the `owner`.

| Parameter | Type      | Description                      |
| --------- | --------- | -------------------------------- |
| `owner`   | `address` | The token holder's address       |
| `spender` | `address` | The contract authorized to spend |

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

## ABI

```json theme={null}
[
  {
    "inputs": [
      { "name": "owner", "type": "address" },
      { "name": "spender", "type": "address" }
    ],
    "name": "allowance",
    "outputs": [{ "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  }
]
```

## Usage

| Check                  | Token contract             | Owner          | Spender                                                           |
| ---------------------- | -------------------------- | -------------- | ----------------------------------------------------------------- |
| Deposit token approval | Deposit token (e.g., USDC) | User's address | `vault.communityCodeDepositorModuleId` (DistributorCodeDepositor) |
| Account share approval | BoringVault                | User's address | `vault.withdrawQueueModuleId` (WithdrawQueue)                     |

If the returned allowance is less than the amount you intend to deposit or withdraw, you need to call `approve()` first. See the [Deposits](/v0.5.2/intro/products/earn/developers/guides/direct-contract/deposits) or [Withdrawals](/v0.5.2/intro/products/earn/developers/guides/direct-contract/withdrawals) guides for the full flow.

Contract addresses are obtained via [Account Discovery](/v0.5.2/intro/products/earn/developers/guides/direct-contract/vault-queries/vault-discovery).
