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.65.1 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.65.1 | 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-24tcLDvTrW1r7yjbzwO0JpvD0qK3Fo4JRZuwSw7k6J6y4nXxFZm1IO4jPQHgaF1aE7p2X1P+NVqlolaQxItEtQ==",
"shasum": "78e34953012dca55683b7e44cdf2a53cfa0a9e2c",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.65.1.tgz",
"fileCount": 8,
"unpackedSize": 136145,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQDUzxmMYD6/J3+Cco9ea0AZ8cmgJ+Pz+mF9OeT3cJvqnQIhAPQFwuCWN0ZZuqFpoiI7l4ZQbVAHJUlCGEs3K4+wYfVk"
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuyiZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHww/+NXwo7kuO+E0TKLdztTCaJKeuxzr3qpJSFZXKW7Iu7cGXT1uy\r\n4+lmCi/U9Kquvfsf6x5FsydnrfheMAaXbLAn84CxOoxuaDYb03w6QPGLKdDL\r\nefS/+5Rfu30Ep/IGlEBe6ldx/L/Nr/nY6Qp4LbDLH5I4zK6F0Ls+tQJYI4yn\r\nsx70D/c7aLZ6c++N2ItbG2ZzxbcQs+5crw/Q+axbK9NceA6zPs9tbU1CFi4K\r\nmrJlpzzoIiJudO2S0Mi0UJrf0ScT421Fc/TxNiEfBSlOGqGVMl2OE77NzXbP\r\nNxeYwjFt7CLDnfcq7/MrRQ2qY77/f5x8H6acWGMbDCJ0NZ9pYdYclUag+u2t\r\nmhb/FT0bnhDJAl0jpLCdc6Iithe6/e6a/JctWzfmxi3OfN2lz2w/syirMF/B\r\n2MNykH8AyEV2zByr+sKlc8IoxbCqs9iwuGlufy5UQERvvyHsDPSqNtT/xLKp\r\nx2mztRkvwrjAcNROT8bNfBeSeiYlAMb2vUvLgsSCmYmJxRen8hGAr0D1yGZj\r\najrW1BhrNLa1FCljuVa5ckTiA69I5sh1Npfsz9qzNnv8EHLLSiOyCc9LIfBL\r\nlkP47ot2GZfot9Tz9PcceCEu1noef2uUhrA/TKJ3ewj81rkYD52RzUCFac5m\r\nfKndG2G0CGNn7mez/xERHA+39r6JvQiVFzw=\r\n=gXbh\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:4004bf393374b554e869c25353239a7d9c86148f108deb80e003ffcae692300a