Docs

grantRole

Grants a role to a target account.

Example

import { grantRole } from "thirdweb/extensions/permissions";
const result = await grantRole({
contract,
role: "admin",
targetAccountAddress: "0x1234567890123456789012345678901234567890",
});

Parameters

Returns

A transaction that grants the role when sent.