Grants a role to a target account.
import { grantRole } from "thirdweb/extensions/permissions";import { sendTransaction } from "thirdweb"; const transaction = grantRole({ contract, role: "admin", targetAccountAddress: "0x1234567890123456789012345678901234567890",}); await sendTransaction({ transaction, account });
function grantRole( options: BaseTransactionOptions<GrantRoleParams>,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for granting the role.
let options: BaseTransactionOptions<GrantRoleParams>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A transaction that grants the role when sent.