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.61.2 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.61.2 | 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-RBRjn3r8R8QkOoECdiyIjFij7B/++bjWYwMco7G4V7kRjpZ/X6Ye4+JTCY2AelXf/4FINlcZ1TYFj4sDzNYAZg==",
"shasum": "4cb71d4098bfa207120edfd9a019c5b34b781da6",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.61.2.tgz",
"fileCount": 8,
"unpackedSize": 135666,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQDXx62FHjblfBwHSUR86Ztm2KtzcVUXI0zH7FzJpRMtPwIgfOE6aeXrXtbZFcd7zL5RJBkNG1X1ltjOOsaoVeXDcgo="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisglxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPiA/+JYiniWTluKS15gv/pP+xH1WQ5TtPU0DnzHZSQLusdiZk8TOR\r\nrEaBBw6xFetIt3SYp++W4ECRmGKMD4oY9krsjuUkOQPKYzC02VmSucO+kXTj\r\nlrYZxfOyRqZPQobLyjbsaXmwpopUCXbXfrH8q9tvvJgGraRxydPeebEaLaIV\r\nVeWFj4qVIfcoIatEntdmP9iftxVVT+FGLIRt9wGOHKs+Tn+2mJCzfRvFgIHi\r\ntyGfflfCtmKeHUaw1VdL5EkBPqqcxF5XF8DUWYX3WWPTl+T6i/MtYnZZe/jf\r\nEy0yT6n/BjRZ89VVlqV8A6FUN+l9vxdbGdZYDSXL14GRQXAheOIu9xV7rf9/\r\nccNTMvS9HsnQeg7EYoBRkmR/s2wDILMHdGiK85ZZP8BwC33izemPWWr6GPoo\r\n0QFPIgxDgTtPLYhQ+tEK/5UO0H8/RaDw5fWV1yOpkAaQOs9FXhvcRzbd7723\r\n/Pt9gUbTxx9od0xw0YPrpmf+hHLa5a5BcA6AK9GBGBZPLdlGCTiBGoEPoT2M\r\nSbhZP9lbThTDEMr54mamT6OqnciWyDFgo4U6lhe3uGPNSzsvBzUfIGBb18/Q\r\nqdMDyK18KLd0sCwMBbZLDi6XsUCdIfbpwxbu5DNqc9JkFRQZ672gP1pBO4P3\r\n6QL8DNnHBd7KpYldjvfrmPq3mnDvR3kk9pQ=\r\n=wjfq\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:a115d18e009f4b7866b9b2469bc2f940310c8ac9167b958989e13ebfde9befb3