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.123.1 | runtime |
@0xflair/react-commonEnvironment{
"local_name": "@0xflair/react-common",
"alias": false,
"peer_metadata": null
} | ^0.123.1 | 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-U9wfvJBkw4ZZUcDvbCQu0KNxw9mAdRDCPWvhAsr16rnGIh8yEEtZqHWVn1atrDGFg49GfNh58f/i8k1j2xhCpg==",
"shasum": "c33e449af5d157100f7bf3e601dad66aa2eae420",
"tarball": "https://registry.npmjs.org/@0xflair/react-openzeppelin/-/react-openzeppelin-0.123.1.tgz",
"fileCount": 8,
"unpackedSize": 153410,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQDmkoH/KGkDnje3WSrZ2vCr9lFPz/eaL7o2DQQCqWyDmwIhAJ8sSYHAi94PjxytjPonG/3E1HgTAaOoKgxCQA8jDCQV"
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjb9NOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmok8w/9EHwu0QsIUtllmeomenFE8USwcG0+N3a578OKyqrTCxkbTq29\r\n2OcnwjD953OcUNOHxYa8Kksjds3S7KxYILG1457qvwPmN+tgOG9iFPsiXpdQ\r\nd/KhmB14H4lN6xR3xFMaTkIac+h0IWlDMrst4EheZ55T+riZPykdzstkoQGV\r\n6Yz3QTxQRmaikDfoWhNhou753hy2LZSw1X9DQPGEmH741fMGi7LTiK8Gqc5d\r\n3qHQYgn6Xwerutyy1Adbz3m0Ts4K2hyBKH3puMpCHfg6mzWu6tv91uc+ues/\r\n38bA0DsFVB+sNUHBJTVARWBbr+QC+2EQtMQWx+Lzz4f4IPhL3np2UziXDdL4\r\n2VSfhKl5hHWBeuk+u5Hf20YhOUaWo8VbkfQLoTrj2CsoituAV+bA7DuHniWH\r\n1pKWqclf0h1y0bhNFlKuOgV8JiKThAZwrRmLof/ho0OlPAJCGvOjqwa3GPf7\r\nGuZS1o9SJFue/+Z/WU96MZinKReaWUN9gSuEIiUL99lJbr7DdYIeEpSnOYju\r\nil8MNRfR6tWTo4i38FKTRjBo3fzsJB88dczaOIzmBjDOZjyHADluDMszw0d+\r\n3MuWL5kQM6okIiiNNg6iqRxRMkPJ/QhOlE7gy6MlSzWNZeJ8J8QWNBHPAeIb\r\ndZfszflBm+Q9kXTYiZ/XZKHhlLRGsn5N7/I=\r\n=VPtu\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:650b75e10ba7239cd1708457548f44ed80c1189cb2b9bc43e78fdb7aaedaf3ba