# approveCall

> **approveCall**(`options`): [`OutputType`](/reference/filoz/synapse-core/erc20/namespaces/approvecall/type-aliases/outputtype/)

Defined in: [packages/synapse-core/src/erc20/approve.ts:210](https://github.com/FilOzone/synapse-sdk/blob/6cf8b3ed2dd3ae76ed05cb86995d711a08a298a6/packages/synapse-core/src/erc20/approve.ts#L210)

Create a call to the approve function

This function is used to create a call to the approve function for use with
sendCalls, sendTransaction, multicall, estimateContractGas, or simulateContract.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/erc20/namespaces/approvecall/type-aliases/optionstype/) | [approveCall.OptionsType](/reference/filoz/synapse-core/erc20/namespaces/approvecall/type-aliases/optionstype/) |

## Returns

[`OutputType`](/reference/filoz/synapse-core/erc20/namespaces/approvecall/type-aliases/outputtype/)

The call to the approve function [approveCall.OutputType](/reference/filoz/synapse-core/erc20/namespaces/approvecall/type-aliases/outputtype/)

## Throws

Errors [approveCall.ErrorType](/reference/filoz/synapse-core/erc20/namespaces/approvecall/type-aliases/errortype/)

## Example

```ts
import { approveCall } from '@filoz/synapse-core/erc20'
import { createWalletClient, http, parseUnits } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { simulateContract } from 'viem/actions'
import { calibration } from '@filoz/synapse-core/chains'

const account = privateKeyToAccount('0x...')
const client = createWalletClient({
  account,
  chain: calibration,
  transport: http(),
})

// Use with simulateContract
const { request } = await simulateContract(client, approveCall({
  chain: calibration,
  amount: parseUnits('100', 18),
}))

console.log(request)
```