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.87.4 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.87.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-JzG7MRcuHO+/8EWsa+DqoaOmhauHjKUWyRvN7/X/rlaUuS0KlG7dlpD7gltZRERn+lvWTd5uN/kFjD42Ube8gQ==",
"shasum": "363e2d802b7c9c8052d7c0b3eaeb6fb51a60f21d",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.87.4.tgz",
"fileCount": 8,
"unpackedSize": 136145,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIBrmTRGB39mZPT9miY2UJhJaJQQoEa4w2RL6EllNNyc+AiEAkVUifeg6g0ldI2WOn2IKA9SBEGJQTl5R/F+mHfX/HYU="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5F1nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVEBAAh2zWsjWOhihYlvwv6rXSReAMAi4PjbLefH62vkGtWimUI1LQ\r\nSFfSTkJYV13jISyjo9uHmC2FSG64jH/5W9QxpMsvakycCLSUazX8VaEbnG8T\r\nA/Z2zH2xGfbQlP/4VRHpNCHXmhakHpEfQFDWT3w1GgdwE+3fvM/K5ZUC/mDA\r\nbILtjWuXw0c4Ouv+QmW0rUSXRlVLR8QWRv61LRB0V2TIWAoXS8EYn+jFwJDV\r\nrjryysr0v0mJm2eETI+NjTB5uJqg5zRMtSzSr6ByPoQbJ7cJio36vfAI2iQm\r\njQhEM0ZvjiM46PbhPgeMqxiCBOZLgkITsysamgxoDq3CTET+3+uWxJBUvvS0\r\n/BPHRMsg+q8YZP1nob69IYjn0xLH/DPE9BMBagbFbsnFNTY1YWEHGlsE0tDj\r\nKccUnrE8onztGocsFoODugrRAB3qBQM65H3OWev4bcp5dqxJ0Q1ebSD5EzK+\r\nhhXstVCnyvZGNKt0EuEJOVYLyh3nL05O9iOrFzZRaFMobM4146d4ZqBvo3lW\r\nryaAJuqf13UyG80LIG1sUzrhNFCfYLWfZTfvU5G4g/Ea+DClJvYwZiCdQl41\r\nLvAezlHcCy51Jtgh28MTuTUxoetq+9o+ced4HebHf7TGNyIQ31BUA+pKxPIF\r\nkNVrzqli/JkIyhhiftPkbCOEUxeLYfqo5eQ=\r\n=Igxe\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:d61e87fd375d8a473b3ce0bdcee7c14435fa7c117f4a24e7f7f3e720f6116221