Beta
an instance of a SmartContract
a mutation object that can be used to overwrite all roles on the contract
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>
);
};
Permissions
Generated using TypeDoc
Overwrite the list of members for specific roles