Beta
an instance of a SmartContract
a mutation object that can be used to revoke a role from a member on the contract
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: revokeRole,
isLoading,
error,
} = useRevokeRole(contract);
if (error) {
console.error("failed to revoke role", error);
}
return (
<button
disabled={isLoading}
onClick={() => revokeRole({ role: "admin", address: {{wallet_address}} })}
>
Revoke Role
</button>
);
};
Permissions | PermissionsEnumerable
Generated using TypeDoc
Revoke a role from a specific address