@latticexyz/world-modules 2.0.0-march-19-skystrife-playtest-f486281e → 2.0.0-next-17-awakening-9c07ab3a2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/dist/mud.config.d.ts +256 -0
  2. package/out/AccessControl.sol/AccessControl.json +1 -1
  3. package/out/AccessControlLib.sol/AccessControlLib.json +1 -1
  4. package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json +55 -0
  5. package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json.d.ts +55 -0
  6. package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
  7. package/out/AddressArray.sol/AddressArray.json +1 -1
  8. package/out/Allowances.sol/Allowances.json +1 -1
  9. package/out/ArrayLib.sol/ArrayLib.json +1 -1
  10. package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json +16 -0
  11. package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json.d.ts +16 -0
  12. package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
  13. package/out/Balances.sol/Balances.json +1 -1
  14. package/out/Base.sol/CommonBase.json +1 -1
  15. package/out/Base.sol/ScriptBase.json +1 -1
  16. package/out/Base.sol/TestBase.json +1 -1
  17. package/out/BatchCallSystem.sol/BatchCallSystem.abi.json +5 -0
  18. package/out/BatchCallSystem.sol/BatchCallSystem.abi.json.d.ts +5 -0
  19. package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
  20. package/out/Bool.sol/Bool.json +1 -1
  21. package/out/Bytes.sol/Bytes.json +1 -1
  22. package/out/CallboundDelegationControl.sol/CallboundDelegationControl.json +1 -1
  23. package/out/CallboundDelegations.sol/CallboundDelegations.json +1 -1
  24. package/out/DecodeSlice.sol/DecodeSlice.json +1 -1
  25. package/out/Delegation.sol/Delegation.json +1 -1
  26. package/out/DelegationControl.sol/DelegationControl.json +1 -1
  27. package/out/DelegationControlMock.sol/DelegationControlMock.json +1 -1
  28. package/out/ERC165Checker.sol/ERC165Checker.json +1 -0
  29. package/out/ERC20.t.sol/ERC20Test.json +1 -1
  30. package/out/ERC20Metadata.sol/ERC20Metadata.json +1 -1
  31. package/out/ERC20Module.sol/ERC20Module.abi.json +120 -20
  32. package/out/ERC20Module.sol/ERC20Module.abi.json.d.ts +120 -20
  33. package/out/ERC20Module.sol/ERC20Module.json +1 -1
  34. package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json +117 -4
  35. package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json.d.ts +117 -4
  36. package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.json +1 -1
  37. package/out/ERC20Registry.sol/ERC20Registry.json +1 -1
  38. package/out/ERC20System.sol/ERC20System.json +1 -1
  39. package/out/ERC721.t.sol/ERC721Recipient.json +1 -1
  40. package/out/ERC721.t.sol/ERC721Test.abi.json +1 -1
  41. package/out/ERC721.t.sol/ERC721Test.abi.json.d.ts +1 -1
  42. package/out/ERC721.t.sol/ERC721Test.json +1 -1
  43. package/out/ERC721.t.sol/ERC721TokenReceiver.json +1 -1
  44. package/out/ERC721.t.sol/NonERC721Recipient.json +1 -1
  45. package/out/ERC721.t.sol/RevertingERC721Recipient.json +1 -1
  46. package/out/ERC721.t.sol/WrongReturnDataERC721Recipient.json +1 -1
  47. package/out/ERC721Metadata.sol/ERC721Metadata.json +1 -1
  48. package/out/ERC721Module.sol/ERC721Module.abi.json +120 -20
  49. package/out/ERC721Module.sol/ERC721Module.abi.json.d.ts +120 -20
  50. package/out/ERC721Module.sol/ERC721Module.json +1 -1
  51. package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json +117 -4
  52. package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json.d.ts +117 -4
  53. package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.json +1 -1
  54. package/out/ERC721Registry.sol/ERC721Registry.json +1 -1
  55. package/out/ERC721System.sol/ERC721System.json +1 -1
  56. package/out/EchoSubscriber.sol/EchoSubscriber.json +1 -1
  57. package/out/EncodeArray.sol/EncodeArray.json +1 -1
  58. package/out/FieldLayout.sol/FieldLayoutInstance.json +1 -1
  59. package/out/FieldLayout.sol/FieldLayoutLib.abi.json +69 -4
  60. package/out/FieldLayout.sol/FieldLayoutLib.abi.json.d.ts +69 -4
  61. package/out/FieldLayout.sol/FieldLayoutLib.json +1 -1
  62. package/out/FieldLayoutEncodeHelper.sol/FieldLayoutEncodeHelper.json +1 -1
  63. package/out/FunctionSelectors.sol/FunctionSelectors.json +1 -1
  64. package/out/FunctionSignatures.sol/FunctionSignatures.json +1 -1
  65. package/out/GasReporter.sol/GasReporter.json +1 -1
  66. package/out/Hook.sol/HookInstance.json +1 -1
  67. package/out/Hook.sol/HookLib.json +1 -1
  68. package/out/Hooks.sol/Hooks.json +1 -1
  69. package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json +13 -0
  70. package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json.d.ts +13 -0
  71. package/out/IAccessManagementSystem.sol/IAccessManagementSystem.json +1 -1
  72. package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.json +1 -1
  73. package/out/IBaseWorld.sol/IBaseWorld.abi.json +64 -5
  74. package/out/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +64 -5
  75. package/out/IBaseWorld.sol/IBaseWorld.json +1 -1
  76. package/out/IBatchCallSystem.sol/IBatchCallSystem.json +1 -1
  77. package/out/IDelegationControl.sol/IDelegationControl.json +1 -1
  78. package/out/IERC165.sol/IERC165.json +1 -0
  79. package/out/IERC20.sol/IERC20.json +1 -1
  80. package/out/IERC20Errors.sol/IERC20Errors.json +1 -1
  81. package/out/IERC20Events.sol/IERC20Events.json +1 -1
  82. package/out/IERC20Mintable.sol/IERC20Mintable.json +1 -1
  83. package/out/IERC20System.sol/IERC20System.json +1 -1
  84. package/out/IERC721.sol/IERC721.json +1 -1
  85. package/out/IERC721Errors.sol/IERC721Errors.json +1 -1
  86. package/out/IERC721Events.sol/IERC721Events.json +1 -1
  87. package/out/IERC721Metadata.sol/IERC721Metadata.json +1 -1
  88. package/out/IERC721Mintable.sol/IERC721Mintable.json +1 -1
  89. package/out/IERC721Receiver.sol/IERC721Receiver.json +1 -1
  90. package/out/IModule.sol/IModule.abi.json +4 -17
  91. package/out/IModule.sol/IModule.abi.json.d.ts +4 -17
  92. package/out/IModule.sol/IModule.json +1 -1
  93. package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.abi.json +1 -1
  94. package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.abi.json.d.ts +1 -1
  95. package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.json +1 -1
  96. package/out/IMulticall3.sol/IMulticall3.json +1 -1
  97. package/out/IPuppetFactorySystem.sol/IPuppetFactorySystem.json +1 -1
  98. package/out/IRegistrationSystem.sol/IRegistrationSystem.abi.json +1 -0
  99. package/out/IRegistrationSystem.sol/IRegistrationSystem.json +1 -0
  100. package/out/IStore.sol/IStore.abi.json +51 -3
  101. package/out/IStore.sol/IStore.abi.json.d.ts +51 -3
  102. package/out/IStore.sol/IStore.json +1 -1
  103. package/out/IStoreData.sol/IStoreData.json +1 -1
  104. package/out/IStoreErrors.sol/IStoreErrors.abi.json +51 -3
  105. package/out/IStoreErrors.sol/IStoreErrors.abi.json.d.ts +51 -3
  106. package/out/IStoreErrors.sol/IStoreErrors.json +1 -1
  107. package/out/IStoreEvents.sol/IStoreEvents.json +1 -1
  108. package/out/IStoreHook.sol/IStoreHook.json +1 -1
  109. package/out/IStoreRead.sol/IStoreRead.json +1 -1
  110. package/out/IStoreRegistration.sol/IStoreRegistration.json +1 -1
  111. package/out/IStoreWrite.sol/IStoreWrite.json +1 -1
  112. package/out/ISystemHook.sol/ISystemHook.json +1 -1
  113. package/out/IWorldContextConsumer.sol/IWorldContextConsumer.json +1 -1
  114. package/out/IWorldErrors.sol/IWorldErrors.abi.json +11 -0
  115. package/out/IWorldErrors.sol/IWorldErrors.abi.json.d.ts +11 -0
  116. package/out/IWorldErrors.sol/IWorldErrors.json +1 -1
  117. package/out/IWorldKernel.sol/IWorldCall.json +1 -1
  118. package/out/IWorldKernel.sol/IWorldKernel.abi.json +13 -2
  119. package/out/IWorldKernel.sol/IWorldKernel.abi.json.d.ts +13 -2
  120. package/out/IWorldKernel.sol/IWorldKernel.json +1 -1
  121. package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json +1 -1
  122. package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json.d.ts +1 -1
  123. package/out/IWorldKernel.sol/IWorldModuleInstallation.json +1 -1
  124. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json +27 -1
  125. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json.d.ts +27 -1
  126. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -1
  127. package/out/{CoreModule.sol/CoreModule.abi.json → InitModule.sol/InitModule.abi.json} +145 -19
  128. package/out/{CoreModule.sol/CoreModule.abi.json.d.ts → InitModule.sol/InitModule.abi.json.d.ts} +145 -19
  129. package/out/InitModule.sol/InitModule.json +1 -0
  130. package/out/InitModuleAddress.sol/InitModuleAddress.abi.json +1 -0
  131. package/out/InitModuleAddress.sol/InitModuleAddress.json +1 -0
  132. package/out/InstalledModules.sol/InstalledModules.json +1 -1
  133. package/out/KeysInTable.sol/KeysInTable.json +1 -1
  134. package/out/KeysInTableHook.sol/KeysInTableHook.abi.json +16 -0
  135. package/out/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts +16 -0
  136. package/out/KeysInTableHook.sol/KeysInTableHook.json +1 -1
  137. package/out/KeysInTableModule.sol/KeysInTableModule.abi.json +3 -16
  138. package/out/KeysInTableModule.sol/KeysInTableModule.abi.json.d.ts +3 -16
  139. package/out/KeysInTableModule.sol/KeysInTableModule.json +1 -1
  140. package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json +39 -6
  141. package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json.d.ts +39 -6
  142. package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.json +1 -1
  143. package/out/KeysWithValue.sol/KeysWithValue.json +1 -1
  144. package/out/KeysWithValueHook.sol/KeysWithValueHook.json +1 -1
  145. package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json +3 -16
  146. package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json.d.ts +3 -16
  147. package/out/KeysWithValueModule.sol/KeysWithValueModule.json +1 -1
  148. package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json +39 -6
  149. package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json.d.ts +39 -6
  150. package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.json +1 -1
  151. package/out/LimitedCallContext.sol/LimitedCallContext.abi.json +7 -0
  152. package/out/LimitedCallContext.sol/LimitedCallContext.abi.json.d.ts +7 -0
  153. package/out/LimitedCallContext.sol/LimitedCallContext.json +1 -0
  154. package/out/Memory.sol/Memory.json +1 -1
  155. package/out/Module.sol/Module.abi.json +4 -17
  156. package/out/Module.sol/Module.abi.json.d.ts +4 -17
  157. package/out/Module.sol/Module.json +1 -1
  158. package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json +6 -1
  159. package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json.d.ts +6 -1
  160. package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +1 -1
  161. package/out/NamespaceDelegationControl.sol/NamespaceDelegationControl.json +1 -1
  162. package/out/NamespaceOwner.sol/NamespaceOwner.json +1 -1
  163. package/out/OperatorApproval.sol/OperatorApproval.json +1 -1
  164. package/out/Owners.sol/Owners.json +1 -1
  165. package/out/PackedCounter.sol/PackedCounterInstance.json +1 -1
  166. package/out/PackedCounter.sol/PackedCounterLib.json +1 -1
  167. package/out/Puppet.sol/Puppet.json +1 -1
  168. package/out/PuppetDelegationControl.sol/PuppetDelegationControl.json +1 -1
  169. package/out/PuppetFactorySystem.sol/PuppetFactorySystem.json +1 -1
  170. package/out/PuppetMaster.sol/PuppetMaster.json +1 -1
  171. package/out/PuppetModule.sol/PuppetModule.abi.json +119 -19
  172. package/out/PuppetModule.sol/PuppetModule.abi.json.d.ts +119 -19
  173. package/out/PuppetModule.sol/PuppetModule.json +1 -1
  174. package/out/PuppetModule.t.sol/PuppetModuleTest.abi.json +14 -0
  175. package/out/PuppetModule.t.sol/PuppetModuleTest.abi.json.d.ts +14 -0
  176. package/out/PuppetModule.t.sol/PuppetModuleTest.json +1 -1
  177. package/out/PuppetModule.t.sol/PuppetTestSystem.json +1 -1
  178. package/out/PuppetRegistry.sol/PuppetRegistry.json +1 -1
  179. package/out/{CoreSystem.sol/CoreSystem.abi.json → RegistrationSystem.sol/RegistrationSystem.abi.json} +154 -150
  180. package/out/{CoreSystem.sol/CoreSystem.abi.json.d.ts → RegistrationSystem.sol/RegistrationSystem.abi.json.d.ts} +154 -150
  181. package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -0
  182. package/out/ResourceAccess.sol/ResourceAccess.json +1 -1
  183. package/out/ResourceId.sol/ResourceIdInstance.json +1 -1
  184. package/out/ResourceId.sol/ResourceIdLib.json +1 -1
  185. package/out/ResourceIds.sol/ResourceIds.json +1 -1
  186. package/out/RevertSubscriber.sol/RevertSubscriber.json +1 -1
  187. package/out/Schema.sol/SchemaInstance.json +1 -1
  188. package/out/Schema.sol/SchemaLib.json +1 -1
  189. package/out/SchemaEncodeHelper.sol/SchemaEncodeHelper.json +1 -1
  190. package/out/Slice.sol/SliceInstance.json +1 -1
  191. package/out/Slice.sol/SliceLib.json +1 -1
  192. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json +119 -19
  193. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json.d.ts +119 -19
  194. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.json +1 -1
  195. package/out/StandardDelegationsModule.t.sol/StandardDelegationsModuleTest.json +1 -1
  196. package/out/StdAssertions.sol/StdAssertions.json +1 -1
  197. package/out/StdChains.sol/StdChains.json +1 -1
  198. package/out/StdCheats.sol/StdCheats.json +1 -1
  199. package/out/StdCheats.sol/StdCheatsSafe.json +1 -1
  200. package/out/StdError.sol/stdError.json +1 -1
  201. package/out/StdInvariant.sol/StdInvariant.json +1 -1
  202. package/out/StdJson.sol/stdJson.json +1 -1
  203. package/out/StdMath.sol/stdMath.json +1 -1
  204. package/out/StdStorage.sol/stdStorage.json +1 -1
  205. package/out/StdStorage.sol/stdStorageSafe.json +1 -1
  206. package/out/StdStyle.sol/StdStyle.json +1 -1
  207. package/out/StdUtils.sol/StdUtils.json +1 -1
  208. package/out/Storage.sol/Storage.json +1 -1
  209. package/out/StoreCore.sol/StoreCore.json +1 -1
  210. package/out/StoreCore.sol/StoreCoreInternal.json +1 -1
  211. package/out/StoreData.sol/StoreData.abi.json +16 -0
  212. package/out/StoreData.sol/StoreData.abi.json.d.ts +16 -0
  213. package/out/StoreData.sol/StoreData.json +1 -1
  214. package/out/StoreHook.sol/StoreHook.json +1 -1
  215. package/out/StoreHooks.sol/StoreHooks.json +1 -1
  216. package/out/StoreRead.sol/StoreRead.abi.json +16 -0
  217. package/out/StoreRead.sol/StoreRead.abi.json.d.ts +16 -0
  218. package/out/StoreRead.sol/StoreRead.json +1 -1
  219. package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json +149 -4
  220. package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json.d.ts +149 -4
  221. package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -1
  222. package/out/StoreSwitch.sol/StoreSwitch.json +1 -1
  223. package/out/System.sol/System.json +1 -1
  224. package/out/SystemCall.sol/SystemCall.json +1 -1
  225. package/out/SystemHook.sol/SystemHook.json +1 -1
  226. package/out/SystemHooks.sol/SystemHooks.json +1 -1
  227. package/out/SystemRegistry.sol/SystemRegistry.json +1 -1
  228. package/out/SystemSwitch.sol/SystemSwitch.json +1 -1
  229. package/out/SystemSwitch.t.sol/EchoSystem.abi.json +98 -1
  230. package/out/SystemSwitch.t.sol/EchoSystem.abi.json.d.ts +98 -1
  231. package/out/SystemSwitch.t.sol/EchoSystem.json +1 -1
  232. package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json +59 -15
  233. package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json.d.ts +59 -15
  234. package/out/SystemSwitch.t.sol/SystemSwitchTest.json +1 -1
  235. package/out/SystemboundDelegationControl.sol/SystemboundDelegationControl.json +1 -1
  236. package/out/SystemboundDelegations.sol/SystemboundDelegations.json +1 -1
  237. package/out/Systems.sol/Systems.json +1 -1
  238. package/out/Tables.sol/Tables.json +1 -1
  239. package/out/Test.sol/Test.json +1 -1
  240. package/out/TightCoder.sol/TightCoder.json +1 -1
  241. package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.json +1 -1
  242. package/out/TimeboundDelegations.sol/TimeboundDelegations.json +1 -1
  243. package/out/TokenApproval.sol/TokenApproval.json +1 -1
  244. package/out/TokenURI.sol/TokenURI.json +1 -1
  245. package/out/TotalSupply.sol/TotalSupply.json +1 -1
  246. package/out/TwoFields.sol/TwoFields.json +1 -1
  247. package/out/UniqueEntity.sol/UniqueEntity.json +1 -1
  248. package/out/UniqueEntityModule.sol/UniqueEntityModule.abi.json +121 -21
  249. package/out/UniqueEntityModule.sol/UniqueEntityModule.abi.json.d.ts +121 -21
  250. package/out/UniqueEntityModule.sol/UniqueEntityModule.json +1 -1
  251. package/out/UniqueEntityModule.t.sol/UniqueEntityModuleTest.json +1 -1
  252. package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json +68 -0
  253. package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json.d.ts +68 -0
  254. package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.json +1 -1
  255. package/out/UniqueEntitySystem.sol/UniqueEntitySystem.json +1 -1
  256. package/out/UsedKeysIndex.sol/UsedKeysIndex.json +1 -1
  257. package/out/UserDelegationControl.sol/UserDelegationControl.json +1 -1
  258. package/out/Vm.sol/Vm.json +1 -1
  259. package/out/Vm.sol/VmSafe.json +1 -1
  260. package/out/World.sol/World.abi.json +29 -2
  261. package/out/World.sol/World.abi.json.d.ts +29 -2
  262. package/out/World.sol/World.json +1 -1
  263. package/out/World.t.sol/EchoSystemHook.json +1 -1
  264. package/out/World.t.sol/IWorldTestSystem.abi.json +1 -1
  265. package/out/World.t.sol/IWorldTestSystem.abi.json.d.ts +1 -1
  266. package/out/World.t.sol/IWorldTestSystem.json +1 -1
  267. package/out/World.t.sol/PayableFallbackSystem.json +1 -1
  268. package/out/World.t.sol/RevertSystemHook.json +1 -1
  269. package/out/World.t.sol/WorldTest.abi.json +74 -6
  270. package/out/World.t.sol/WorldTest.abi.json.d.ts +74 -6
  271. package/out/World.t.sol/WorldTest.json +1 -1
  272. package/out/World.t.sol/WorldTestSystem.json +1 -1
  273. package/out/WorldContext.sol/WorldContextConsumer.json +1 -1
  274. package/out/WorldContext.sol/WorldContextConsumerLib.json +1 -1
  275. package/out/WorldContext.sol/WorldContextProviderLib.json +1 -1
  276. package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json +43 -1
  277. package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json.d.ts +43 -1
  278. package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1 -1
  279. package/out/WorldResourceId.sol/WorldResourceIdInstance.json +1 -1
  280. package/out/WorldResourceId.sol/WorldResourceIdLib.json +1 -1
  281. package/out/console.sol/console.json +1 -1
  282. package/out/console2.sol/console2.json +1 -1
  283. package/out/constants.sol/LayoutOffsets.json +1 -1
  284. package/out/interfaces/IBaseWorld.sol/IBaseWorld.abi.json +105 -7
  285. package/out/interfaces/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +105 -7
  286. package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +1 -1
  287. package/out/query.t.sol/QueryTest.abi.json +39 -6
  288. package/out/query.t.sol/QueryTest.abi.json.d.ts +39 -6
  289. package/out/query.t.sol/QueryTest.json +1 -1
  290. package/out/safeconsole.sol/safeconsole.json +1 -1
  291. package/out/src/IERC165.sol/IERC165.json +1 -1
  292. package/out/tables/Balances.sol/Balances.json +1 -1
  293. package/out/test.sol/DSTest.json +1 -1
  294. package/package.json +9 -9
  295. package/src/index.sol +1 -1
  296. package/src/interfaces/IBaseWorld.sol +1 -1
  297. package/src/interfaces/IERC20System.sol +1 -1
  298. package/src/interfaces/IPuppetFactorySystem.sol +1 -1
  299. package/src/modules/erc20-puppet/ERC20Module.sol +18 -25
  300. package/src/modules/erc20-puppet/ERC20System.sol +1 -1
  301. package/src/modules/erc20-puppet/IERC20.sol +1 -1
  302. package/src/modules/erc20-puppet/IERC20Errors.sol +1 -1
  303. package/src/modules/erc20-puppet/IERC20Events.sol +1 -1
  304. package/src/modules/erc20-puppet/IERC20Mintable.sol +1 -1
  305. package/src/modules/erc20-puppet/constants.sol +1 -2
  306. package/src/modules/erc20-puppet/registerERC20.sol +1 -1
  307. package/src/modules/erc20-puppet/tables/Allowances.sol +2 -3
  308. package/src/modules/erc20-puppet/tables/ERC20Metadata.sol +2 -3
  309. package/src/modules/erc20-puppet/tables/ERC20Registry.sol +2 -3
  310. package/src/modules/erc20-puppet/tables/TotalSupply.sol +2 -3
  311. package/src/modules/erc20-puppet/utils.sol +1 -1
  312. package/src/modules/erc721-puppet/ERC721Module.sol +18 -25
  313. package/src/modules/erc721-puppet/ERC721System.sol +1 -1
  314. package/src/modules/erc721-puppet/IERC721.sol +1 -1
  315. package/src/modules/erc721-puppet/IERC721Errors.sol +1 -1
  316. package/src/modules/erc721-puppet/IERC721Events.sol +1 -1
  317. package/src/modules/erc721-puppet/IERC721Metadata.sol +1 -1
  318. package/src/modules/erc721-puppet/IERC721Mintable.sol +1 -1
  319. package/src/modules/erc721-puppet/IERC721Receiver.sol +1 -1
  320. package/src/modules/erc721-puppet/constants.sol +1 -2
  321. package/src/modules/erc721-puppet/registerERC721.sol +1 -1
  322. package/src/modules/erc721-puppet/tables/ERC721Metadata.sol +2 -3
  323. package/src/modules/erc721-puppet/tables/ERC721Registry.sol +2 -3
  324. package/src/modules/erc721-puppet/tables/OperatorApproval.sol +2 -3
  325. package/src/modules/erc721-puppet/tables/Owners.sol +2 -3
  326. package/src/modules/erc721-puppet/tables/TokenApproval.sol +2 -3
  327. package/src/modules/erc721-puppet/tables/TokenURI.sol +2 -3
  328. package/src/modules/erc721-puppet/utils.sol +1 -1
  329. package/src/modules/keysintable/KeysInTableHook.sol +1 -1
  330. package/src/modules/keysintable/KeysInTableModule.sol +4 -10
  331. package/src/modules/keysintable/constants.sol +1 -1
  332. package/src/modules/keysintable/getKeysInTable.sol +1 -1
  333. package/src/modules/keysintable/hasKey.sol +1 -1
  334. package/src/modules/keysintable/query.sol +1 -1
  335. package/src/modules/keysintable/tables/KeysInTable.sol +4 -6
  336. package/src/modules/keysintable/tables/UsedKeysIndex.sol +4 -6
  337. package/src/modules/keyswithvalue/KeysWithValueHook.sol +1 -1
  338. package/src/modules/keyswithvalue/KeysWithValueModule.sol +19 -14
  339. package/src/modules/keyswithvalue/constants.sol +1 -1
  340. package/src/modules/keyswithvalue/getKeysWithValue.sol +1 -1
  341. package/src/modules/keyswithvalue/getTargetTableId.sol +1 -1
  342. package/src/modules/keyswithvalue/tables/KeysWithValue.sol +2 -3
  343. package/src/modules/puppet/Puppet.sol +1 -1
  344. package/src/modules/puppet/PuppetDelegationControl.sol +1 -1
  345. package/src/modules/puppet/PuppetFactorySystem.sol +1 -1
  346. package/src/modules/puppet/PuppetMaster.sol +1 -1
  347. package/src/modules/puppet/PuppetModule.sol +24 -9
  348. package/src/modules/puppet/constants.sol +4 -3
  349. package/src/modules/puppet/createPuppet.sol +1 -1
  350. package/src/modules/puppet/tables/PuppetRegistry.sol +2 -3
  351. package/src/modules/puppet/utils.sol +1 -1
  352. package/src/modules/std-delegations/CallboundDelegationControl.sol +1 -1
  353. package/src/modules/std-delegations/StandardDelegationsModule.sol +2 -6
  354. package/src/modules/std-delegations/SystemboundDelegationControl.sol +1 -1
  355. package/src/modules/std-delegations/TimeboundDelegationControl.sol +1 -1
  356. package/src/modules/std-delegations/constants.sol +1 -3
  357. package/src/modules/std-delegations/tables/CallboundDelegations.sol +4 -6
  358. package/src/modules/std-delegations/tables/SystemboundDelegations.sol +4 -6
  359. package/src/modules/std-delegations/tables/TimeboundDelegations.sol +4 -6
  360. package/src/modules/tokens/tables/Balances.sol +2 -3
  361. package/src/modules/uniqueentity/UniqueEntityModule.sol +16 -15
  362. package/src/modules/uniqueentity/UniqueEntitySystem.sol +1 -1
  363. package/src/modules/uniqueentity/constants.sol +3 -3
  364. package/src/modules/uniqueentity/getUniqueEntity.sol +2 -3
  365. package/src/modules/uniqueentity/tables/UniqueEntity.sol +2 -3
  366. package/src/modules/utils/ArrayLib.sol +2 -2
  367. package/src/utils/AccessControlLib.sol +1 -1
  368. package/src/utils/SystemSwitch.sol +7 -10
  369. package/out/CoreModule.sol/CoreModule.json +0 -1
  370. package/out/CoreSystem.sol/CoreSystem.json +0 -1
  371. package/out/ICoreSystem.sol/ICoreSystem.json +0 -1
  372. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json +0 -15
  373. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json.d.ts +0 -15
  374. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.json +0 -1
  375. package/out/world/src/IERC165.sol/IERC165.json +0 -1
  376. package/src/interfaces/IUniqueEntitySystem.sol +0 -7
  377. /package/out/{ICoreSystem.sol/ICoreSystem.abi.json → ERC165Checker.sol/ERC165Checker.abi.json} +0 -0
  378. /package/out/{world/src/IERC165.sol → IERC165.sol}/IERC165.abi.json +0 -0
  379. /package/out/{world/src/IERC165.sol → IERC165.sol}/IERC165.abi.json.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
