# setAdmin

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.
