> ## 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.grantRole

> Generated B20 reference for grantRole(bytes32,address).

## Signature

```solidity theme={null}
function grantRole(bytes32 role, address account) external;
```

| Field               | Value                        |
| ------------------- | ---------------------------- |
| Selector            | `0x2f2ff15d`                 |
| Canonical signature | `grantRole(bytes32,address)` |

## Description

Grants `role` to `account`. Emits `RoleGranted`.

## Parameters

| Parameter | Description    |
| --------- | -------------- |
| `role`    | Role to grant. |
| `account` | Recipient.     |

## Reverts

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

## 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).grantRole(role, account);
```
