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
| Error | Description |
|---|---|
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
| Error | Description |
|---|---|
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
| Error | Description |
|---|---|
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
| Error | Description |
|---|---|
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
| Error | Description |
|---|---|
InvalidCursor() | Invalid pagination cursor |
Market Contract
Publishing
| Error | Description |
|---|---|
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
| Error | Description |
|---|---|
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
| Error | Description |
|---|---|
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 |