const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: overwriteRoles,
isLoading,
error,
} = useSetAllRoleMembers(contract);
if (error) {
console.error("failed to overwrite roles", error);
}
return (
<button
disabled={isLoading}
onClick={() =>
overwriteRoles({
rolesWithAddresses: { minter: ["{{wallet_address}"] },
})
}
>
Overwrite Roles
</button>
);
};