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.111.3 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.111.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-xkxkZ41odKpKDO9UxU6BnIAo54CFUgxl4j4IZE5C7lNHW2j4Ga2zCBv7wNNI0GFHOBMIZ5S2jGboJ/inDm9pCw==",
"shasum": "012723161529b57314aa06b494a290b41929c994",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.111.3.tgz",
"fileCount": 8,
"unpackedSize": 160404,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIGC681/xl2Z7x4qA/kuM7MUD6Id5h2q8Y+8zDpUHOdFvAiEA8Goln1VhtUgAAuJ4lULZpsfOw1VrIwM58sxnKR0CB5g="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEi2/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdUQ/+Lfkj/8RTkOzoVpp8N9PZc97eDs34GP3tRCQEA02OC/J/aajk\r\n3GrAx6Es3rSmpbH6HvoDELAnPGYIm+onCMRCPiolgxsWM5+2NqkpNr3W0LW8\r\nxnRPkSf79U3dQz+2SD2mwdsPClKSezO9inML2FH+NGBN4UashDVvSXpNTtqi\r\nAgwoQ7Uav+rBz3oWnjPje5K0C8DsviauoNHntlaSVYzzoUhPrkZ8jx7j5urM\r\nCKSgtWWMG+o26avLPQhTZwzRqvaCUNyMGlXdoB+3I7ka439g67nOuj1ayQx7\r\nw2C/MuqCsfa8dUq/Czb2uw8/yHETOz7+SoA4BDhorKcqMCal8FsZZ6qH7Nfh\r\nmybI9t8U1hWzWXX1RLOqd/qWZQN1SP8gP97ARGDYihY4CXMjqSHVw+nz9qN/\r\n0CoMYqaK+uG5rIxjJqbj1BbYS5NBVswSjnp4fcxrWeCD3K+LnDYMeX934o2z\r\nVPHNHuVxb73r5BGLkSdsVrZaLydebh4YnY3+5oIDMenO87NNrJUX/Xfu5c+w\r\nMCFGHpo9a19xYG+35sLACulcjVdnn1LnIpuzofcPDy9aV1mpHoxk9pBIq2Vu\r\nYee4D8shCFTwjaf/7Bl82JA/l7VooSIoILF3y2aD9tuQJZvzDYw5YveWxtpi\r\nc94ZoGhyPdEBT9sVa23vWcU9Z0ruvuini4o=\r\n=1Lr0\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:f21a198593dccfc5bb4551831065200d2db565aa596502b8e12ff2ec3ba341c2