# setOperatorApprovalCall

> **setOperatorApprovalCall**(`options`): [`OutputType`](/reference/filoz/synapse-core/pay/namespaces/setoperatorapprovalcall/type-aliases/outputtype/)

Defined in: [packages/synapse-core/src/pay/set-operator-approval.ts:231](https://github.com/FilOzone/synapse-sdk/blob/6cf8b3ed2dd3ae76ed05cb86995d711a08a298a6/packages/synapse-core/src/pay/set-operator-approval.ts#L231)

Create a call to the setOperatorApproval function

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

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/pay/namespaces/setoperatorapprovalcall/type-aliases/optionstype/) | [setOperatorApprovalCall.OptionsType](/reference/filoz/synapse-core/pay/namespaces/setoperatorapprovalcall/type-aliases/optionstype/) |

## Returns

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

The call to the setOperatorApproval function [setOperatorApprovalCall.OutputType](/reference/filoz/synapse-core/pay/namespaces/setoperatorapprovalcall/type-aliases/outputtype/)

## Throws

Errors [setOperatorApprovalCall.ErrorType](/reference/filoz/synapse-core/pay/namespaces/setoperatorapprovalcall/type-aliases/errortype/)

## Example

```ts
import { setOperatorApprovalCall } from '@filoz/synapse-core/pay'
import { createWalletClient, http } 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, setOperatorApprovalCall({
  chain: calibration,
  approve: true,
}))

console.log(request)
```