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.4 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.61.4 | 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-iguLwHW9U5kB1NrrUfQ71ATegwnXaVzpxl3pxwB+Keh8UpNPw5VlLBy3FIdOvuy/SpE6X/LCZAqE5Xh4AFe5AQ==",
"shasum": "489fe689cdd9ad52ba098491283a364061a103d6",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.61.4.tgz",
"fileCount": 8,
"unpackedSize": 135666,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQCYwg9qKBYFP0muLFDn2PrvcEQMmFe7M/gxgpbT6J1/fQIgKtXpkcSAyntTgIvfh1yHiqQWfjhSEMXn+awgAeNK3j8="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisiSMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeWw/+IAwvBS92L4ugmIMj4OBTioZpb0tols424VOtc5XtUGd9PbMQ\r\n3VHj07A811HiuyDxzVSqy0UKjIGys8ECnAOWBcIDiRG7BtdL5Y3RxeUcWG7f\r\ndkwSnU2Yl0yeXHeyEfNluMuewx3cywT9506VfhhOXNJUvUfTJhnn3InlMqCi\r\nPzwgZCsmpdrBcgLkU+exkaH8r0gdZ6LrElWbJkVPi59mULfFTY+ZMtxVAFc0\r\nnKCRjtTAh3YYpLjI1AUzjKhH1JHTd9B79n7zckwgJqFSYbh7VwVofvBjWRXt\r\nsm6q4YBp8sJQjPiIH5b4w0ql/tDm+4Qq95k2OMUW4/7mHZj3VxWf5Mv7mDw+\r\nGyW1K1zvqug/0CS0LqAXynJ4zu9+aN8nXD9zcWKt5p1YI68wjmbXUGhUqV2y\r\nqNLnPUXaMZXzyIz02uVTtrBMPfmMIeBNRZBHXAUffihqpKalodfRjIKqoY7h\r\nD35hWhXYoN/s0P7pWrYIqcsNYpbCt22sO16JkmxfkYIPDs02dQgnfdKYqBuS\r\nGhlN+3Y3K8XrMSe8UFWFYETs19g6sTJQdmu6a0PWB2NQYc2v+XrfNgtAMLYe\r\nK3KDjsRKZ/t4EVPthm4H6L41LW7HgN6znTtNi8pgPuWFoBy6RjFMzjfN0wOl\r\n8b+V552yVX1dEbtWZBzykGrSXcIBIRScjQg=\r\n=KI/Y\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:3c0b4fb37cebefc46586286ebd4a71bf06da825ffcb032f851262e3570c1f619