diff --git a/packages/foundry/contracts/Hats/HatsModule.sol b/packages/foundry/contracts/Hats/HatsModule.sol new file mode 100644 index 0000000..e69de29 diff --git a/packages/foundry/contracts/Hats/HatsModuleFactory.sol b/packages/foundry/contracts/Hats/HatsModuleFactory.sol new file mode 100644 index 0000000..e69de29 diff --git a/packages/foundry/contracts/Hats/MultiClaimsHatter.sol b/packages/foundry/contracts/Hats/MultiClaimsHatter.sol new file mode 100644 index 0000000..2ede44c --- /dev/null +++ b/packages/foundry/contracts/Hats/MultiClaimsHatter.sol @@ -0,0 +1,455 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +// import { console2 } from "forge-std/Test.sol"; // remove before deploy +import {HatsModule} from "hats-module/HatsModule.sol"; +import {HatsModuleFactory} from "hats-module/HatsModuleFactory.sol"; + +/*////////////////////////////////////////////////////////////// + CUSTOM ERRORS + //////////////////////////////////////////////////////////////*/ + +/// @notice Thrown if the given array parameters are not of equal length +error MultiClaimsHatter_ArrayLengthMismatch(); +/// @notice Thrown if the calling account is not an admin of the hat +error MultiClaimsHatter_NotAdminOfHat(address account, uint256 hatId); +/// @notice Thrown if the account is not explicitly eligible for the hat +error MultiClaimsHatter_NotExplicitlyEligible(address account, uint256 hatId); +/// @notice Thrown if the hat is not claimable +error MultiClaimsHatter_HatNotClaimable(uint256 hatId); +/// @notice Thrown if the hat is not claimable on behalf of accounts +error MultiClaimsHatter_HatNotClaimableFor(uint256 hatId); + +contract MultiClaimsHatter is HatsModule { + /*////////////////////////////////////////////////////////////// + EVENTS + //////////////////////////////////////////////////////////////*/ + + /// @notice Emitted when the claimability of multiple hats was edited + event HatsClaimabilitySet(uint256[] hatIds, ClaimType[] claimTypes); + /// @notice Emitted when the calimability of a hat was edited + event HatClaimabilitySet(uint256 hatId, ClaimType claimType); + + /*////////////////////////////////////////////////////////////// + DATA MODELS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Hats claimability types. + * @param NotClaimable The hat is not claimable + * @param Claimable The hat is only claimable by the account that will be the hat's wearer + * @param ClaimableFor The hat is claimable on behalf of accounts (and also by the wearer) + */ + enum ClaimType { + NotClaimable, + Claimable, + ClaimableFor + } + + /*////////////////////////////////////////////////////////////// + CONSTANTS + //////////////////////////////////////////////////////////////*/ + + /** + * This contract is a clone with immutable args, which means that it is deployed with a set of + * immutable storage variables (ie constants). Accessing these constants is cheaper than accessing + * regular storage variables (such as those set on initialization of a typical EIP-1167 clone), + * but requires a slightly different approach since they are read from calldata instead of storage. + * + * Below is a table of constants and their location. + * + * For more, see here: https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args + * + * ----------------------------------------------------------------------+ + * CLONE IMMUTABLE "STORAGE" | + * ----------------------------------------------------------------------| + * Offset | Constant | Type | Length | Source | + * ----------------------------------------------------------------------| + * 0 | IMPLEMENTATION | address | 20 | HatsModule | + * 20 | HATS | address | 20 | HatsModule | + * 40 | hatId | uint256 | 32 | HatsModule | + * ----------------------------------------------------------------------+ + */ + + /*////////////////////////////////////////////////////////////// + MUTABLE STATE + //////////////////////////////////////////////////////////////*/ + + /// @notice Maps between hats and their claimability type + mapping(uint256 hatId => ClaimType claimType) public hatToClaimType; + + /*////////////////////////////////////////////////////////////// + CONSTRUCTOR + //////////////////////////////////////////////////////////////*/ + + /// @notice Deploy the implementation contract and set its version + /// @dev This is only used to deploy the implementation contract, and should not be used to deploy clones + constructor(string memory _version) HatsModule(_version) {} + + /*////////////////////////////////////////////////////////////// + INITIALIZOR + //////////////////////////////////////////////////////////////*/ + + /// @inheritdoc HatsModule + function _setUp(bytes calldata _initData) internal override { + if (_initData.length == 0) return; + + // decode init data + (uint256[] memory _hatIds, ClaimType[] memory _claimTypes) = abi.decode( + _initData, + (uint256[], ClaimType[]) + ); + _setHatsClaimabilityMemory(_hatIds, _claimTypes); + } + + /*////////////////////////////////////////////////////////////// + ADMIN FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Change the claimability status of a hat. The caller should be an admin of the hat. + * @param _hatId The ID of the hat to set claimability for + * @param _claimType New claimability type for the hat + */ + function setHatClaimability(uint256 _hatId, ClaimType _claimType) public { + if (!HATS().isAdminOfHat(msg.sender, _hatId)) + revert MultiClaimsHatter_NotAdminOfHat(msg.sender, _hatId); + + hatToClaimType[_hatId] = _claimType; + + emit HatClaimabilitySet(_hatId, _claimType); + } + + /** + * @notice Change the claimability status of multiple hats. The caller should be an admin of the hats. + * @param _hatIds The ID of the hat to set claimability for + * @param _claimTypes New claimability types for each hat + */ + function setHatsClaimability( + uint256[] calldata _hatIds, + ClaimType[] calldata _claimTypes + ) public { + uint256 length = _hatIds.length; + if (_claimTypes.length != length) { + revert MultiClaimsHatter_ArrayLengthMismatch(); + } + + uint256 hatId; + for (uint256 i; i < length; ) { + hatId = _hatIds[i]; + if (!HATS().isAdminOfHat(msg.sender, hatId)) + revert MultiClaimsHatter_NotAdminOfHat(msg.sender, hatId); + hatToClaimType[hatId] = _claimTypes[i]; + unchecked { + ++i; + } + } + + emit HatsClaimabilitySet(_hatIds, _claimTypes); + } + + /** + * @notice Wrapper around a HatsModuleFactory. Deploys a new HatsModule instance and sets a hat's claimability type. + * @param _factory The HatsModuleFactory instance that will deploy the module + * @param _implementation The address of the implementation contract of which to deploy a clone + * @param _moduleHatId The hat for which to deploy a HatsModule. + * @param _otherImmutableArgs Other immutable args to pass to the clone as immutable storage. + * @param _initData The encoded data to pass to the `setUp` function of the new HatsModule instance. Leave empty if no + * @param _hatId The ID of the hat to set claimability for + * @param _claimType New claimability type for the hat + * @return _instance The address of the deployed HatsModule instance + */ + function setHatClaimabilityAndCreateModule( + HatsModuleFactory _factory, + address _implementation, + uint256 _moduleHatId, + bytes calldata _otherImmutableArgs, + bytes calldata _initData, + uint256 _hatId, + ClaimType _claimType + ) public returns (address _instance) { + if (!HATS().isAdminOfHat(msg.sender, _hatId)) + revert MultiClaimsHatter_NotAdminOfHat(msg.sender, _hatId); + + hatToClaimType[_hatId] = _claimType; + + _instance = _factory.createHatsModule( + _implementation, + _moduleHatId, + _otherImmutableArgs, + _initData + ); + + emit HatClaimabilitySet(_hatId, _claimType); + } + + /** + * @notice Wrapper around a HatsModuleFactory. Deploys new HatsModule instances and sets the claimability type of + * multiple hats. + * @param _factory The HatsModuleFactory instance that will deploy the modules + * @param _implementations The addresses of the implementation contracts of which to deploy a clone + * @param _moduleHatIds The hats for which to deploy a HatsModule. + * @param _otherImmutableArgsArray Other immutable args to pass to the clones as immutable storage. + * @param _initDataArray The encoded data to pass to the `setUp` functions of the new HatsModule instances. Leave + * @param _hatIds The IDs of the hats to set claimability for + * @param _claimTypes New claimability types for each hat + * @return success True if all modules were successfully created and the claimability types were set + */ + function setHatsClaimabilityAndCreateModules( + HatsModuleFactory _factory, + address[] calldata _implementations, + uint256[] calldata _moduleHatIds, + bytes[] calldata _otherImmutableArgsArray, + bytes[] calldata _initDataArray, + uint256[] memory _hatIds, + ClaimType[] memory _claimTypes + ) public returns (bool success) { + uint256 length = _hatIds.length; + if (_claimTypes.length != length) { + revert MultiClaimsHatter_ArrayLengthMismatch(); + } + + uint256 hatId; + for (uint256 i; i < length; ) { + hatId = _hatIds[i]; + if (!HATS().isAdminOfHat(msg.sender, hatId)) + revert MultiClaimsHatter_NotAdminOfHat(msg.sender, hatId); + hatToClaimType[hatId] = _claimTypes[i]; + unchecked { + ++i; + } + } + + success = _factory.batchCreateHatsModule( + _implementations, + _moduleHatIds, + _otherImmutableArgsArray, + _initDataArray + ); + + emit HatsClaimabilitySet(_hatIds, _claimTypes); + } + + /*////////////////////////////////////////////////////////////// + CLAIMING FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Claim a hat. + * @dev This contract must be wearing an admin hat of the hat to claim or else it will revert + * @param _hatId The ID of the hat to claim + */ + function claimHat(uint256 _hatId) public { + if (hatToClaimType[_hatId] == ClaimType.NotClaimable) { + revert MultiClaimsHatter_HatNotClaimable(_hatId); + } + + _mint(_hatId, msg.sender); + } + + /** + * @notice Claim multiple hats. + * @dev This contract must be wearing an admin hat of the hats to claim or else it will revert + * @param _hatIds The IDs of the hats to claim + */ + function claimHats(uint256[] calldata _hatIds) public { + uint256 hatId; + for (uint256 i; i < _hatIds.length; ) { + hatId = _hatIds[i]; + if (hatToClaimType[hatId] == ClaimType.NotClaimable) { + revert MultiClaimsHatter_HatNotClaimable(hatId); + } + + _mint(hatId, msg.sender); + + unchecked { + ++i; + } + } + } + + /** + * @notice Claim a hat on behalf of an account + * @dev This contract must be wearing an admin hat of the hat to claim or else it will revert + * @param _hatId The ID of the hat to claim for + * @param _account The account for which to claim + */ + function claimHatFor(uint256 _hatId, address _account) public { + if (hatToClaimType[_hatId] != ClaimType.ClaimableFor) { + revert MultiClaimsHatter_HatNotClaimableFor(_hatId); + } + + _mint(_hatId, _account); + } + + /** + * @notice Claim multiple hats on behalf of accounts + * @dev This contract must be wearing an admin hat of the hats to claim or else it will revert + * @param _hatIds The IDs of the hats to claim for + * @param _accounts The accounts for which to claim + */ + function claimHatsFor( + uint256[] calldata _hatIds, + address[] calldata _accounts + ) public { + if (_hatIds.length != _accounts.length) { + revert MultiClaimsHatter_ArrayLengthMismatch(); + } + + uint256 hatId; + for (uint256 i; i < _hatIds.length; ) { + hatId = _hatIds[i]; + if (hatToClaimType[hatId] != ClaimType.ClaimableFor) { + revert MultiClaimsHatter_HatNotClaimableFor(hatId); + } + + _mint(hatId, _accounts[i]); + + unchecked { + ++i; + } + } + } + + /*////////////////////////////////////////////////////////////// + VIEW FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Checks if a hat is claimable on behalf of an account + * @param _account The account to claim for + * @param _hatId The hat to claim + */ + function canClaimForAccount( + address _account, + uint256 _hatId + ) public view returns (bool) { + return (isClaimableFor(_hatId) && + _isExplicitlyEligible(_hatId, _account)); + } + + /** + * @notice Checks if an account can claim a hat. + * @param _account The claiming account + * @param _hatId The hat to claim + */ + function accountCanClaim( + address _account, + uint256 _hatId + ) public view returns (bool) { + return (isClaimableBy(_hatId) && + _isExplicitlyEligible(_hatId, _account)); + } + + /** + * @notice Checks if a hat is claimable + * @param _hatId The ID of the hat + */ + function isClaimableBy(uint256 _hatId) public view returns (bool) { + return (hatExists(_hatId) && + wearsAdmin(_hatId) && + hatToClaimType[_hatId] > ClaimType.NotClaimable); + } + + /** + * @notice Checks if a hat is claimable on behalf of accounts + * @param _hatId The ID of the hat + */ + function isClaimableFor(uint256 _hatId) public view returns (bool) { + return (hatExists(_hatId) && + wearsAdmin(_hatId) && + hatToClaimType[_hatId] == ClaimType.ClaimableFor); + } + + /** + * @notice Check if this contract is an admin of a hat. + * @param _hatId The ID of the hat + */ + function wearsAdmin(uint256 _hatId) public view returns (bool) { + return HATS().isAdminOfHat(address(this), _hatId); + } + + /// @notice Checks if a hat exists + function hatExists(uint256 _hatId) public view returns (bool) { + return HATS().getHatMaxSupply(_hatId) > 0; + } + + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + function _mint(uint256 _hatId, address _account) internal { + // revert if _wearer is not explicitly eligible + if (!_isExplicitlyEligible(_hatId, _account)) + revert MultiClaimsHatter_NotExplicitlyEligible(_account, _hatId); + // mint the hat to _wearer if eligible. This contract can mint as long as its the hat's admin. + HATS().mintHat(_hatId, _account); + } + + function _isExplicitlyEligible( + uint256 _hatId, + address _account + ) internal view returns (bool eligible) { + // get the hat's eligibility module address + address eligibility = HATS().getHatEligibilityModule(_hatId); + // get _wearer's eligibility status from the eligibility module + bool standing; + (bool success, bytes memory returndata) = eligibility.staticcall( + abi.encodeWithSignature( + "getWearerStatus(address,uint256)", + _account, + _hatId + ) + ); + + /* + * if function call succeeds with data of length == 64, then we know the contract exists + * and has the getWearerStatus function (which returns two words). + * But — since function selectors don't include return types — we still can't assume that the return data is two + booleans, + * so we treat it as a uint so it will always safely decode without throwing. + */ + if (success && returndata.length == 64) { + // check the returndata manually + (uint256 firstWord, uint256 secondWord) = abi.decode( + returndata, + (uint256, uint256) + ); + // returndata is valid + if (firstWord < 2 && secondWord < 2) { + standing = (secondWord == 1) ? true : false; + // never eligible if in bad standing + eligible = (standing && firstWord == 1) ? true : false; + } + // returndata is invalid + else { + // false since _wearer is not explicitly eligible + eligible = false; + } + } else { + // false since _wearer is not explicitly eligible + eligible = false; + } + } + + function _setHatsClaimabilityMemory( + uint256[] memory _hatIds, + ClaimType[] memory _claimTypes + ) internal { + uint256 length = _hatIds.length; + if (_claimTypes.length != length) { + revert MultiClaimsHatter_ArrayLengthMismatch(); + } + + uint256 hatId; + for (uint256 i; i < length; ) { + hatId = _hatIds[i]; + hatToClaimType[hatId] = _claimTypes[i]; + unchecked { + ++i; + } + } + + emit HatsClaimabilitySet(_hatIds, _claimTypes); + } +} diff --git a/packages/foundry/script/DeployDemo.s.sol b/packages/foundry/script/DeployDemo.s.sol index 776ef5a..83c5f85 100644 --- a/packages/foundry/script/DeployDemo.s.sol +++ b/packages/foundry/script/DeployDemo.s.sol @@ -42,26 +42,28 @@ contract DeployDemoScript is ScaffoldETHDeploy { batchMint(instance); - // Hats hatsInstance = new Hats("Hats", "ipfs"); - - // uint256 topHatId = hatsInstance.mintTopHat( - // 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, - // "", - // "" - // ); - - // uint256 newHatId = hatsInstance.createHat( - // topHatId, - // "Details...", - // 100, - // 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, - // 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, - // true, - // "" - // ); - - // console.log(topHatId); - // console.log(newHatId); + Hats hatsInstance = new Hats("Hats", "ipfs"); + + console.log(deployerPubKey); + + uint256 topHatId = hatsInstance.mintTopHat( + deployerPubKey, + "The details", + "ipfs://" + ); + console.log(topHatId); + + uint256 newHatId = hatsInstance.createHat( + topHatId, + "Details...", + 100, + deployerPubKey, + deployerPubKey, + true, + "ipfs..." + ); + + console.log(newHatId); vm.stopBroadcast(); } diff --git a/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx b/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx index 769d098..84c6895 100644 --- a/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx +++ b/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx @@ -28,6 +28,8 @@ import { buildTokenGroupCard, } from "~~/components/rep-tokens/utils/buildTokensCard"; import { Address } from "~~/components/scaffold-eth"; +import { useScaffoldContractRead, useScaffoldContractWrite } from "~~/hooks/scaffold-eth"; +import { loadBurnerSK } from "~~/hooks/scaffold-eth"; export function RepTokensDemo() { ////// @@ -125,9 +127,56 @@ export function RepTokensDemo() { maxMintAmountConfigProps, ); + // 26959946667150639794667015087019630673637144422540572481103610249216 + // 26960358043289970096177553829315270011263390106506980876069447401472 + + console.log(loadBurnerSK()); + + // const { data: isAdminOfHat } = useScaffoldContractRead({ + // contractName: "Hats", + // functionName: "isAdminOfHat", + // args: [address, BigInt("26959946667150639794667015087019630673637144422540572481103610249216")], + // }); + + // const { data: balanceOfHat } = useScaffoldContractRead({ + // contractName: "Hats", + // functionName: "balanceOf", + // args: [address, BigInt("26959946667150639794667015087019630673637144422540572481103610249216")], + // }); + + const { data: viewHat } = useScaffoldContractRead({ + contractName: "Hats", + functionName: "viewHat", + args: [BigInt("26959946667150639794667015087019630673637144422540572481103610249216")], + }); + + const { data: isEligible } = useScaffoldContractRead({ + contractName: "Hats", + functionName: "isEligible", + args: [address, BigInt("26959946667150639794667015087019630673637144422540572481103610249216")], + }); + + const { writeAsync: claimHat } = useScaffoldContractWrite({ + contractName: "Hats", + functionName: "mintHat", + args: [BigInt("26959946667150639794667015087019630673637144422540572481103610249216"), address], + }); + + console.log(isEligible); + + console.log(viewHat); + return ( <>
+ +

