Errors

Custom errors thrown by Totems contracts. These are more gas-efficient than string revert messages and provide structured error data.

Totems Contract

Totem Creation

ErrorDescription
TotemAlreadyExists(string ticker)A totem with this ticker already exists
InvalidTickerLength(uint256 length)Ticker must be 1-10 characters
InvalidTickerChar(uint8 char)Ticker contains invalid character (only A-Z allowed)
NameTooShort(uint256 length)Totem name is too short
NameTooLong(uint256 length)Totem name exceeds max length
DescriptionTooLong(uint256 length)Description exceeds max length
EmptyImage()Image URL cannot be empty
InvalidSeed()Invalid seed value provided
ZeroSupply()Total supply cannot be zero

Allocations & Mods

ErrorDescription
InvalidAllocation(string message)Allocation configuration is invalid
TooManyAllocations()Exceeds maximum number of allocations
TooManyMods()Exceeds maximum number of mods per hook
ModDoesntSupportHook(address mod, ITotemTypes.Hook hook)Mod doesn’t implement the required hook
ModMustSupportUnlimitedMinting(address mod)Mod must be marked as unlimited minter
ModNotMinter(address mod)Mod is not a valid minter

Operations

ErrorDescription
TotemNotFound(string ticker)No totem exists with this ticker
TotemNotActive()Totem has been deactivated
Unauthorized()Caller is not authorized for this action
InsufficientBalance(uint256 required, uint256 available)Account doesn’t have enough tokens
CannotTransferToUnlimitedMinter()Cannot transfer tokens to unlimited minter mods

Fees & Licensing

ErrorDescription
InsufficientFee(uint256 required, uint256 provided)Payment doesn’t cover required fee
ReferrerFeeTooLow(uint256 minFee)Referrer fee below minimum
CantSetLicense()Cannot set license in this context

Pagination

ErrorDescription
InvalidCursor()Invalid pagination cursor

Market Contract

Publishing

ErrorDescription
ModAlreadyPublished(address mod)Mod has already been published
InvalidContractAddress()Invalid mod contract address
NoHooksSpecified()Must specify at least one hook
InvalidHook(ITotemTypes.Hook hook)Invalid hook type
DuplicateHook(ITotemTypes.Hook hook)Same hook specified twice

Mod Details

ErrorDescription
EmptyModName()Mod name cannot be empty
ModNameTooShort(uint256 length)Mod name is too short
ModNameTooLong(uint256 length)Mod name exceeds max length
EmptyModSummary()Mod summary cannot be empty
ModSummaryTooShort(uint256 length)Mod summary is too short
ModSummaryTooLong(uint256 length)Mod summary exceeds max length
EmptyModImage()Mod image URL cannot be empty

Access & Fees

ErrorDescription
ModNotFound(address mod)Mod not found in marketplace
Unauthorized()Caller is not authorized
InsufficientFee(uint256 required, uint256 provided)Payment doesn’t cover required fee
ReferrerFeeTooLow(uint256 minFee)Referrer fee below minimum
<-
Events