> For the complete documentation index, see [llms.txt](https://yupana-finance.gitbook.io/yupana-document-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yupana-finance.gitbook.io/yupana-document-portal/developer-space/ytoken-contract-methods/admin-methods/manage-entrypoints/setadmin.md).

# setAdmin

address -> storage with \[ admin ]

Sets new `admin` to contract storage

### Usage

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

```typescript
const newAdmin = "tz1...";
const yupana = await tezos.contract.at(yTokenAddress);
const operation = await yupana.methods.setAdmin(newAdmin).send();
await operation.confirmation();
```

{% endtab %}

{% tab title="🐍   Pytezos" %}

```python
yupana = ContractInterface.from_michelson(code) # or client.contract(contract_address)...
call = yupana.setAdmin("tz1...")
opg = call.inject()
```

{% endtab %}
{% endtabs %}

### Errors

* `yToken/not-admin` - `sender` is not contract admin.