18
18
  import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
- import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
21
 
23
22
  FieldLayout constant _fieldLayout = FieldLayout.wrap(
24
23
  0x0000000100000000000000000000000000000000000000000000000000000000
@@ -676,7 +675,7 @@ library KeysWithValue {
676
675
  * @notice Encode all of a record's fields.
677
676
  * @return The static (fixed length) data, encoded into a sequence of bytes.
678
677
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
679
- * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
678
+ * @return The dynamic (variable length) data, encoded into a sequence of bytes.
680
679
  */
681
680
  function encode(bytes32[] memory keysWithValue) internal pure returns (bytes memory, PackedCounter, bytes memory) {
682
681
  bytes memory _staticData;
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
5
5
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { DelegationControl } from "@latticexyz/world/src/DelegationControl.sol";
5
5
  import { ResourceId } from "@latticexyz/world/src/WorldResourceId.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
5
5
  import { System } from "@latticexyz/world/src/System.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
5
5
  import { SystemRegistry } from "@latticexyz/world/src/codegen/tables/SystemRegistry.sol";
@@ -1,14 +1,16 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
-
6
5
  import { Module } from "@latticexyz/world/src/Module.sol";
7
6
  import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
7
+ import { WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol";
8
+
9
+ import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
8
10
 
9
11
  import { PuppetFactorySystem } from "./PuppetFactorySystem.sol";
10
12
  import { PuppetDelegationControl } from "./PuppetDelegationControl.sol";
11
- import { MODULE_NAME, PUPPET_DELEGATION, PUPPET_FACTORY, PUPPET_TABLE_ID } from "./constants.sol";
13
+ import { PUPPET_DELEGATION, PUPPET_FACTORY, PUPPET_TABLE_ID, NAMESPACE_ID } from "./constants.sol";
12
14
 
13
15
  import { PuppetRegistry } from "./tables/PuppetRegistry.sol";
14
16
 
@@ -16,21 +18,31 @@ import { PuppetRegistry } from "./tables/PuppetRegistry.sol";
16
18
  * This module registers tables and delegation control systems required for puppet delegations
17
19
  */
18
20
  contract PuppetModule is Module {
21
+ using WorldResourceIdInstance for ResourceId;
22
+
19
23
  PuppetDelegationControl private immutable puppetDelegationControl = new PuppetDelegationControl();
20
24
  PuppetFactorySystem private immutable puppetFactorySystem = new PuppetFactorySystem();
21
25
 
22
- function getName() public pure returns (bytes16) {
23
- return MODULE_NAME;
24
- }
25
-
26
26
  function installRoot(bytes memory) public {
27
27
  IBaseWorld world = IBaseWorld(_world());
28
28
 
29
+ // Register namespace
30
+ (bool success, bytes memory returnData) = address(world).delegatecall(
31
+ abi.encodeCall(world.registerNamespace, (NAMESPACE_ID))
32
+ );
33
+ if (!success) revertWithBytes(returnData);
34
+
29
35
  // Register table
30
36
  PuppetRegistry.register(PUPPET_TABLE_ID);
31
37
 
32
- // Register system
33
- (bool success, bytes memory returnData) = address(world).delegatecall(
38
+ // Register puppet factory
39
+ (success, returnData) = address(world).delegatecall(
40
+ abi.encodeCall(world.registerSystem, (PUPPET_FACTORY, puppetFactorySystem, true))
41
+ );
42
+ if (!success) revertWithBytes(returnData);
43
+
44
+ // Register puppet delegation control
45
+ (success, returnData) = address(world).delegatecall(
34
46
  abi.encodeCall(world.registerSystem, (PUPPET_DELEGATION, puppetDelegationControl, true))
35
47
  );
36
48
  if (!success) revertWithBytes(returnData);
@@ -39,6 +51,9 @@ contract PuppetModule is Module {
39
51
  function install(bytes memory) public {
40
52
  IBaseWorld world = IBaseWorld(_world());
41
53
 
54
+ // Register namespace
55
+ world.registerNamespace(NAMESPACE_ID);
56
+
42
57
  // Register table
43
58
  PuppetRegistry.register(PUPPET_TABLE_ID);
44
59
 
@@ -1,14 +1,15 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
5
5
  import { RESOURCE_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
6
- import { RESOURCE_SYSTEM } from "@latticexyz/world/src/worldResourceTypes.sol";
6
+ import { RESOURCE_SYSTEM, RESOURCE_NAMESPACE } from "@latticexyz/world/src/worldResourceTypes.sol";
7
7
  import { ROOT_NAMESPACE } from "@latticexyz/world/src/constants.sol";
8
8
 
9
- bytes16 constant MODULE_NAME = bytes16("puppet");
10
9
  bytes14 constant NAMESPACE = bytes14("puppet");
11
10
 
11
+ ResourceId constant NAMESPACE_ID = ResourceId.wrap(bytes32(abi.encodePacked(RESOURCE_NAMESPACE, NAMESPACE)));
12
+
12
13
  ResourceId constant PUPPET_DELEGATION = ResourceId.wrap(
13
14
  bytes32(abi.encodePacked(RESOURCE_SYSTEM, NAMESPACE, bytes16("Delegation")))
14
15
  );
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
5
5
  import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
18
18
  import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
- import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
21
 
23
22
  // Import user types
24
23
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
@@ -206,7 +205,7 @@ library PuppetRegistry {
206
205
  * @notice Encode all of a record's fields.
207
206
  * @return The static (fixed length) data, encoded into a sequence of bytes.
208
207
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
209
- * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
208
+ * @return The dynamic (variable length) data, encoded into a sequence of bytes.
210
209
  */
211
210
  function encode(address puppet) internal pure returns (bytes memory, PackedCounter, bytes memory) {
212
211
  bytes memory _staticData = encodeStatic(puppet);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  function toTopic(address value) pure returns (bytes32) {
5
5
  return bytes32(uint256(uint160(value)));
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { DelegationControl } from "@latticexyz/world/src/DelegationControl.sol";
5
5
  import { ResourceId } from "@latticexyz/world/src/WorldResourceId.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
5
 
@@ -10,7 +10,7 @@ import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
10
10
  import { CallboundDelegationControl } from "./CallboundDelegationControl.sol";
11
11
  import { SystemboundDelegationControl } from "./SystemboundDelegationControl.sol";
12
12
  import { TimeboundDelegationControl } from "./TimeboundDelegationControl.sol";
13
- import { MODULE_NAME, CALLBOUND_DELEGATION, SYSTEMBOUND_DELEGATION, TIMEBOUND_DELEGATION } from "./constants.sol";
13
+ import { CALLBOUND_DELEGATION, SYSTEMBOUND_DELEGATION, TIMEBOUND_DELEGATION } from "./constants.sol";
14
14
 
15
15
  import { CallboundDelegations } from "./tables/CallboundDelegations.sol";
16
16
  import { SystemboundDelegations } from "./tables/SystemboundDelegations.sol";
@@ -24,10 +24,6 @@ contract StandardDelegationsModule is Module {
24
24
  SystemboundDelegationControl private immutable systemboundDelegationControl = new SystemboundDelegationControl();
25
25
  TimeboundDelegationControl private immutable timeboundDelegationControl = new TimeboundDelegationControl();
26
26
 
27
- function getName() public pure returns (bytes16) {
28
- return MODULE_NAME;
29
- }
30
-
31
27
  function installRoot(bytes memory) public {
32
28
  IBaseWorld world = IBaseWorld(_world());
33
29
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { DelegationControl } from "@latticexyz/world/src/DelegationControl.sol";
5
5
  import { ResourceId } from "@latticexyz/world/src/WorldResourceId.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { DelegationControl } from "@latticexyz/world/src/DelegationControl.sol";
5
5
  import { ResourceId } from "@latticexyz/world/src/WorldResourceId.sol";
@@ -1,12 +1,10 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
5
5
  import { RESOURCE_SYSTEM } from "@latticexyz/world/src/worldResourceTypes.sol";
6
6
  import { ROOT_NAMESPACE } from "@latticexyz/world/src/constants.sol";
7
7
 
8
- bytes16 constant MODULE_NAME = bytes16("stddelegations.m");
9
-
10
8
  // Callbound delegation
11
9
  ResourceId constant CALLBOUND_DELEGATION = ResourceId.wrap(
12
10
  bytes32(abi.encodePacked(RESOURCE_SYSTEM, ROOT_NAMESPACE, bytes16("callbound")))
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -18,14 +18,12 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
18
18
  import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
- import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
21
 
23
22
  // Import user types
24
23
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
25
24
 
26
- ResourceId constant _tableId = ResourceId.wrap(
27
- bytes32(abi.encodePacked(RESOURCE_TABLE, bytes14(""), bytes16("CallboundDelegat")))
28
- );
25
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "CallboundDelegat", typeId: RESOURCE_TABLE });`
26
+ ResourceId constant _tableId = ResourceId.wrap(0x7462000000000000000000000000000043616c6c626f756e6444656c65676174);
29
27
  ResourceId constant CallboundDelegationsTableId = _tableId;
30
28
 
31
29
  FieldLayout constant _fieldLayout = FieldLayout.wrap(
@@ -291,7 +289,7 @@ library CallboundDelegations {
291
289
  * @notice Encode all of a record's fields.
292
290
  * @return The static (fixed length) data, encoded into a sequence of bytes.
293
291
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
294
- * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
292
+ * @return The dynamic (variable length) data, encoded into a sequence of bytes.
295
293
  */
296
294
  function encode(uint256 availableCalls) internal pure returns (bytes memory, PackedCounter, bytes memory) {
297
295
  bytes memory _staticData = encodeStatic(availableCalls);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -18,14 +18,12 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
18
18
  import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
- import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
21
 
23
22
  // Import user types
24
23
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
25
24
 
26
- ResourceId constant _tableId = ResourceId.wrap(
27
- bytes32(abi.encodePacked(RESOURCE_TABLE, bytes14(""), bytes16("SystemboundDeleg")))
28
- );
25
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "SystemboundDeleg", typeId: RESOURCE_TABLE });`
26
+ ResourceId constant _tableId = ResourceId.wrap(0x7462000000000000000000000000000053797374656d626f756e6444656c6567);
29
27
  ResourceId constant SystemboundDelegationsTableId = _tableId;
30
28
 
31
29
  FieldLayout constant _fieldLayout = FieldLayout.wrap(
@@ -261,7 +259,7 @@ library SystemboundDelegations {
261
259
  * @notice Encode all of a record's fields.
262
260
  * @return The static (fixed length) data, encoded into a sequence of bytes.
263
261
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
264
- * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
262
+ * @return The dynamic (variable length) data, encoded into a sequence of bytes.
265
263
  */
266
264
  function encode(uint256 availableCalls) internal pure returns (bytes memory, PackedCounter, bytes memory) {
267
265
  bytes memory _staticData = encodeStatic(availableCalls);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -18,11 +18,9 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
18
18
  import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
- import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
21
 
23
- ResourceId constant _tableId = ResourceId.wrap(
24
- bytes32(abi.encodePacked(RESOURCE_TABLE, bytes14(""), bytes16("TimeboundDelegat")))
25
- );
22
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "TimeboundDelegat", typeId: RESOURCE_TABLE });`
23
+ ResourceId constant _tableId = ResourceId.wrap(0x7462000000000000000000000000000054696d65626f756e6444656c65676174);
26
24
  ResourceId constant TimeboundDelegationsTableId = _tableId;
27
25
 
28
26
  FieldLayout constant _fieldLayout = FieldLayout.wrap(
@@ -220,7 +218,7 @@ library TimeboundDelegations {
220
218
  * @notice Encode all of a record's fields.
221
219
  * @return The static (fixed length) data, encoded into a sequence of bytes.
222
220
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
223
- * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
221
+ * @return The dynamic (variable length) data, encoded into a sequence of bytes.
224
222
  */
225
223
  function encode(uint256 maxTimestamp) internal pure returns (bytes memory, PackedCounter, bytes memory) {
226
224
  bytes memory _staticData = encodeStatic(maxTimestamp);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
18
18
  import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
- import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
21
 
23
22
  FieldLayout constant _fieldLayout = FieldLayout.wrap(
24
23
  0x0020010020000000000000000000000000000000000000000000000000000000
@@ -203,7 +202,7 @@ library Balances {
203
202
  * @notice Encode all of a record's fields.
204
203
  * @return The static (fixed length) data, encoded into a sequence of bytes.
205
204
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
206
- * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
205
+ * @return The dynamic (variable length) data, encoded into a sequence of bytes.
207
206
  */
208
207
  function encode(uint256 value) internal pure returns (bytes memory, PackedCounter, bytes memory) {
209
208
  bytes memory _staticData = encodeStatic(value);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
5
  import { InstalledModules } from "@latticexyz/world/src/codegen/index.sol";
@@ -11,7 +11,7 @@ import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
11
11
  import { UniqueEntity } from "./tables/UniqueEntity.sol";
12
12
  import { UniqueEntitySystem } from "./UniqueEntitySystem.sol";
13
13
 
14
- import { MODULE_NAME, TABLE_ID, SYSTEM_ID } from "./constants.sol";
14
+ import { TABLE_ID, SYSTEM_ID, NAMESPACE_ID } from "./constants.sol";
15
15
 
16
16
  /**
17
17
  * This module creates a table that stores a nonce, and
@@ -22,24 +22,24 @@ contract UniqueEntityModule is Module {
22
22
  // known tables, we can deploy it once and register it in multiple Worlds.
23
23
  UniqueEntitySystem private immutable uniqueEntitySystem = new UniqueEntitySystem();
24
24
 
25
- function getName() public pure returns (bytes16) {
26
- return MODULE_NAME;
27
- }
28
-
29
- function installRoot(bytes memory args) public {
25
+ function installRoot(bytes memory encodedArgs) public {
30
26
  // Naive check to ensure this is only installed once
31
27
  // TODO: only revert if there's nothing to do
32
- if (InstalledModules.getModuleAddress(getName(), keccak256(args)) != address(0)) {
33
- revert Module_AlreadyInstalled();
34
- }
28
+ requireNotInstalled(__self, encodedArgs);
35
29
 
36
30
  IBaseWorld world = IBaseWorld(_world());
37
31
 
32
+ // Register namespace
33
+ (bool success, bytes memory data) = address(world).delegatecall(
34
+ abi.encodeCall(world.registerNamespace, (NAMESPACE_ID))
35
+ );
36
+ if (!success) revertWithBytes(data);
37
+
38
38
  // Register table
39
39
  UniqueEntity._register(TABLE_ID);
40
40
 
41
41
  // Register system
42
- (bool success, bytes memory data) = address(world).delegatecall(
42
+ (success, data) = address(world).delegatecall(
43
43
  abi.encodeCall(world.registerSystem, (SYSTEM_ID, uniqueEntitySystem, true))
44
44
  );
45
45
  if (!success) revertWithBytes(data);
@@ -51,15 +51,16 @@ contract UniqueEntityModule is Module {
51
51
  if (!success) revertWithBytes(data);
52
52
  }
53
53
 
54
- function install(bytes memory args) public {
54
+ function install(bytes memory encodedArgs) public {
55
55
  // Naive check to ensure this is only installed once
56
56
  // TODO: only revert if there's nothing to do
57
- if (InstalledModules.getModuleAddress(getName(), keccak256(args)) != address(0)) {
58
- revert Module_AlreadyInstalled();
59
- }
57
+ requireNotInstalled(__self, encodedArgs);
60
58
 
61
59
  IBaseWorld world = IBaseWorld(_world());
62
60
 
61
+ // Register namespace
62
+ world.registerNamespace(NAMESPACE_ID);
63
+
63
64
  // Register table
64
65
  UniqueEntity.register(TABLE_ID);
65
66
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { System } from "@latticexyz/world/src/System.sol";
5
5
  import { TABLE_ID } from "./constants.sol";
@@ -1,13 +1,13 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { ResourceId } from "@latticexyz/world/src/WorldResourceId.sol";
5
- import { RESOURCE_TABLE, RESOURCE_SYSTEM } from "@latticexyz/world/src/worldResourceTypes.sol";
5
+ import { RESOURCE_TABLE, RESOURCE_SYSTEM, RESOURCE_NAMESPACE } from "@latticexyz/world/src/worldResourceTypes.sol";
6
6
 
7
7
  bytes14 constant NAMESPACE = bytes14("uniqueEntity");
8
- bytes16 constant MODULE_NAME = bytes16("uniqueEntity");
9
8
  bytes16 constant SYSTEM_NAME = bytes16("system");
10
9
  bytes16 constant TABLE_NAME = bytes16("table");
11
10
 
11
+ ResourceId constant NAMESPACE_ID = ResourceId.wrap(bytes32(abi.encodePacked(RESOURCE_NAMESPACE, NAMESPACE)));
12
12
  ResourceId constant TABLE_ID = ResourceId.wrap(bytes32(abi.encodePacked(RESOURCE_TABLE, NAMESPACE, TABLE_NAME)));
13
13
  ResourceId constant SYSTEM_ID = ResourceId.wrap((bytes32(abi.encodePacked(RESOURCE_SYSTEM, NAMESPACE, SYSTEM_NAME))));
@@ -1,9 +1,8 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
5
 
6
- import { IUniqueEntitySystem } from "../../interfaces/IUniqueEntitySystem.sol";
7
6
  import { UniqueEntitySystem } from "./UniqueEntitySystem.sol";
8
7
 
9
8
  import { SystemSwitch } from "../../utils/SystemSwitch.sol";
@@ -23,5 +22,5 @@ function getUniqueEntity() returns (bytes32 uniqueEntity) {
23
22
  * Increment and get an entity nonce.
24
23
  */
25
24
  function getUniqueEntity(IBaseWorld world) returns (bytes32 uniqueEntity) {
26
- return IUniqueEntitySystem(address(world)).uniqueEntity_system_getUniqueEntity();
25
+ return abi.decode(world.call(SYSTEM_ID, abi.encodeCall(UniqueEntitySystem.getUniqueEntity, ())), (bytes32));
27
26
  }
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
@@ -18,7 +18,6 @@ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.s
18
18
  import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
- import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
21
 
23
22
  FieldLayout constant _fieldLayout = FieldLayout.wrap(
24
23
  0x0020010020000000000000000000000000000000000000000000000000000000
@@ -245,7 +244,7 @@ library UniqueEntity {
245
244
  * @notice Encode all of a record's fields.
246
245
  * @return The static (fixed length) data, encoded into a sequence of bytes.
247
246
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
248
- * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
247
+ * @return The dynamic (variable length) data, encoded into a sequence of bytes.
249
248
  */
250
249
  function encode(uint256 value) internal pure returns (bytes memory, PackedCounter, bytes memory) {
251
250
  bytes memory _staticData = encodeStatic(value);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  library ArrayLib {
5
5
  function equal(bytes32[] memory arr1, bytes32[] memory arr2) internal pure returns (bool) {
@@ -36,7 +36,7 @@ library ArrayLib {
36
36
 
37
37
  function filter(bytes32[] memory arr, bytes32 element) internal pure returns (bytes32[] memory) {
38
38
  bytes32[] memory filtered = new bytes32[](arr.length);
39
- uint256 filteredIndex = 0;
39
+ uint256 filteredIndex;
40
40
  for (uint256 i; i < arr.length; i++) {
41
41
  if (arr[i] != element) {
42
42
  filtered[filteredIndex] = arr[i];
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { ResourceId, WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol";
5
5
  import { IWorldErrors } from "@latticexyz/world/src/IWorldErrors.sol";
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.21;
2
+ pragma solidity >=0.8.24;
3
3
 
4
4
  import { Hook } from "@latticexyz/store/src/Hook.sol";
5
5
  import { Bytes } from "@latticexyz/store/src/Bytes.sol";
@@ -11,6 +11,7 @@ import { AccessControl } from "@latticexyz/world/src/AccessControl.sol";
11
11
  import { ROOT_NAMESPACE } from "@latticexyz/world/src/constants.sol";
12
12
  import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
13
13
  import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "@latticexyz/world/src/systemHookTypes.sol";
14
+ import { SystemCall } from "@latticexyz/world/src/SystemCall.sol";
14
15
 
15
16
  import { IWorldErrors } from "@latticexyz/world/src/IWorldErrors.sol";
16
17
  import { ISystemHook } from "@latticexyz/world/src/ISystemHook.sol";
@@ -39,17 +40,13 @@ library SystemSwitch {
39
40
  function call(ResourceId systemId, bytes memory callData) internal returns (bytes memory returnData) {
40
41
  address worldAddress = WorldContextConsumerLib._world();
41
42
 
42
- // If we're in the World context, call the system directly via delegatecall
43
+ // If we're in the World context, call via the internal library
43
44
  if (address(this) == worldAddress) {
44
- (address systemAddress, ) = Systems.get(systemId);
45
- // Check if the system exists
46
- if (systemAddress == address(0)) revert IWorldErrors.World_ResourceNotFound(systemId, systemId.toString());
47
-
48
45
  bool success;
49
- (success, returnData) = WorldContextProviderLib.delegatecallWithContext({
50
- msgSender: WorldContextConsumerLib._msgSender(),
51
- msgValue: WorldContextConsumerLib._msgValue(),
52
- target: systemAddress,
46
+ (success, returnData) = SystemCall.call({
47
+ caller: WorldContextConsumerLib._msgSender(),
48
+ value: 0,
49
+ systemId: systemId,
53
50
  callData: callData
54
51
  });
55
52