useGrantRole
Hook for granting a role on a smart contract.
Available to use on smart contracts that implement the Permissions
interface.
Example
Parameters
Returns
A mutation object to grant a member of a role on the contract
options
The mutation function accepts an object with the following properties:
role
The name of the role to grant the address.
Accepts any string
value to include custom-defined roles.
Also accepts the default roles available on the prebuilt contracts :
address
The address to grant the role to.
To use the address of the connected wallet, use the useAddress
hook.