Widget

diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index c6845b2..8a768b1 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { 31337: { ReputationTokensStandalone: { - address: "0xD8a5a9b31c3C0232E196d518E89Fd8bF83AcAd43", + address: "0x70e0bA845a1A0F2DA3359C97E0285013525FFC49", abi: [ { type: "constructor", @@ -1648,6 +1648,1967 @@ const deployedContracts = { uri: "lib/reputation/contracts/ReputationTokensBase.sol", }, }, + Hats: { + address: "0xc351628EB244ec633d5f21fBD6621e1a683B1181", + abi: [ + { + type: "constructor", + inputs: [ + { + name: "_name", + type: "string", + internalType: "string", + }, + { + name: "_baseImageURI", + type: "string", + internalType: "string", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "approveLinkTopHatToTree", + inputs: [ + { + name: "_topHatDomain", + type: "uint32", + internalType: "uint32", + }, + { + name: "_newAdminHat", + type: "uint256", + internalType: "uint256", + }, + { + name: "_eligibility", + type: "address", + internalType: "address", + }, + { + name: "_toggle", + type: "address", + internalType: "address", + }, + { + name: "_details", + type: "string", + internalType: "string", + }, + { + name: "_imageURI", + type: "string", + internalType: "string", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "badStandings", + inputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "_wearer", + type: "address", + internalType: "address", + }, + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "balanceOfBatch", + inputs: [ + { + name: "_wearers", + type: "address[]", + internalType: "address[]", + }, + { + name: "_hatIds", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + outputs: [ + { + name: "balances", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "baseImageURI", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "batchCreateHats", + inputs: [ + { + name: "_admins", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "_details", + type: "string[]", + internalType: "string[]", + }, + { + name: "_maxSupplies", + type: "uint32[]", + internalType: "uint32[]", + }, + { + name: "_eligibilityModules", + type: "address[]", + internalType: "address[]", + }, + { + name: "_toggleModules", + type: "address[]", + internalType: "address[]", + }, + { + name: "_mutables", + type: "bool[]", + internalType: "bool[]", + }, + { + name: "_imageURIs", + type: "string[]", + internalType: "string[]", + }, + ], + outputs: [ + { + name: "success", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "batchMintHats", + inputs: [ + { + name: "_hatIds", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "_wearers", + type: "address[]", + internalType: "address[]", + }, + ], + outputs: [ + { + name: "success", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "buildHatId", + inputs: [ + { + name: "_admin", + type: "uint256", + internalType: "uint256", + }, + { + name: "_newHat", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "changeHatDetails", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_newDetails", + type: "string", + internalType: "string", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "changeHatEligibility", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_newEligibility", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "changeHatImageURI", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_newImageURI", + type: "string", + internalType: "string", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "changeHatMaxSupply", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_newMaxSupply", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "changeHatToggle", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_newToggle", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "checkHatStatus", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "toggled", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "checkHatWearerStatus", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_wearer", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "updated", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "createHat", + inputs: [ + { + name: "_admin", + type: "uint256", + internalType: "uint256", + }, + { + name: "_details", + type: "string", + internalType: "string", + }, + { + name: "_maxSupply", + type: "uint32", + internalType: "uint32", + }, + { + name: "_eligibility", + type: "address", + internalType: "address", + }, + { + name: "_toggle", + type: "address", + internalType: "address", + }, + { + name: "_mutable", + type: "bool", + internalType: "bool", + }, + { + name: "_imageURI", + type: "string", + internalType: "string", + }, + ], + outputs: [ + { + name: "newHatId", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getAdminAtLevel", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_level", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "admin", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getAdminAtLocalLevel", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_level", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "admin", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getHatEligibilityModule", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "eligibility", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getHatLevel", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "level", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getHatMaxSupply", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "maxSupply", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getHatToggleModule", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "toggle", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getImageURIForHat", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "_uri", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getLocalHatLevel", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "level", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getNextId", + inputs: [ + { + name: "_admin", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "nextId", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getTippyTopHatDomain", + inputs: [ + { + name: "_topHatDomain", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "domain", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getTopHatDomain", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "domain", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "hatSupply", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "supply", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isActive", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "active", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isAdminOfHat", + inputs: [ + { + name: "_user", + type: "address", + internalType: "address", + }, + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "isAdmin", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isApprovedForAll", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isEligible", + inputs: [ + { + name: "_wearer", + type: "address", + internalType: "address", + }, + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "eligible", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isInGoodStanding", + inputs: [ + { + name: "_wearer", + type: "address", + internalType: "address", + }, + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "standing", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isLocalTopHat", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "_isLocalTopHat", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "isTopHat", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "_isTopHat", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isValidHatId", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "validHatId", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "isWearerOfHat", + inputs: [ + { + name: "_user", + type: "address", + internalType: "address", + }, + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "isWearer", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "lastTopHatId", + inputs: [], + outputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "linkedTreeAdmins", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "linkedTreeRequests", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "makeHatImmutable", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "mintHat", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_wearer", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "success", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "mintTopHat", + inputs: [ + { + name: "_target", + type: "address", + internalType: "address", + }, + { + name: "_details", + type: "string", + internalType: "string", + }, + { + name: "_imageURI", + type: "string", + internalType: "string", + }, + ], + outputs: [ + { + name: "topHatId", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "multicall", + inputs: [ + { + name: "data", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + outputs: [ + { + name: "", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "noCircularLinkage", + inputs: [ + { + name: "_topHatDomain", + type: "uint32", + internalType: "uint32", + }, + { + name: "_linkedAdmin", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "notCircular", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "relinkTopHatWithinTree", + inputs: [ + { + name: "_topHatDomain", + type: "uint32", + internalType: "uint32", + }, + { + name: "_newAdminHat", + type: "uint256", + internalType: "uint256", + }, + { + name: "_eligibility", + type: "address", + internalType: "address", + }, + { + name: "_toggle", + type: "address", + internalType: "address", + }, + { + name: "_details", + type: "string", + internalType: "string", + }, + { + name: "_imageURI", + type: "string", + internalType: "string", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "renounceHat", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "requestLinkTopHatToTree", + inputs: [ + { + name: "_topHatDomain", + type: "uint32", + internalType: "uint32", + }, + { + name: "_requestedAdminHat", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "safeBatchTransferFrom", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "safeTransferFrom", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "sameTippyTopHatDomain", + inputs: [ + { + name: "_topHatDomain", + type: "uint32", + internalType: "uint32", + }, + { + name: "_newAdminHat", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "sameDomain", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "setApprovalForAll", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "setHatStatus", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_newStatus", + type: "bool", + internalType: "bool", + }, + ], + outputs: [ + { + name: "toggled", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setHatWearerStatus", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_wearer", + type: "address", + internalType: "address", + }, + { + name: "_eligible", + type: "bool", + internalType: "bool", + }, + { + name: "_standing", + type: "bool", + internalType: "bool", + }, + ], + outputs: [ + { + name: "updated", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "transferHat", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + { + name: "_from", + type: "address", + internalType: "address", + }, + { + name: "_to", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "unlinkTopHatFromTree", + inputs: [ + { + name: "_topHatDomain", + type: "uint32", + internalType: "uint32", + }, + { + name: "_wearer", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "uri", + inputs: [ + { + name: "id", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "_uri", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "viewHat", + inputs: [ + { + name: "_hatId", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "details", + type: "string", + internalType: "string", + }, + { + name: "maxSupply", + type: "uint32", + internalType: "uint32", + }, + { + name: "supply", + type: "uint32", + internalType: "uint32", + }, + { + name: "eligibility", + type: "address", + internalType: "address", + }, + { + name: "toggle", + type: "address", + internalType: "address", + }, + { + name: "imageURI", + type: "string", + internalType: "string", + }, + { + name: "lastHatId", + type: "uint16", + internalType: "uint16", + }, + { + name: "mutable_", + type: "bool", + internalType: "bool", + }, + { + name: "active", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "ApprovalForAll", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "operator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "approved", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatCreated", + inputs: [ + { + name: "id", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "details", + type: "string", + indexed: false, + internalType: "string", + }, + { + name: "maxSupply", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + { + name: "eligibility", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "toggle", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "mutable_", + type: "bool", + indexed: false, + internalType: "bool", + }, + { + name: "imageURI", + type: "string", + indexed: false, + internalType: "string", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatDetailsChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "newDetails", + type: "string", + indexed: false, + internalType: "string", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatEligibilityChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "newEligibility", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatImageURIChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "newImageURI", + type: "string", + indexed: false, + internalType: "string", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatMaxSupplyChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "newMaxSupply", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatMutabilityChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatStatusChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "newStatus", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "HatToggleChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "newToggle", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TopHatLinkRequested", + inputs: [ + { + name: "domain", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + { + name: "newAdmin", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TopHatLinked", + inputs: [ + { + name: "domain", + type: "uint32", + indexed: false, + internalType: "uint32", + }, + { + name: "newAdmin", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TransferBatch", + inputs: [ + { + name: "operator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "ids", + type: "uint256[]", + indexed: false, + internalType: "uint256[]", + }, + { + name: "amounts", + type: "uint256[]", + indexed: false, + internalType: "uint256[]", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TransferSingle", + inputs: [ + { + name: "operator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "URI", + inputs: [ + { + name: "value", + type: "string", + indexed: false, + internalType: "string", + }, + { + name: "id", + type: "uint256", + indexed: true, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "WearerStandingChanged", + inputs: [ + { + name: "hatId", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "wearer", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "wearerStanding", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "AllHatsWorn", + inputs: [ + { + name: "hatId", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "AlreadyWearingHat", + inputs: [ + { + name: "wearer", + type: "address", + internalType: "address", + }, + { + name: "hatId", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "BatchArrayLengthMismatch", + inputs: [], + }, + { + type: "error", + name: "CircularLinkage", + inputs: [], + }, + { + type: "error", + name: "CrossTreeLinkage", + inputs: [], + }, + { + type: "error", + name: "HatDoesNotExist", + inputs: [ + { + name: "hatId", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "HatNotActive", + inputs: [], + }, + { + type: "error", + name: "Immutable", + inputs: [], + }, + { + type: "error", + name: "InvalidHatId", + inputs: [], + }, + { + type: "error", + name: "InvalidUnlink", + inputs: [], + }, + { + type: "error", + name: "LinkageNotRequested", + inputs: [], + }, + { + type: "error", + name: "MaxLevelsReached", + inputs: [], + }, + { + type: "error", + name: "MaxLevelsReached", + inputs: [], + }, + { + type: "error", + name: "NewMaxSupplyTooLow", + inputs: [], + }, + { + type: "error", + name: "NotAdmin", + inputs: [ + { + name: "user", + type: "address", + internalType: "address", + }, + { + name: "hatId", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "NotAdminOrWearer", + inputs: [], + }, + { + type: "error", + name: "NotEligible", + inputs: [], + }, + { + type: "error", + name: "NotHatWearer", + inputs: [], + }, + { + type: "error", + name: "NotHatsEligibility", + inputs: [], + }, + { + type: "error", + name: "NotHatsToggle", + inputs: [], + }, + { + type: "error", + name: "StringTooLong", + inputs: [], + }, + { + type: "error", + name: "ZeroAddress", + inputs: [], + }, + ], + inheritedFunctions: { + approveLinkTopHatToTree: "contracts/Hats/Interfaces/IHats.sol", + balanceOf: "contracts/Hats/utils/ERC1155.sol", + balanceOfBatch: "contracts/Hats/utils/ERC1155.sol", + batchCreateHats: "contracts/Hats/Interfaces/IHats.sol", + batchMintHats: "contracts/Hats/Interfaces/IHats.sol", + buildHatId: "contracts/Hats/HatsIdUtilities.sol", + changeHatDetails: "contracts/Hats/Interfaces/IHats.sol", + changeHatEligibility: "contracts/Hats/Interfaces/IHats.sol", + changeHatImageURI: "contracts/Hats/Interfaces/IHats.sol", + changeHatMaxSupply: "contracts/Hats/Interfaces/IHats.sol", + changeHatToggle: "contracts/Hats/Interfaces/IHats.sol", + checkHatStatus: "contracts/Hats/Interfaces/IHats.sol", + checkHatWearerStatus: "contracts/Hats/Interfaces/IHats.sol", + createHat: "contracts/Hats/Interfaces/IHats.sol", + getAdminAtLevel: "contracts/Hats/HatsIdUtilities.sol", + getAdminAtLocalLevel: "contracts/Hats/HatsIdUtilities.sol", + getHatEligibilityModule: "contracts/Hats/Interfaces/IHats.sol", + getHatLevel: "contracts/Hats/HatsIdUtilities.sol", + getHatMaxSupply: "contracts/Hats/Interfaces/IHats.sol", + getHatToggleModule: "contracts/Hats/Interfaces/IHats.sol", + getImageURIForHat: "contracts/Hats/Interfaces/IHats.sol", + getLocalHatLevel: "contracts/Hats/HatsIdUtilities.sol", + getNextId: "contracts/Hats/Interfaces/IHats.sol", + getTippyTopHatDomain: "contracts/Hats/HatsIdUtilities.sol", + getTopHatDomain: "contracts/Hats/HatsIdUtilities.sol", + hatSupply: "contracts/Hats/Interfaces/IHats.sol", + isAdminOfHat: "contracts/Hats/Interfaces/IHats.sol", + isEligible: "contracts/Hats/Interfaces/IHats.sol", + isInGoodStanding: "contracts/Hats/Interfaces/IHats.sol", + isLocalTopHat: "contracts/Hats/HatsIdUtilities.sol", + isTopHat: "contracts/Hats/HatsIdUtilities.sol", + isValidHatId: "contracts/Hats/HatsIdUtilities.sol", + isWearerOfHat: "contracts/Hats/Interfaces/IHats.sol", + makeHatImmutable: "contracts/Hats/Interfaces/IHats.sol", + mintHat: "contracts/Hats/Interfaces/IHats.sol", + mintTopHat: "contracts/Hats/Interfaces/IHats.sol", + noCircularLinkage: "contracts/Hats/HatsIdUtilities.sol", + relinkTopHatWithinTree: "contracts/Hats/Interfaces/IHats.sol", + renounceHat: "contracts/Hats/Interfaces/IHats.sol", + requestLinkTopHatToTree: "contracts/Hats/Interfaces/IHats.sol", + sameTippyTopHatDomain: "contracts/Hats/HatsIdUtilities.sol", + setHatStatus: "contracts/Hats/Interfaces/IHats.sol", + setHatWearerStatus: "contracts/Hats/Interfaces/IHats.sol", + transferHat: "contracts/Hats/Interfaces/IHats.sol", + unlinkTopHatFromTree: "contracts/Hats/Interfaces/IHats.sol", + uri: "contracts/Hats/utils/ERC1155.sol", + viewHat: "contracts/Hats/Interfaces/IHats.sol", + isApprovedForAll: "contracts/Hats/utils/ERC1155.sol", + safeBatchTransferFrom: "contracts/Hats/utils/ERC1155.sol", + safeTransferFrom: "contracts/Hats/utils/ERC1155.sol", + setApprovalForAll: "contracts/Hats/utils/ERC1155.sol", + supportsInterface: "contracts/Hats/utils/ERC1155.sol", + multicall: "contracts/Hats/utils/Multicallable.sol", + linkedTreeAdmins: "contracts/Hats/HatsIdUtilities.sol", + linkedTreeRequests: "contracts/Hats/HatsIdUtilities.sol", + }, + }, }, } as const;