# pause\_farms

An entrypoint that updates users' rewards and pauses/unpauses the specified farm. Can pause/unpause a group of farms in one transaction. Paused farms can't accept deposits (stakes).

### Call parameters

```pascaligo
type pause_farm_type    is [@layout:comb] record [
  fid                     : fid_type;
  pause                   : bool;
]

type pause_farms_type   is list(pause_farm_type)
```

<table><thead><tr><th width="262.3333333333333">Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>fid</td><td>fid_type (nat)</td><td>Farm's ID</td></tr><tr><td>pause</td><td>bool</td><td>Flag that indicates: pause or unpause a farm</td></tr></tbody></table>

### Usage

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

```javascript
const tFarmAddress = "KT1...";
const params = [
    {
        fid: 1,
        pause: true, // or false to unpause the farm
    },
    ...
];
const tFarm = await tezos.contract.at(tFarmAddress);
const operation = await tFarm.methods.pause_farms(params).send();

await operation.confirmation();
```

{% endtab %}
{% endtabs %}

### Errors

* `Not-admin` - `sender` of the transaction is not current administrator.
* `QSystem/farm-not-set` - farming with `fid` parameter doesn't exist.


---

# 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/admin-entrypoints/pause_farms.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.
