# set\_admin

Changing of the contract administrator is done in 2 steps:

1. Current administrator should transfer his rights to a new administrator.
2. A new administrator must accept his new role. If he didn't accept a new role, the previous administrator continues to be an administrator of this contract.

This entrypoint describes the first step of changing the contract administrator. The second step is described [here](/smart-contracts/farming/tfarm-contract/entrypoints-overview/admin-entrypoints/confirm_admin.md).

### Call parameters

<table><thead><tr><th width="150">Field</th><th width="183.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>admin</td><td>address</td><td>A new administrator of the contract</td></tr></tbody></table>

### Usage

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

```javascript
const tFarmAddress = "KT1...";
const admin = "tz1...";
const tFarm = await tezos.contract.at(tFarmAddress);
const operation = await tFarm.methods.set_admin(admin).send();

await operation.confirmation();
```

{% endtab %}
{% endtabs %}

### Errors

* `Not-admin` - `sender` of the transaction is not current administrator.


---

# 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/set_admin.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.
