> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-mux-docs-claude-6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# IB20.setRoleAdmin

> Generated B20 reference for setRoleAdmin(bytes32,bytes32).

## Signature

```solidity theme={null}
function setRoleAdmin(bytes32 role, bytes32 newAdminRole) external;
```

| Field               | Value                           |
| ------------------- | ------------------------------- |
| Selector            | `0x1e4e0091`                    |
| Canonical signature | `setRoleAdmin(bytes32,bytes32)` |

## Description

Sets the admin role for `role`. Emits `RoleAdminChanged`.

## Parameters

| Parameter      | Description                        |
| -------------- | ---------------------------------- |
| `role`         | Role whose admin is being updated. |
| `newAdminRole` | New admin role.                    |

## Reverts

* `AccessControlUnauthorizedAccount` when the caller does not hold the current admin role for `role`, or when the token has been transitioned to admin-less via `renounceLastAdmin`.

## Access control

Uses the B20 access-control role graph. Factory initCalls bypass role gates during creation.

## Policy interaction

No direct policy interaction.

## Example

```solidity theme={null}
IB20(target).setRoleAdmin(role, newAdminRole);
```
