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.97.5 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.97.5 | 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-On2lxQ7FDip0tIkuyUVtUJAFrjGiKT1yfbTcaJOb37KO/FaTWl4NdpcRMfAVOLojNiPmPJajm9cDjUaRPfNChg==",
"shasum": "7b7775a7ac89c6f4eaa9c62926dbcb947c1fb028",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.97.5.tgz",
"fileCount": 8,
"unpackedSize": 159276,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQDhvAkElIskNb48y91gNhFsQflt+gfa+ExblcJdsIkI3gIgLnu6RbmyY9vnFJlnssicaQmsA50DYFHnn5jqjw8tFXc="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8m3tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMBg/9Ehu51widA79WS0k2dsfnFfPXUOjZ+HcQ+aN02Emq4k/H2+kd\r\nxHp7LvSerd7x3P+7FxJHFiN+lD46jT73pZe7t8Fjom94KP+PVrc/9iJenOpw\r\nbk2mLLl2odrBF0LFS9TLyt9LRTSRN9C3UgRFXB6Q20JASDT+do/FtJYGDDF5\r\nWLFReiCnyYwo7UAAlTDF0mnb30B5tCbMXQ4Ui5DKpX1HdpHBhC8Hp4Woi4bF\r\ny0++4jmLidDW5lo71GxBCP0av3AiOa1LjDoyFZWj0YbUGsNS03gtfILRn3MB\r\n5ijOXmwkAGgHJ8giMYHtnbWq1FTH6A496vITQBsiYmMdjtQw8mE4MumYaT1r\r\nQy2ajJtKZiMUFR0KY6VrkTTiUuxsK84dpYB+G+h4l8+7GLqZexywrmwr7JOY\r\nW9r5524qjQyakI0EOknqYL+/RfXTqyXHKy3z44jESakhN41yvLrQYXZcqP2f\r\noncD4tLAPeX8YHtBC7fbZeYNYBqj7Corb6Wqp/CbtBDAfTAbyrJcd3F1ntNT\r\nGaScAtyMTZjt9Ou+RXeMwUm2Vk4CfvPZUMtw6JbGmiRc/2VWnUkhIOR6pvXk\r\nPESlAu3RGp3cDqw9vjE0lke0jAt7teH1ycACVJWA5o0LiZXr95fHkZWiZ/fA\r\nU0V5iCBB6xHNyQOuq6xGlFB9aPJyYBu3fmA=\r\n=8rNM\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:bbd36591af0cba64ab8063b792d5c4285441adfa9a3b22a58e6bfdbd0df251a2