# update\_operators

An entrypoint works exactly like FA2 ***update\_operators*** entrypoint according to [TZIP-012](https://gitlab.com/tezos/tzip/-/blob/master/proposals/tzip-12/tzip-12.md).

### Call parameters

```pascaligo
type token_id_type      is nat

type operator_type      is [@layout:comb] record [
  owner         : address;
  operator      : address;
  token_id      : token_id_type;
]

type upd_operator_type  is
| Add_operator            of operator_type
| Remove_operator         of operator_type

type update_ops_type    is list(upd_operator_type)
```

| Field     | Type            | Description        |
| --------- | --------------- | ------------------ |
| owner     | address         | Owner of tokens    |
| operator  | address         | Operator of tokens |
| token\_id | token\_id\_type | Token ID           |

### Usage

{% tabs %}
{% tab title="🌮 Taquito" %}

```javascript
const tFarmAddress = "KT1...";
const params = [
    {
        add_operator: {
            owner: "tz1.../KT1...",
            operator: "tz1.../KT1...",
            token_id: 0,
        },
    },
    {
        remove_operator: {
            owner: "tz1.../KT1...",
            operator: "tz1.../KT1...",
            token_id: 1,
         },
     },
     ...
];
const tFarm = await tezos.contract.at(tFarmAddress);
const operation = await tFarm.methods.update_operators(params).send();

await operation.confirmation();
```

{% endtab %}
{% endtabs %}

### Errors

* `FA2_NOT_OWNER` - `sender` is not `owner` of account.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.quipuswap.com/smart-contracts/farming/tfarm-contract/entrypoints-overview/fa2-entrypoints/update_operators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
