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.107.3 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.107.3 | 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-rD3odcOL87Eb1979TpY9Ie/ReNs7VxrJTVIe00ovfS+Z6uFSQLpaNbjs6+iliFbBlS59auKPMu1RQTgiEzFCRg==",
"shasum": "8d2092106209d6419eb625d2f49b54af95858757",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.107.3.tgz",
"fileCount": 8,
"unpackedSize": 160404,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQCONpnYFOXpZTHzUBRhfFAuJYrtqiszEb2ITH8LDB2sZAIhALaekXH8jXY/KQfQDQYvhcznI4R178f+QFMc2coxxxTP"
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBUTqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpj3BAAgOkG5fZhuq8cgOhq7pkfRGhI/MTWaV/gaCDGGb5RXz7eotY7\r\n4mG0TkOn/wvJPzeULlg8L849IcNxsepf8wf1G9Bxpas1/48HIYHJNGhQXxh4\r\nuqArHt2ceX2jPSQDj82r2OcqrboP2tdJ4ISTYhT3nKYMQmK9ajM1RR4Ckcgj\r\nKA6a56EFkiJhQUVx/kxD5PHjVl6Sn+Kn3iiPe4IT7KElaqmRLcEBLhet5qy6\r\nWZ4m1PjjVw+0ofcJgHvVDDKmdfktiD76Pp9C7fAXLogo9qZju9gv7HErq+TQ\r\nRsP3D4rBytj19iHKHwhornLbUNatcrj5Cs7o6qDfp4L9CtpVR5wFYng0tpuT\r\n7urcGspmu3F7WWTvnWpOAlT3CBAhQslrxOPqCfYjSYJ6L6x3aUyXsNumbDNn\r\nhejoICslLHAivUbJDfawIrZKcOfIbwtMDFeK55hzwhkzI2CCz1i1jTVFYrCl\r\n2FFL7vyolQL+BzMjROT7KZcj7F91YWeiGEVGWHYGsVLv9yu8NDpzybl+gfo8\r\nQpPUrVh8GbBkstkUpO8EjvK5woHTTplrj4S21W3+EuMZINbN+vyu8ub20oH0\r\nbye609/lo1/MbiZYx/wv+FlUgncfWvYcAZspl0wS45d392ejt9/dhLuBlUwN\r\n9dzL5FXB5sr/t1dbPjHkEwN5yHN+en2Qvm8=\r\n=JLrF\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:6d8b2d1582f51260f2ab29903e4fffc540ec757777d58e46930f44f0a5bbebb8