HatsErrors.sol
HatsErrors
Errors
NotAdmin
Emitted when user is attempting to perform an action on hatId but is not wearing one of hatId's admin hats
Can be equivalent to NotHatWearer(buildHatId(hatId)), such as when emitted by approveLinkTopHatToTree or relinkTopHatToTree
error NotAdmin(address user, uint256 hatId);NotHatWearer
Emitted when attempting to perform an action as or for an account that is not a wearer of a given hat
error NotHatWearer();NotAdminOrWearer
Emitted when attempting to perform an action that requires being either an admin or wearer of a given hat
error NotAdminOrWearer();AllHatsWorn
Emitted when attempting to mint hatId but hatId's maxSupply has been reached
MaxLevelsReached
Emitted when attempting to create a hat with a level 14 hat as its admin
InvalidHatId
Emitted when an attempted hat id has empty intermediate level(s)
AlreadyWearingHat
Emitted when attempting to mint hatId to a wearer who is already wearing the hat
HatDoesNotExist
Emitted when attempting to mint a non-existant hat
HatNotActive
Emmitted when attempting to mint or transfer a hat that is not active
NotEligible
Emitted when attempting to mint or transfer a hat to an ineligible wearer
NotHatsToggle
Emitted when attempting to check or set a hat's status from an account that is not that hat's toggle module
NotHatsEligibility
Emitted when attempting to check or set a hat wearer's status from an account that is not that hat's eligibility module
BatchArrayLengthMismatch
Emitted when array arguments to a batch function have mismatching lengths
Immutable
Emitted when attempting to mutate or transfer an immutable hat
NewMaxSupplyTooLow
Emitted when attempting to change a hat's maxSupply to a value lower than its current supply
CircularLinkage
Emitted when attempting to link a tophat to a new admin for which the tophat serves as an admin
CrossTreeLinkage
Emitted when attempting to link or relink a tophat to a separate tree
LinkageNotRequested
Emitted when attempting to link a tophat without a request
InvalidUnlink
Emitted when attempting to unlink a tophat that does not have a wearer
This ensures that unlinking never results in a bricked tophat
ZeroAddress
Emmited when attempting to change a hat's eligibility or toggle module to the zero address
StringTooLong
Emmitted when attempting to change a hat's details or imageURI to a string with over 7000 bytes (~characters)
This protects against a DOS attack where an admin iteratively extend's a hat's details or imageURI to be so long that reading it exceeds the block gas limit, breaking uri() and viewHat()
Last updated