Observed since 20 Oct, 23:29 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.64.6 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.64.6 | 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-9kKXSRtVgK12q0HHJgCuQAjQSDURmqeF2pew9RVjc1MtHcqL62VlMBz/3BSPOs96d7jPr7EPYfMJ9Rnoi50mnQ==",
"shasum": "e6de17a00b4c33ee7ea2c1ca0a2e35e25a61e1a2",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.64.6.tgz",
"fileCount": 8,
"unpackedSize": 136145,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQDEk8EXP8vIba8BpnY2gKS29jSWynSigX0kbkUeb8u3NwIhAMfy30tE5PnqR1x2ur7KDApoozxXoI8ZxkEO0QGrXgBa"
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuC0zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcTg//TowTI/t796+Ltzy4V0A2cgXZIYH+86UHsf5P+/evKODslFe4\r\nqa/n6VIW2meYsG49nCmaZPjgPzP2dpORoC43p+V3s9yMtsSUfDin6oSG0qbr\r\nCrvhYDez7o41LsEYB/ecrJmfxw6nIuP7YNL1U/jI/CcQObPRPHXgXvBuFDVg\r\nAsVxaGNbypB3hHv/+IRTXVlN0nNhvTVnZ6DjgNMcLb1HRm6fHN6uGC0n1cUy\r\nZko5G+uJ9xw9lutHrK9eRrjVlOztzVCfjWWH5xMx35UdTREianlU+LhBYQi3\r\nlRiVv3Jz2wylgziJExIxxN5bpGrZaBhWMNoCenopjO5IFdrqI/3h0xPen/AL\r\nXn1544GM9CAH6cZb/e8keHJqz6WAn8q0eEL2fCICN2oCOEHyhrLcn7PVop3U\r\nLounkyr7bT7/kMR7DpV+vQ85uFD5WeWNHjplKPK8jOXuoxkfFFtyQiDTih1i\r\nG7rW+VbuypSnlPxcsGsefeloNO8VXuWZhvkUdbdDh9XHrDMn5xMNqjDkeqlz\r\nBb/Zv2hiK4m3yXlxqWYeLBD1ThjlaCuhq7YCYH5BmiwEBqCbULIVU890qgoV\r\nOKgrxdBPSQZ0gERurxamhy3HrSOeFscLX2Hm6HnUY083F+P9UwQiJlbz49AF\r\no2nNDc4PPYEBvgX2Rt8Uur+bpjyBfvcaA98=\r\n=es/A\r\n-----END PGP SIGNATURE-----\r\n"
}Observed since 20 Oct, 23:29 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:37b58ed78dbb4f30b9c4b7998419f3eaec3a6778bc0325ae242e636e76bfa73a