# approveAllowance

```ts
function approveAllowance(client, options): Promise<`0x${string}`>;
```

Defined in: [packages/synapse-core/src/erc20.ts:119](https://github.com/FilOzone/synapse-sdk/blob/1d6c4b9fe34534bf1087dfe41491b72be0b46858/packages/synapse-core/src/erc20.ts#L119)

Approve the allowance of the ERC20 token to the payments contract.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`, `Account`\> | The client to use. |
| `options` | [`ERC20ApproveAllowanceOptions`](/reference/filoz/synapse-core/erc20/type-aliases/erc20approveallowanceoptions/) | The props to use. |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`` `0x${string}` ``\>

The hash of the approve transaction.

## Throws

- SimulateContractErrorType if the simulate contract fails.

## Throws

- WriteContractErrorType if the write contract fails.