# set\_reward\_per\_second

An entrypoint that setups a new reward per second in QUIPU tokens for the specified farm. Can update rewards per second for a group of farms in one transaction.

### Call parameters

```pascaligo
type rew_per_sec_type   is [@layout:comb] record [
  fid                     : fid_type;
  reward_per_second       : nat;
]

type set_rew_p_sec_type is list(rew_per_sec_type)
```

| Field               | Type            | Description           |
| ------------------- | --------------- | --------------------- |
| fid                 | fid\_type (nat) | Farm's ID             |
| reward\_per\_second | nat             | New reward per second |

### Usage

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

```javascript
const farmId = 1;
const rewardPerSecond = 100;
const qFarmAddress = "KT1...";
const params = [
    {
        fid: farmId,
        reward_per_second: rewardPerSecond,
    },
    ...
];
const qFarm = await tezos.contract.at(qFarmAddress);
const operation = await qFarm.methods.set_reward_per_second(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/qfarm-contract/entrypoints-overview/admin-entrypoints/set_reward_per_second.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.
