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).
Imports
Named
import { TokenRole } from 'ox/tempo'Examples
import { TokenRole } from 'ox/tempo'
const hash = TokenRole.serialize('issuer')Definition
function serialize(
role: TokenRole.TokenRole,
): `0x${string}`Source: src/tempo/TokenRole.ts
Parameters
role
- Type:
TokenRole.TokenRole
The token role to serialize.
Return Type
The keccak256 hash of the role.
0x${string}

