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.58.0 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.58.0 | 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-l+bjuYZWTeW8Cfk1PSmlH1Bc0j0wWVN3f4NeMOoxMWRK3JcvvP6b+Yof3DOmcYCqFots0MprNDaQ0YxMB3/oRg==",
"shasum": "123da605ad376369ed03311a88deb078df03d45d",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.58.0.tgz",
"fileCount": 8,
"unpackedSize": 135666,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIHB8RncOo85gEi1zkl+SC2dbop5LTWV63E1t8jHxBem/AiAr1j/DkjC+dfIUJeYGZEQUMVz25Zw+rGPCwM2K3G6JIg=="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirJeLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqk2g/+ITMe3TFjQv1NRwMbeN1wMBg9P33LDtlTCzOE5U7W9X8GkCcl\r\n55iaMQc7/hypZBhfd+lY1/T4f8CJrpDTRBrWzHKqD6H0u4ssTs6/EAR0pnhd\r\n7P4SXo1bTndHDfrLBM+HClSK/279USTIUev1gy7aBNr7DjqJuGE3zLlciaBI\r\nHPzrRtFqvw5rQX1gX0j6nCTbXtX6X6Y1wgGrQ1opiD2XuSzisJf8Bl9io+ga\r\njzGy7oybd0Aa+azM43ll7yfZQ53+eN/xnlS5VFHxNpMxYbC8GbdpsMkHiYng\r\n5iIsF3eNNOD7zok4JQUaQbObn8goPGIBeKTv/64BvFnOL3qPbpxiO+3nKg4S\r\noF341hc3DRmCZdBaH7sAqpP/PZOn+3J+18u8n6sxe6ZcqWqTiI9yh4mghAeR\r\namskAh1eMAJx3csxpZYYupwH3l4tH0IX8CWsL8p3F6rsW9HKVnmJBgkXttrE\r\nK00LhBLFdwa3XoXJhxxaJAYVGR/gJYU3ETux5HDcA58SfRfOf+MQ4XAtjTtS\r\nvk8F8H8Jj7OagoD7XHSajpBb667X2Y/pfND35oJwur1PfxAbTU3Pt7ehRa7e\r\nF5sxfqseu04dljacy6gqkrfGk50qoDKEf1BcYQUXv79MQTEtwofUyof5SQMV\r\na68o4SUpx6F0pFVko/vjlno0YLrvuFuK8TU=\r\n=LdDn\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:a03689822989901f6fa30b6054a9abe5aae247b61d4a3bcd2d3104abda034465