Observed since 20 Oct, 23:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0xflair/react-openzeppelin
Ready-made React hooks on top of OpenZeppelin smart contracts. This library is built on top of amazing [wagmi](https://wagmi.sh).
react-openzeppelinReady-made React hooks on top of OpenZeppelin smart contracts. This library is built on top of amazing wagmi.
npm install @0xflair/react-openzeppelin
The dependencies:
ethers: ^5.6.5wagmi: ^0.3.5useOzHasRoleCheck if a certain address has a specific Openzeppelin's AccessControl role or not.
import { keccak256, toUtf8Bytes } from "ethers/lib/utils";
import { useOzHasRole } from "@0xflair/react-openzeppelin";
const { data, error, isLoading } = useOzHasRole({
// You contract address that is using Openzeppelin's AccessControl
contractAddress: "0x111111111111111111111111111111",
// The address to check if it has the role or not
address: "0x222222222222222222222222222222",
// The role hash you want to check
role: keccak256(toUtf8Bytes("MINTER_ROLE")),
});
useOzRoleGranterAssign a certain role to a specific address.
useOzRoleRenouncerRenounce a certain role from an already granted address.
useOzOwnerCheck if a certain address is owner based on Openzeppelin's Ownable.
This library is a work in progress and we'll be adding new hooks as we need them. If there's a method you want to see as a simple hook feel free to open an issue or better create a PR :)
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
@0xflair/contracts-registryEnvironment{
"local_name": "@0xflair/contracts-registry",
"alias": false,
"peer_metadata": null
} | ^0.97.3 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.97.3 | runtime |
ethersEnvironment{
"local_name": "ethers",
"alias": false,
"peer_metadata": null
} | ^5.6.5 | runtime |
wagmiEnvironment{
"local_name": "wagmi",
"alias": false,
"peer_metadata": null
} | ^0.3.5 | runtime |
@types/reactEnvironment{
"local_name": "@types/react",
"alias": false,
"peer_metadata": null
} | ^18.0.10 | development |
@types/react-domEnvironment{
"local_name": "@types/react-dom",
"alias": false,
"peer_metadata": null
} | ^18.0.5 | development |
@0xflair/contracts-registryEnvironment{
"local_name": "@0xflair/contracts-registry",
"alias": false,
"peer_metadata": null
} | 0.* | peer |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | 0.* | peer |
ethersEnvironment{
"local_name": "ethers",
"alias": false,
"peer_metadata": null
} | ^5.6.5 | peer |
reactEnvironment{
"local_name": "react",
"alias": false,
"peer_metadata": null
} | ^16 || ^17 || ^18 | peer |
react-domEnvironment{
"local_name": "react-dom",
"alias": false,
"peer_metadata": null
} | ^16 || ^17 || ^18 | peer |
react-queryEnvironment{
"local_name": "react-query",
"alias": false,
"peer_metadata": null
} | * | peer |
wagmiEnvironment{
"local_name": "wagmi",
"alias": false,
"peer_metadata": null
} | ^0.3.5 | peer |
Source distribution
{
"integrity": "sha512-VN4OTtfVNyo2CeFQ9gi/poiMN99V12ygjwOSJbGmWbPRsJeHsG0xCcUMGxnqDC2Hv7T+lD4UJgxV7STSskQCOA==",
"shasum": "481ab62de3e75aff72d7e1fb362354bcdf82aa11",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.97.3.tgz",
"fileCount": 8,
"unpackedSize": 159276,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCICCq5Holb1saRvmNeMohni56o/yfYPXauBC27Qv//XBsAiAGx5RPZXECsBCPP5Sgf5Vq6Qwm2kkJlMHC3pLcL3LWzA=="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8kb4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqieA//XEDsMpAomT5QAmllNjpbEySx4lyvAVl1i/V8ydhxFPRsrvwD\r\nWaILyV19QJGmlHnYFEBo0ZlfbV4Ije7IglKeYBLcdUAmuQ+cppRGIjoqbaBC\r\nUsd1YGZz70pGke/+jNGRtfmhK55S6HB8yk43Nx5g6da0WhNn4MQIvNX0Q8Mv\r\nW+/DsL4YPgxvPd1X1805bkgOZJFZiJEgJ81uzntZ7YhjhGowUHlu1Pawuj/u\r\nqXfXbDvEOPOGpFfM1c3tSqAgEEtoC65nvhJQpGc6NwZCUc7g5xVbNMhXdMwB\r\nHf201jenjSfCK70RoNCx35O8Gx6xpKRsk3dy2jVnAFSIUz9hdITWifbM+W0q\r\nZnJHMe66YGQxwvPD7IdoOowJcSfREsVuy271Fn+10lCtdm20sHdpWd+5NDCr\r\n9Jv/mYr9nfP0VEhEUfsEJSwvKTVBkwFlUgbkVv9q7u8m1WhvOeu/ntEiQmWF\r\nIij2FCqM2nTfnanOCl9Q6rHtDZq7gY0YXSvnqYiDxqdbyE0fMUvQuxjzd4d7\r\nE88Om3Ft2PzooFpWM6yioOuOgtEye74BuZF4N4K55NsQkNP72eZykZ0lRC0z\r\no45+686fzPQ4BXG/AtyjlSI/VOOvrl7PAXCfenm5dGzyLcLD41lr2Boj3qI2\r\nMEgjhoelojUfoYcDaHoHfzr8ikobDdN4D9o=\r\n=sNgi\r\n-----END PGP SIGNATURE-----\r\n"
}Observed since 20 Oct, 23:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:ab464ecdb2eee0fd81f6fe03ee22e98cc40054e8bf582db3c5ea25f3bee81f6e