Custom Errors
Custom errors provide an efficient way to communicate problem states between a Smart Contract, i.e. Mud System, and consumers. They are however a little terse and unreadable unless you know where to look. I have included a cut of the custom errors in World v1 and World v2 from main/ff2d894 as of the 28th April 2025.
World v1
0x04c9225f: SmartGate_GateNotLinked(uint256,uint256)
0x0dc28f6a: World_ResourceAlreadyExists(bytes32,string)
0x0e0e2d4d: World_InsufficientBalance(uint256,uint256)
0x0efb4b85: World_InvalidNamespace(bytes14)
0x0f72cb98: Store_InvalidKeyNamesLength(uint256,uint256)
0x0f906e83: SmartTurret_NotConfigured(uint256)
0x14012068: Module_AlreadyInstalled()
0x15e34a48: World_AlreadyInitialized()
0x16e12e13: SmartDeployable_InvalidFuelConsumptionInterval(uint256)
0x177e802f: ERC721InsufficientApproval(address,uint256)
0x190db3a2: Inventory_InvalidDeployable(string,uint256)
0x19d1e8d2: Inventory_InvalidEphemeralInventoryOwner(string,address)
0x1d8d44db: FieldLayout_StaticLengthIsNotZero(uint256)
0x2184e830: SmartGateModule_InvalidNamespace(bytes14)
0x2235a2a3: Inventory_InvalidItemOwner(string,uint256,address,address)
0x23230fa3: Slice_OutOfBounds(bytes,uint256,uint256)
0x254c7db4: Store_InvalidStaticDataLength(uint256,uint256)
0x2b912507: Inventory_InvalidCapacity(string)
0x2ca07d84: ERC721Module_InvalidNamespace(bytes14)
0x2fbeee89: EntityRecordModule_InvalidNamespace(bytes14)
0x31b46683: Store_InvalidResourceType(bytes2,bytes32,string)
0x3345682c: SmartCharacter_ERC721AlreadyInitialized()
0x3c1959e6: AccessSystem_NoPermission(address,bytes32)
0x3d1d1ae2: World_FunctionSelectorAlreadyExists(bytes4)
0x41e713ad: Store_TableNotFound(bytes32,string)
0x46f2a53a: SmartStorageUnitModule_InvalidNamespace(bytes14)
0x486388a8: SmartCharacterModule_InvalidNamespace(bytes14)
0x4c3059dd: LocationModule_InvalidNamespace(bytes14)
0x4edfdd67: SmartGate_NotConfigured(uint256)
0x53b2dd05: FieldLayout_StaticLengthIsZero(uint256)
0x5b08ba18: ERC721InvalidOperator(address)
0x5c30fb6f: World_InvalidResourceType(bytes2,bytes32,string)
0x5d019b9f: SmartCharacterDoesNotExist(uint256)
0x5f8b4887: Module_MissingDependency(address)
0x60e8a56f: StaticDataModule_InvalidNamespace(bytes14)
0x61acbc27: SmartCharacter_AlreadyCreated(address,uint256)
0x64283d7b: ERC721IncorrectOwner(address,uint256,address)
0x64a0ae92: ERC721InvalidReceiver(address)
0x65cc0adf: Store_InvalidValueSchemaStaticLength(uint256,uint256)
0x6647cda8: SmartGate_UndefinedClassId()
0x6793df62: FieldLayout_TooManyDynamicFields(uint256,uint256)
0x6fd69a42: SmartCharacter_UndefinedClassIds()
0x7149a3c1: EncodedLengths_InvalidLength(uint256)
0x71ee9e81: World_UnlimitedDelegationNotAllowed()
0x7237f237: FieldLayout_StaticLengthDoesNotFitInAWord(uint256)
0x73c6ac6e: ERC721InvalidSender(address)
0x74b5e6ff: World_InterfaceNotSupported(address,bytes4)
0x75a85931: SmartGate_SameSourceAndDestination(uint256,uint256)
0x7dec4c00: Store_InvalidFieldNamesLength(uint256,uint256)
0x7e273289: ERC721NonexistentToken(uint256)
0x7e8578d3: Store_IndexOutOfBounds(uint256,uint256)
0x8246ea9e: SmartDeployableModule_InvalidNamespace(bytes14)
0x883ef41c: SmartDeployable_InvalidObjectOwner(string,address,uint256)
0x897fbcd3: Inventory_InsufficientCapacity(string,uint256,uint256)
0x89c62b64: ERC721InvalidOwner(address)
0x8ae3ea30: KillMailModule_InvalidNamespace(bytes14)
0x8c5bc117: AccessSystem_InvalidRoleId()
0x8dcf34e9: Inventory_InvalidTransferItemQuantity(string,uint256,string,address,uint256,uint256)
0x90adc148: SmartDeployableERC721AlreadyInitialized()
0x9434f7e1: PuppetMaster_NoPuppet(address,bytes32)
0x9d5a2bff: SmartStorageUnit_UndefinedClassId()
0x9e85182c: World_CallbackNotAllowed(bytes4)
0xa019e4da: FieldLayout_Empty()
0xa65010b4: Store_InvalidSplice(uint40,uint40,uint40)
0xa8c54782: Store_InvalidBounds(uint256,uint256)
0xa9fbf51f: ERC721InvalidApprover(address)
0xb4bf9273: AccessSystem_AccessConfigDenied(address,string)
0xb6622fc0: Module_RootInstallNotSupported()
0xbb8f5775: Inventory_InvalidItem(string,uint256)
0xc0b70741: World_SystemAlreadyExists(address)
0xc63770a1: SmartDeployable_NoFuel(uint256)
0xc86745f9: World_DelegationNotFound(address,address)
0xcec21699: SmartGate_NotWithtinRange(uint256,uint256)
0xd4986159: Schema_InvalidLength(uint256)
0xd787b737: World_AccessDenied(string,address)
0xd8df1759: Inventory_InvalidItemQuantity(string,uint256,uint256)
0xdfaaf9cf: Store_TableAlreadyExists(bytes32,string)
0xe1411314: SmartTurretModule_InvalidNamespace(bytes14)
0xe46cd066: SmartTurret_UndefinedClassId()
0xe4ac069e: World_InvalidResourceId(bytes32,string)
0xea1d2af8: SmartStorageUnitERC721AlreadyInitialized()
0xea8b184c: Module_NonRootInstallNotSupported()
0xeba964de: FieldLayout_InvalidStaticDataLength(uint256,uint256)
0xecd893b9: FieldLayout_TooManyFields(uint256,uint256)
0xedea9587: Store_InvalidValueSchemaDynamicLength(uint256,uint256)
0xf02a2827: SmartDeployable_TooMuchFuelDeposited(uint256,uint256)
0xf29d4d88: Store_InvalidValueSchemaLength(uint256,uint256)
0xf3387c4b: InventoryModule_InvalidNamespace(bytes14)
0xf44b4220: Schema_StaticTypeAfterDynamicType()
0xf5471751: SmartDeployable_StateTransitionPaused()
0xf77f2311: SmartDeployable_IncorrectState(uint256,uint8)
0xfbe67e6a: SmartGate_GateAlreadyLinked(uint256,uint256)
0xfbf10ce6: World_ResourceNotFound(bytes32,string)
0xfcd670a8: KillMail_AlreadyExists(string)
0xfdde54e2: World_FunctionSelectorNotFound(bytes4)
World v2
0x008928f3: EphemeralInventory_NonExistentEntityRecord(string,uint256)
0x019a1bee: Access_NotAdminSupportedOrDirectOwnerGates(address,uint256)
0x04c9225f: SmartGate_GateNotLinked(uint256,uint256)
0x04cdc9e7: InventoryOwnership_InvalidInventory(uint256,uint256)
0x0a4785eb: AccessSystemLib_CallingFromRootSystem()
0x0d86f300: InventoryOwnership_NonexistentObject(uint256)
0x0dc28f6a: World_ResourceAlreadyExists(bytes32,string)
0x0dd21568: Access_NotCallAccess(address,uint256)
0x0e0e2d4d: World_InsufficientBalance(uint256,uint256)
0x0efb4b85: World_InvalidNamespace(bytes14)
0x0f72cb98: Store_InvalidKeyNamesLength(uint256,uint256)
0x12892141: Fuel_InvalidFuelAmount(uint256,uint256,uint256,uint256)
0x14012068: Module_AlreadyInstalled()
0x14c3e240: KillMail_AlreadyExists(uint256)
0x1507fe47: FuelSystemLib_CallingFromRootSystem()
0x15e34a48: World_AlreadyInitialized()
0x174d6207: Ownership_AlreadyOwned(uint256,address)
0x1918998b: InventoryOwnership_Ephemeral_InsufficientQuantity(uint256,address,uint256,uint256,uint256)
0x1d8d44db: FieldLayout_StaticLengthIsNotZero(uint256)
0x23230fa3: Slice_OutOfBounds(bytes,uint256,uint256)
0x23be51dc: Access_NotAdminSupportedOrDirectOwner(address,uint256)
0x2464984d: Access_NotDirectAdmin(address)
0x251cff0b: Access_NotClassScopedAccess(address,uint256)
0x254c7db4: Store_InvalidStaticDataLength(uint256,uint256)
0x27310d94: Ownership_SingletonInInventory(uint256,uint256)
0x2b912507: Inventory_InvalidCapacity(string)
0x2f9afe8a: Inventory_InvalidTenantId(uint256,bytes32)
0x31b46683: Store_InvalidResourceType(bytes2,bytes32,string)
0x36331833: Access_NotDirectOwner(address,uint256)
0x3b9b31c6: EphemeralInventory_InvalidEphemeralOwner(uint256,address)
0x3cb04dd3: Inventory_InvalidItemDepositQuantity(uint256,uint256)
0x3d1d1ae2: World_FunctionSelectorAlreadyExists(bytes4)
0x3e3e8880: Deployable_TooMuchFuelDeposited(uint256,uint256)
0x40e4bf39: Fuel_InvalidFuelUnitVolume(uint256,uint256,uint256,uint256)
0x40f6dce8: SmartCharacterSystemLib_CallingFromRootSystem()
0x41e713ad: Store_TableNotFound(bytes32,string)
0x44518870: Access_NotDirectAdminOrCallAccess(address,uint256)
0x4897c252: EphemeralInventory_InvalidSmartObjectId(uint256)
0x495f4a8f: SmartAssembly_DoesNotExist(uint256)
0x49a81434: SOF_UnscopedSystemCall(uint256,bytes32)
0x4a0e1288: EphemeralInventory_InvalidTenantId(uint256,bytes32)
0x4edfdd67: SmartGate_NotConfigured(uint256)
0x4f27e537: SmartTurretSystemLib_CallingFromRootSystem()
0x51bf7650: Deployable_NoFuel(uint256)
0x53b2dd05: FieldLayout_StaticLengthIsZero(uint256)
0x547a7c6f: Access_NotAdminOrCallAccess(address,uint256)
0x55318f3b: SmartAssembly_InvalidTypeId(uint256,uint256)
0x5534214e: EntityRecordSystemLib_CallingFromRootSystem()
0x5c30fb6f: World_InvalidResourceType(bytes2,bytes32,string)
0x5d019b9f: SmartCharacterDoesNotExist(uint256)
0x5f8b4887: Module_MissingDependency(address)
0x61acbc27: SmartCharacter_AlreadyCreated(address,uint256)
0x6200bd5b: Deployable_InvalidFuelConsumptionInterval(uint256)
0x64faa59c: InventoryOwnershipSystemLib_CallingFromRootSystem()
0x65cc0adf: Store_InvalidValueSchemaStaticLength(uint256,uint256)
0x6647cda8: SmartGate_UndefinedClassId()
0x6793df62: FieldLayout_TooManyDynamicFields(uint256,uint256)
0x6ae7c53c: SmartGate_GateNotOnline(uint256)
0x6b280522: InventoryInteractSystemLib_CallingFromRootSystem()
0x7149a3c1: EncodedLengths_InvalidLength(uint256)
0x71ee9e81: World_UnlimitedDelegationNotAllowed()
0x7237f237: FieldLayout_StaticLengthDoesNotFitInAWord(uint256)
0x74b5e6ff: World_InterfaceNotSupported(address,bytes4)
0x75a85931: SmartGate_SameSourceAndDestination(uint256,uint256)
0x7645927f: SmartStorageUnitSystemLib_CallingFromRootSystem()
0x76579d0d: RoleManagementSystemLib_CallingFromRootSystem()
0x777346ad: Deployable_IncorrectState(uint256,uint8)
0x78ebe86b: LocationSystemLib_CallingFromRootSystem()
0x7c2669f8: SmartAssembly_InvalidTenantId(uint256,bytes32)
0x7dec4c00: Store_InvalidFieldNamesLength(uint256,uint256)
0x7e8578d3: Store_IndexOutOfBounds(uint256,uint256)
0x7ea585ed: KillMailSystemLib_CallingFromRootSystem()
0x819c9ca8: Access_CannotTransferFromEphemeral(address,uint256)
0x84704b83: SmartAssembly_TypeCannotBeEmpty(uint256)
0x87913e06: InventoryOwnership_ZeroQuantity(uint256)
0x897fbcd3: Inventory_InsufficientCapacity(string,uint256,uint256)
0x8d417ff8: Access_NotDirectOwnerOrCanTransferToEphemeral(address,uint256)
0x8f267c4f: Deployable_InvalidObjectOwner(string,address,uint256)
0x8fefaa97: Access_NotAdminSupported(address,uint256)
0x9af9d4d8: Ownership_InvalidAccount(address)
0x9c2c4d05: InventorySystemLib_CallingFromRootSystem()
0x9e85182c: World_CallbackNotAllowed(bytes4)
0x9fbf72da: Access_NotOwnerWithAdminSupportAccess(address,uint256)
0xa019e4da: FieldLayout_Empty()
0xa0e92802: OwnershipSystemLib_CallingFromRootSystem()
0xa2cf92e9: Fuel_ExceedsMaxCapacity(uint256,uint256,uint256,uint256)
0xa65010b4: Store_InvalidSplice(uint40,uint40,uint40)
0xa8c54782: Store_InvalidBounds(uint256,uint256)
0xaccab7e6: EntitySystemLib_CallingFromRootSystem()
0xad457fe6: InventoryOwnership_SingletonAlreadyAssigned(uint256,uint256)
0xb1038ddc: Inventory_NonExistentEntityRecord(string,uint256)
0xb1a1a895: EveSystemLib_CallingFromRootSystem()
0xb5c6dacc: SOF_InvalidAccessLogic()
0xb6622fc0: Module_RootInstallNotSupported()
0xb8afafec: InventoryOwnership_InsufficientQuantity(uint256,uint256,uint256,uint256)
0xb902bfe6: SOF_InvalidEntityType(uint256)
0xb9855897: Access_NotEphemeralOwnerOrCallAccess(address,uint256)
0xba824682: Fuel_InvalidFuelConsumptionInterval(uint256,uint256,uint256,uint256)
0xbaee59d8: Deployable_StateTransitionPaused()
0xbd008882: EphemeralInventory_InsufficientCapacity(string,uint256,uint256)
0xbe396cf2: SmartGateSystemLib_CallingFromRootSystem()
0xbea459c5: AccessConfigSystemLib_CallingFromRootSystem()
0xc06ed92e: InventoryOwnership_InvalidQuantity(uint256,uint256,uint256)
0xc0b70741: World_SystemAlreadyExists(address)
0xc25ddaa1: Access_NotAdminSupportedOwnerOrCallAccess(address,uint256)
0xc37496dd: Access_NotAdminOrClassScoped(address,uint256)
0xc642e8ac: InventoryOwnership_NonexistentItemRecord(uint256)
0xc734f539: SmartGate_GatesNotOnline(uint256,uint256)
0xc7661ee0: EphemeralInventorySystemLib_CallingFromRootSystem()
0xc86745f9: World_DelegationNotFound(address,address)
0xcb2f4221: KillMail_InvalidCharacterId(uint256,uint256)
0xcb7ee31d: SOF_CallTooDeep(uint256)
0xcc002209: Ownership_InvalidSingleton(uint256)
0xce769cdd: EphemeralInteractSystemLib_CallingFromRootSystem()
0xcec21699: SmartGate_NotWithtinRange(uint256,uint256)
0xcf44650a: SOF_InvalidCall()
0xcfca8f40: SmartCharacter_InvalidTypeId(uint256,uint256)
0xd1e14c56: SmartAssemblySystemLib_CallingFromRootSystem()
0xd21f82d2: EphemeralInventory_InvalidItemDepositQuantity(uint256,uint256)
0xd2538d1e: Access_NotAdminOrOwner(address,uint256)
0xd4986159: Schema_InvalidLength(uint256)
0xd55363f4: Ownership_NonexistentObject(uint256)
0xd5bfd0a4: Access_NotAdminOrOwnerSupported(address,uint256)
0xd787b737: World_AccessDenied(string,address)
0xd8a5b942: Inventory_InvalidItemObjectId(uint256)
0xdfa3d1f8: InventoryOwnership_InvalidOperation(string)
0xdfaaf9cf: Store_TableAlreadyExists(bytes32,string)
0xe3a75cd7: Ownership_InvalidOwner(uint256,address)
0xe4ac069e: World_InvalidResourceId(bytes32,string)
0xe83cf2e3: Access_NotDirectEphemeralOwnerOrCanCrossTransferToEphemeral(address,uint256)
0xea4ff48a: SmartAssembly_InvalidObjectId(uint256)
0xea839f15: SmartCharacter_InvalidObjectId(uint256)
0xea8b184c: Module_NonRootInstallNotSupported()
0xeadd7dbf: Fuel_InsufficientFuel(uint256,uint256,uint256)
0xeb9896ce: Fuel_InvalidFuelMaxCapacity(uint256,uint256,uint256,uint256)
0xeba964de: FieldLayout_InvalidStaticDataLength(uint256,uint256)
0xecbe86ee: InventoryOwnership_SingletonDirectlyOwned(uint256,address)
0xecd893b9: FieldLayout_TooManyFields(uint256,uint256)
0xed518041: DeployableSystemLib_CallingFromRootSystem()
0xed7fb232: EphemeralInventory_InvalidItemObjectId(uint256)
0xedea9587: Store_InvalidValueSchemaDynamicLength(uint256,uint256)
0xf0f9ab25: Access_NotClassScoped(address,uint256)
0xf1ab3ba1: Access_NotDirectOwnerOrCanTransferToInventory(address,uint256)
0xf29d4d88: Store_InvalidValueSchemaLength(uint256,uint256)
0xf44b4220: Schema_StaticTypeAfterDynamicType()
0xf4ecd5c3: Access_NotEphemeralOwnerOrCallAccessWithEphemeralOwner(address,uint256)
0xf5af47bf: SmartCharacter_InvalidTenantId(uint256,bytes32)
0xfbe67e6a: SmartGate_GateAlreadyLinked(uint256,uint256)
0xfbf10ce6: World_ResourceNotFound(bytes32,string)
0xfd2a1184: Access_NotOwner(address,uint256)
0xfdde54e2: World_FunctionSelectorNotFound(bytes4)
Generation Script
If you want to generate these yourself you can use the following commands:
git clone [email protected]:projectawakening/world-chain-contracts.git
cd world-chain-contracts
pnpm install
cd mud-contracts/world
forge selectors list | grep Error | awk '{print $6 ": " $4}' | sort -u
cd ../world-v2
forge selectors list | grep Error | awk '{print $6 ": " $4}' | sort -u