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.121.0 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.121.0 | runtime |
@wagmi/coreEnvironment{
"local_name": "@wagmi/core",
"alias": false,
"peer_metadata": null
} | ^0.2.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": {
"optional": true
}
} | * | peer |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": {
"optional": true
}
} | * | peer |
@wagmi/coreEnvironment{
"local_name": "@wagmi/core",
"alias": false,
"peer_metadata": {
"optional": true
}
} | * | peer |
ethersEnvironment{
"local_name": "ethers",
"alias": false,
"peer_metadata": {
"optional": true
}
} | * | peer |
reactEnvironment{
"local_name": "react",
"alias": false,
"peer_metadata": {
"optional": true
}
} | ^16 || ^17 || ^18 | peer |
react-domEnvironment{
"local_name": "react-dom",
"alias": false,
"peer_metadata": {
"optional": true
}
} | ^16 || ^17 || ^18 | peer |
react-queryEnvironment{
"local_name": "react-query",
"alias": false,
"peer_metadata": {
"optional": true
}
} | * | peer |
wagmiEnvironment{
"local_name": "wagmi",
"alias": false,
"peer_metadata": {
"optional": true
}
} | * | peer |
Source distribution
{
"integrity": "sha512-TuPJXpS2cSXx9oXvKg1h6e3ja82RLu4DTPHu5xEJG/LwtcsYZH4NXqJhJikbxq/Fb7VjfpwxzZsTS6tygLQyTQ==",
"shasum": "cf6d79193c9600b50dd8e3a98db787017e1623c7",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.121.0.tgz",
"fileCount": 8,
"unpackedSize": 153410,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIBdN/3aIHSVkaZFP6ZL8hhA1atgpiwkmlOm2hIvpI/5ZAiA2iarOfYTS6WJB1N+JIbwZWKeyIKSon5vyZlqPoIS/6w=="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUZzNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqogBAAo4K7yjQoLGw+PmdPnhMlp3fupzM0HLQHriDdlbDSFvpON+lo\r\nzt5Adh4DG2qx5m0U5ICo0blTmlXfH7OASwPPBlnpra0H5eTfWGPXrtbXXbl5\r\nJ37YFcHPkPAlYrOH3sWOgKqaUP6Z05ldsIY94DJe1sgkuJUgfeuRk0LExX6x\r\nR6tNtX9cdW3yBcnIToryeTQ8yXZbeOLxyjhEHPfrqXZu/HxZCxqBivq172LS\r\nlLl9kQkcCAIzuiNl/0QzQ26QHk3FmT6LHhuDcdd1XVR/hsOYuMbeUzisA7O0\r\nbfhpM3DBRCJgXh69hIct6q8MhnG1qAG8QkhUjiqS/u97J/a7AP7Mu3RGUsWg\r\n0SyEn+JS4wWeeUAQY4ni+nQlIgXDKx9ATAHNy5t7ocganwyJO/rmb+83ks0g\r\n48sApF21OQhQijlbXVU00l6ean4o5IeePlUoTKh4DYI9NoCb0r9U99+OT341\r\nky5hyoHOuvGvx7tNPoXqj5B0AVByFyT3ekJE0JxyxNcxicqZ1OPU16/Ay3rT\r\n/7C9n5MIiKwKU/iaaBl5q6SOl0Trk1HP4m7dtRSu1WabWThy7f2iWOXEwP57\r\n9jfchJzc4BVR+QkKSuiGCM1mMLNAUx1kPcuFXTRYA4Dpv+LFRNkK6nrY9aQ9\r\nSwTOYcrmZbGgBHbc0hQxpfhci0mg2ejk2U4=\r\n=CgmG\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:0aeb4f1fcb7582ef4d8cc36df33251770f3a85a3e26f7a6a5eb2e6fa0c1fa225