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.109.1 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.109.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-c6JAbdqSQBMDfh3pzbssBJKqWyqVjuBgL0R3yz1JYPbJJzi5tHMyhM5Ogs6r2GnmiGc1jJEnudfMSbnyB0+8cQ==",
"shasum": "64fc75b85023a795aed1ef576e8e76342056206f",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.109.1.tgz",
"fileCount": 8,
"unpackedSize": 160404,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIE6sYDs11rHHhTGb/991xpDE0VILZer93x43Pv10s2xZAiEAyQZ6HFyoBIVeQ5DKhdyZwuWXWdA1i7ICqbzc/rvIb6U="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjD9mWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJvxAAmRfuCAPITDazzteBbbFK+vCiZp9mMq84W6EbcXo3roCNLMy3\r\nlL8QylIpVMGiVXdVz6egTCln+VyAVjMYdyKK6D/WGj8oVdIJFeKMLQmXUpVi\r\nE8/TKEyv1tw5YjwfXTPsusVm0vTDN5/AGk8qeaINGAUKmgUjCh7neKC6rIzh\r\nbyEfP2hTK3hIFMllhSjbAAvoNT8HhiSfbkaftdCqbmSjCG7lTso2g0V7Bub+\r\n7Tr3BqgG/3uswaHof62tXpqD9JwnNXGRWvezhhAHPdQJrdmJr9BtADpI/5v0\r\n7BTyI9ts16TKrwYEJ+PSw24MvLrLHQbEGp1Hv9ITSpp4dU1nl0A+MdtEqKX+\r\nMatByzLrKZcSqrU7/9joEdns4ifiyk2yhOpS49D+JcBQXlvarM+arxNNGRkI\r\nQRagxcZysW6AXtdn5UKPUwenEOFdch6EN/w2irkn/Y3qtWrd81116qwNs7VC\r\n/gIQUG4AQVDbCe/IVc50vqXN5JN0oBYokEVnaoxvNyg9O1gDu+YB4lxmsVJb\r\nQyoaK82PeJpYHKibNZj9g7mco30nZvhYI8moyA+UXPnRLmpVIvo4B0GpH+Kg\r\nog7LBCxD/WGXRw4BINPHqEQ9Z1PldV0EoRAaGNb1zK7kY0w4ibLdHHX9gvf0\r\nBCg6P9L9i2yZpvTR4j0lsrlIUVUkxAxbAHE=\r\n=Lqeg\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:b10c5bb5d7fbcae84e49b19c4308c907bbe0757aca79283c8d19a70442010495