# TokenRole.serialize

Serializes a token role to its keccak256 hash representation.

TIP-20 includes a built-in RBAC system with roles like `ISSUER_ROLE` (mint/burn), `PAUSE_ROLE`/`UNPAUSE_ROLE` (emergency controls), and `BURN_BLOCKED_ROLE` (compliance).

[TIP-20 RBAC](https://docs.tempo.xyz/protocol/tip20/overview#role-based-access-control-rbac)

## Imports

:::code-group
```ts [Named]
import { TokenRole } from 'ox/tempo'
```

```ts [Entrypoint]
import * as TokenRole from 'ox/tempo/TokenRole'
```
:::

## Examples

```ts twoslash
import { TokenRole } from 'ox/tempo'

const hash = TokenRole.serialize('issuer')
```

## Definition

```ts
function serialize(
  role: TokenRole.TokenRole,
): `0x${string}`
```

**Source:** [src/tempo/TokenRole.ts](https://github.com/wevm/ox/blob/main/src/tempo/TokenRole.ts#L46)

## Parameters

### role

* **Type:** [`TokenRole.TokenRole`](/tempo/reference/TokenRole/types#tokenroletokenrole)

The token role to serialize.

## Return Type

The keccak256 hash of the role.

`0x${string}`
