@latticexyz/world-modules 2.0.0-main-711f6e2a → 2.0.0-march-19-skystrife-playtest-f0a343b1

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 (407) hide show
  1. package/out/AccessControl.sol/AccessControl.json +1 -1
  2. package/out/AccessControlLib.sol/AccessControlLib.json +1 -1
  3. package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json +0 -55
  4. package/out/AccessManagementSystem.sol/AccessManagementSystem.abi.json.d.ts +0 -55
  5. package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
  6. package/out/AddressArray.sol/AddressArray.json +1 -1
  7. package/out/Allowances.sol/Allowances.json +1 -1
  8. package/out/ArrayLib.sol/ArrayLib.json +1 -1
  9. package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json +0 -16
  10. package/out/BalanceTransferSystem.sol/BalanceTransferSystem.abi.json.d.ts +0 -16
  11. package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
  12. package/out/Balances.sol/Balances.json +1 -1
  13. package/out/Base.sol/CommonBase.json +1 -1
  14. package/out/Base.sol/ScriptBase.json +1 -1
  15. package/out/Base.sol/TestBase.json +1 -1
  16. package/out/BatchCallSystem.sol/BatchCallSystem.abi.json +0 -5
  17. package/out/BatchCallSystem.sol/BatchCallSystem.abi.json.d.ts +0 -5
  18. package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
  19. package/out/Bool.sol/Bool.json +1 -1
  20. package/out/Bytes.sol/Bytes.json +1 -1
  21. package/out/CallboundDelegationControl.sol/CallboundDelegationControl.json +1 -1
  22. package/out/CallboundDelegations.sol/CallboundDelegations.json +1 -1
  23. package/out/{InitModule.sol/InitModule.abi.json → CoreModule.sol/CoreModule.abi.json} +23 -149
  24. package/out/{InitModule.sol/InitModule.abi.json.d.ts → CoreModule.sol/CoreModule.abi.json.d.ts} +23 -149
  25. package/out/CoreModule.sol/CoreModule.json +1 -0
  26. package/out/{RegistrationSystem.sol/RegistrationSystem.abi.json → CoreSystem.sol/CoreSystem.abi.json} +157 -167
  27. package/out/{RegistrationSystem.sol/RegistrationSystem.abi.json.d.ts → CoreSystem.sol/CoreSystem.abi.json.d.ts} +157 -167
  28. package/out/CoreSystem.sol/CoreSystem.json +1 -0
  29. package/out/DecodeSlice.sol/DecodeSlice.json +1 -1
  30. package/out/Delegation.sol/Delegation.json +1 -1
  31. package/out/DelegationControl.sol/DelegationControl.json +1 -1
  32. package/out/DelegationControlMock.sol/DelegationControlMock.json +1 -1
  33. package/out/ERC20.t.sol/ERC20Test.json +1 -1
  34. package/out/ERC20Metadata.sol/ERC20Metadata.json +1 -1
  35. package/out/ERC20Module.sol/ERC20Module.abi.json +24 -124
  36. package/out/ERC20Module.sol/ERC20Module.abi.json.d.ts +24 -124
  37. package/out/ERC20Module.sol/ERC20Module.json +1 -1
  38. package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json +8 -121
  39. package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.abi.json.d.ts +8 -121
  40. package/out/ERC20Module.sol/ERC20ModuleRegistrationLibrary.json +1 -1
  41. package/out/ERC20Registry.sol/ERC20Registry.json +1 -1
  42. package/out/ERC20System.sol/ERC20System.json +1 -1
  43. package/out/ERC721.t.sol/ERC721Recipient.json +1 -1
  44. package/out/ERC721.t.sol/ERC721Test.abi.json +1 -1
  45. package/out/ERC721.t.sol/ERC721Test.abi.json.d.ts +1 -1
  46. package/out/ERC721.t.sol/ERC721Test.json +1 -1
  47. package/out/ERC721.t.sol/ERC721TokenReceiver.json +1 -1
  48. package/out/ERC721.t.sol/NonERC721Recipient.json +1 -1
  49. package/out/ERC721.t.sol/RevertingERC721Recipient.json +1 -1
  50. package/out/ERC721.t.sol/WrongReturnDataERC721Recipient.json +1 -1
  51. package/out/ERC721Metadata.sol/ERC721Metadata.json +1 -1
  52. package/out/ERC721Module.sol/ERC721Module.abi.json +24 -124
  53. package/out/ERC721Module.sol/ERC721Module.abi.json.d.ts +24 -124
  54. package/out/ERC721Module.sol/ERC721Module.json +1 -1
  55. package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json +8 -121
  56. package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.abi.json.d.ts +8 -121
  57. package/out/ERC721Module.sol/ERC721ModuleRegistrationLibrary.json +1 -1
  58. package/out/ERC721Registry.sol/ERC721Registry.json +1 -1
  59. package/out/ERC721System.sol/ERC721System.json +1 -1
  60. package/out/EchoSubscriber.sol/EchoSubscriber.json +1 -1
  61. package/out/EncodeArray.sol/EncodeArray.json +1 -1
  62. package/out/FieldLayout.sol/FieldLayoutInstance.json +1 -1
  63. package/out/FieldLayout.sol/FieldLayoutLib.abi.json +23 -1
  64. package/out/FieldLayout.sol/FieldLayoutLib.abi.json.d.ts +23 -0
  65. package/out/FieldLayout.sol/FieldLayoutLib.json +1 -1
  66. package/out/FieldLayoutEncodeHelper.sol/FieldLayoutEncodeHelper.json +1 -1
  67. package/out/FunctionSelectors.sol/FunctionSelectors.json +1 -1
  68. package/out/FunctionSignatures.sol/FunctionSignatures.json +1 -1
  69. package/out/GasReporter.sol/GasReporter.json +1 -1
  70. package/out/Hook.sol/HookInstance.json +1 -1
  71. package/out/Hook.sol/HookLib.json +1 -1
  72. package/out/Hooks.sol/Hooks.json +1 -1
  73. package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json +0 -13
  74. package/out/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json.d.ts +0 -13
  75. package/out/IAccessManagementSystem.sol/IAccessManagementSystem.json +1 -1
  76. package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.json +1 -1
  77. package/out/IBaseWorld.sol/IBaseWorld.abi.json +5 -230
  78. package/out/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +5 -230
  79. package/out/IBaseWorld.sol/IBaseWorld.json +1 -1
  80. package/out/IBatchCallSystem.sol/IBatchCallSystem.json +1 -1
  81. package/out/ICoreSystem.sol/ICoreSystem.json +1 -0
  82. package/out/IDelegationControl.sol/IDelegationControl.json +1 -1
  83. package/out/IERC20.sol/IERC20.json +1 -1
  84. package/out/IERC20Errors.sol/IERC20Errors.json +1 -1
  85. package/out/IERC20Events.sol/IERC20Events.json +1 -1
  86. package/out/IERC20Mintable.sol/IERC20Mintable.json +1 -1
  87. package/out/IERC20System.sol/IERC20System.json +1 -1
  88. package/out/IERC721.sol/IERC721.json +1 -1
  89. package/out/IERC721Errors.sol/IERC721Errors.json +1 -1
  90. package/out/IERC721Events.sol/IERC721Events.json +1 -1
  91. package/out/IERC721Metadata.sol/IERC721Metadata.json +1 -1
  92. package/out/IERC721Mintable.sol/IERC721Mintable.json +1 -1
  93. package/out/IERC721Receiver.sol/IERC721Receiver.json +1 -1
  94. package/out/IModule.sol/IModule.abi.json +17 -4
  95. package/out/IModule.sol/IModule.abi.json.d.ts +17 -4
  96. package/out/IModule.sol/IModule.json +1 -1
  97. package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.abi.json +1 -1
  98. package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.abi.json.d.ts +1 -1
  99. package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.json +1 -1
  100. package/out/IMulticall3.sol/IMulticall3.json +1 -1
  101. package/out/IPuppetFactorySystem.sol/IPuppetFactorySystem.json +1 -1
  102. package/out/IStore.sol/IStore.abi.json +3 -191
  103. package/out/IStore.sol/IStore.abi.json.d.ts +3 -191
  104. package/out/IStore.sol/IStore.json +1 -1
  105. package/out/IStoreData.sol/IStoreData.abi.json +0 -6
  106. package/out/IStoreData.sol/IStoreData.abi.json.d.ts +0 -6
  107. package/out/IStoreData.sol/IStoreData.json +1 -1
  108. package/out/IStoreErrors.sol/IStoreErrors.abi.json +3 -51
  109. package/out/IStoreErrors.sol/IStoreErrors.abi.json.d.ts +3 -51
  110. package/out/IStoreErrors.sol/IStoreErrors.json +1 -1
  111. package/out/IStoreEvents.sol/IStoreEvents.abi.json +0 -19
  112. package/out/IStoreEvents.sol/IStoreEvents.abi.json.d.ts +0 -19
  113. package/out/IStoreEvents.sol/IStoreEvents.json +1 -1
  114. package/out/IStoreHook.sol/IStoreHook.json +1 -1
  115. package/out/IStoreRead.sol/IStoreRead.json +1 -1
  116. package/out/IStoreRegistration.sol/IStoreRegistration.json +1 -1
  117. package/out/IStoreWrite.sol/IStoreWrite.abi.json +0 -19
  118. package/out/IStoreWrite.sol/IStoreWrite.abi.json.d.ts +0 -19
  119. package/out/IStoreWrite.sol/IStoreWrite.json +1 -1
  120. package/out/ISystemHook.sol/ISystemHook.json +1 -1
  121. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json +15 -0
  122. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json.d.ts +15 -0
  123. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.json +1 -0
  124. package/out/IWorldContextConsumer.sol/IWorldContextConsumer.json +1 -1
  125. package/out/IWorldErrors.sol/IWorldErrors.abi.json +0 -11
  126. package/out/IWorldErrors.sol/IWorldErrors.abi.json.d.ts +0 -11
  127. package/out/IWorldErrors.sol/IWorldErrors.json +1 -1
  128. package/out/IWorldKernel.sol/IWorldCall.json +1 -1
  129. package/out/IWorldKernel.sol/IWorldKernel.abi.json +2 -39
  130. package/out/IWorldKernel.sol/IWorldKernel.abi.json.d.ts +2 -39
  131. package/out/IWorldKernel.sol/IWorldKernel.json +1 -1
  132. package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json +1 -1
  133. package/out/IWorldKernel.sol/IWorldModuleInstallation.abi.json.d.ts +1 -1
  134. package/out/IWorldKernel.sol/IWorldModuleInstallation.json +1 -1
  135. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json +4 -30
  136. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json.d.ts +4 -30
  137. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -1
  138. package/out/InstalledModules.sol/InstalledModules.json +1 -1
  139. package/out/KeysInTable.sol/KeysInTable.json +1 -1
  140. package/out/KeysInTableHook.sol/KeysInTableHook.abi.json +0 -22
  141. package/out/KeysInTableHook.sol/KeysInTableHook.abi.json.d.ts +0 -22
  142. package/out/KeysInTableHook.sol/KeysInTableHook.json +1 -1
  143. package/out/KeysInTableModule.sol/KeysInTableModule.abi.json +32 -3
  144. package/out/KeysInTableModule.sol/KeysInTableModule.abi.json.d.ts +32 -3
  145. package/out/KeysInTableModule.sol/KeysInTableModule.json +1 -1
  146. package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json +8 -41
  147. package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.abi.json.d.ts +8 -41
  148. package/out/KeysInTableModule.t.sol/KeysInTableModuleTest.json +1 -1
  149. package/out/KeysWithValue.sol/KeysWithValue.json +1 -1
  150. package/out/KeysWithValueHook.sol/KeysWithValueHook.abi.json +0 -6
  151. package/out/KeysWithValueHook.sol/KeysWithValueHook.abi.json.d.ts +0 -6
  152. package/out/KeysWithValueHook.sol/KeysWithValueHook.json +1 -1
  153. package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json +32 -3
  154. package/out/KeysWithValueModule.sol/KeysWithValueModule.abi.json.d.ts +32 -3
  155. package/out/KeysWithValueModule.sol/KeysWithValueModule.json +1 -1
  156. package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json +8 -41
  157. package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.abi.json.d.ts +8 -41
  158. package/out/KeysWithValueModule.t.sol/KeysWithValueModuleTest.json +1 -1
  159. package/out/Memory.sol/Memory.json +1 -1
  160. package/out/Module.sol/Module.abi.json +17 -4
  161. package/out/Module.sol/Module.abi.json.d.ts +17 -4
  162. package/out/Module.sol/Module.json +1 -1
  163. package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json +1 -6
  164. package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.abi.json.d.ts +1 -6
  165. package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +1 -1
  166. package/out/NamespaceDelegationControl.sol/NamespaceDelegationControl.json +1 -1
  167. package/out/NamespaceOwner.sol/NamespaceOwner.json +1 -1
  168. package/out/OperatorApproval.sol/OperatorApproval.json +1 -1
  169. package/out/Owners.sol/Owners.json +1 -1
  170. package/out/PackedCounter.sol/PackedCounterInstance.abi.json +13 -1
  171. package/out/PackedCounter.sol/PackedCounterInstance.json +1 -1
  172. package/out/PackedCounter.sol/PackedCounterLib.json +1 -1
  173. package/out/Puppet.sol/Puppet.json +1 -1
  174. package/out/PuppetDelegationControl.sol/PuppetDelegationControl.json +1 -1
  175. package/out/PuppetFactorySystem.sol/PuppetFactorySystem.json +1 -1
  176. package/out/PuppetMaster.sol/PuppetMaster.json +1 -1
  177. package/out/PuppetModule.sol/PuppetModule.abi.json +23 -123
  178. package/out/PuppetModule.sol/PuppetModule.abi.json.d.ts +23 -123
  179. package/out/PuppetModule.sol/PuppetModule.json +1 -1
  180. package/out/PuppetModule.t.sol/PuppetModuleTest.abi.json +0 -14
  181. package/out/PuppetModule.t.sol/PuppetModuleTest.abi.json.d.ts +0 -14
  182. package/out/PuppetModule.t.sol/PuppetModuleTest.json +1 -1
  183. package/out/PuppetModule.t.sol/PuppetTestSystem.json +1 -1
  184. package/out/PuppetRegistry.sol/PuppetRegistry.json +1 -1
  185. package/out/ResourceAccess.sol/ResourceAccess.json +1 -1
  186. package/out/ResourceId.sol/ResourceIdInstance.json +1 -1
  187. package/out/ResourceId.sol/ResourceIdLib.json +1 -1
  188. package/out/ResourceIds.sol/ResourceIds.json +1 -1
  189. package/out/RevertSubscriber.sol/RevertSubscriber.json +1 -1
  190. package/out/Schema.sol/SchemaInstance.json +1 -1
  191. package/out/Schema.sol/SchemaLib.abi.json +18 -1
  192. package/out/{ISchemaErrors.sol/ISchemaErrors.abi.json.d.ts → Schema.sol/SchemaLib.abi.json.d.ts} +2 -2
  193. package/out/Schema.sol/SchemaLib.json +1 -1
  194. package/out/SchemaEncodeHelper.sol/SchemaEncodeHelper.json +1 -1
  195. package/out/Slice.sol/SliceInstance.json +1 -1
  196. package/out/Slice.sol/SliceLib.abi.json +23 -1
  197. package/out/Slice.sol/SliceLib.json +1 -1
  198. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json +23 -123
  199. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.abi.json.d.ts +23 -123
  200. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.json +1 -1
  201. package/out/StandardDelegationsModule.t.sol/StandardDelegationsModuleTest.json +1 -1
  202. package/out/StdAssertions.sol/StdAssertions.json +1 -1
  203. package/out/StdChains.sol/StdChains.json +1 -1
  204. package/out/StdCheats.sol/StdCheats.json +1 -1
  205. package/out/StdCheats.sol/StdCheatsSafe.json +1 -1
  206. package/out/StdError.sol/stdError.json +1 -1
  207. package/out/StdInvariant.sol/StdInvariant.json +1 -1
  208. package/out/StdJson.sol/stdJson.json +1 -1
  209. package/out/StdMath.sol/stdMath.json +1 -1
  210. package/out/StdStorage.sol/stdStorage.json +1 -1
  211. package/out/StdStorage.sol/stdStorageSafe.json +1 -1
  212. package/out/StdStyle.sol/StdStyle.json +1 -1
  213. package/out/StdUtils.sol/StdUtils.json +1 -1
  214. package/out/Storage.sol/Storage.json +1 -1
  215. package/out/StoreCore.sol/StoreCore.abi.json +132 -1
  216. package/out/StoreCore.sol/StoreCore.abi.json.d.ts +132 -0
  217. package/out/StoreCore.sol/StoreCore.json +1 -1
  218. package/out/StoreCore.sol/StoreCoreInternal.json +1 -1
  219. package/out/StoreData.sol/StoreData.abi.json +0 -22
  220. package/out/StoreData.sol/StoreData.abi.json.d.ts +0 -22
  221. package/out/StoreData.sol/StoreData.json +1 -1
  222. package/out/StoreHook.sol/StoreHook.json +1 -1
  223. package/out/StoreHooks.sol/StoreHooks.json +1 -1
  224. package/out/StoreRead.sol/StoreRead.abi.json +0 -16
  225. package/out/StoreRead.sol/StoreRead.abi.json.d.ts +0 -16
  226. package/out/StoreRead.sol/StoreRead.json +1 -1
  227. package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json +8 -159
  228. package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.abi.json.d.ts +8 -159
  229. package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -1
  230. package/out/StoreSwitch.sol/StoreSwitch.json +1 -1
  231. package/out/System.sol/System.json +1 -1
  232. package/out/SystemCall.sol/SystemCall.json +1 -1
  233. package/out/SystemHook.sol/SystemHook.json +1 -1
  234. package/out/SystemHooks.sol/SystemHooks.json +1 -1
  235. package/out/SystemRegistry.sol/SystemRegistry.json +1 -1
  236. package/out/SystemSwitch.sol/SystemSwitch.json +1 -1
  237. package/out/SystemSwitch.t.sol/EchoSystem.abi.json +1 -98
  238. package/out/SystemSwitch.t.sol/EchoSystem.abi.json.d.ts +1 -98
  239. package/out/SystemSwitch.t.sol/EchoSystem.json +1 -1
  240. package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json +15 -43
  241. package/out/SystemSwitch.t.sol/SystemSwitchTest.abi.json.d.ts +15 -43
  242. package/out/SystemSwitch.t.sol/SystemSwitchTest.json +1 -1
  243. package/out/SystemboundDelegationControl.sol/SystemboundDelegationControl.json +1 -1
  244. package/out/SystemboundDelegations.sol/SystemboundDelegations.json +1 -1
  245. package/out/Systems.sol/Systems.json +1 -1
  246. package/out/Tables.sol/Tables.json +1 -1
  247. package/out/Test.sol/Test.json +1 -1
  248. package/out/TightCoder.sol/TightCoder.json +1 -1
  249. package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.json +1 -1
  250. package/out/TimeboundDelegations.sol/TimeboundDelegations.json +1 -1
  251. package/out/TokenApproval.sol/TokenApproval.json +1 -1
  252. package/out/TokenURI.sol/TokenURI.json +1 -1
  253. package/out/TotalSupply.sol/TotalSupply.json +1 -1
  254. package/out/TwoFields.sol/TwoFields.json +1 -1
  255. package/out/UniqueEntity.sol/UniqueEntity.json +1 -1
  256. package/out/UniqueEntityModule.sol/UniqueEntityModule.abi.json +25 -125
  257. package/out/UniqueEntityModule.sol/UniqueEntityModule.abi.json.d.ts +25 -125
  258. package/out/UniqueEntityModule.sol/UniqueEntityModule.json +1 -1
  259. package/out/UniqueEntityModule.t.sol/UniqueEntityModuleTest.json +1 -1
  260. package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json +0 -68
  261. package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.abi.json.d.ts +0 -68
  262. package/out/UniqueEntityModule.t.sol/UniqueEntityTestSystem.json +1 -1
  263. package/out/UniqueEntitySystem.sol/UniqueEntitySystem.json +1 -1
  264. package/out/UsedKeysIndex.sol/UsedKeysIndex.json +1 -1
  265. package/out/UserDelegationControl.sol/UserDelegationControl.json +1 -1
  266. package/out/Vm.sol/Vm.json +1 -1
  267. package/out/Vm.sol/VmSafe.json +1 -1
  268. package/out/World.sol/World.abi.json +124 -53
  269. package/out/World.sol/World.abi.json.d.ts +124 -53
  270. package/out/World.sol/World.json +1 -1
  271. package/out/World.t.sol/EchoSystemHook.json +1 -1
  272. package/out/World.t.sol/IWorldTestSystem.abi.json +1 -1
  273. package/out/World.t.sol/IWorldTestSystem.abi.json.d.ts +1 -1
  274. package/out/World.t.sol/IWorldTestSystem.json +1 -1
  275. package/out/World.t.sol/PayableFallbackSystem.json +1 -1
  276. package/out/World.t.sol/RevertSystemHook.json +1 -1
  277. package/out/World.t.sol/WorldTest.abi.json +8 -76
  278. package/out/World.t.sol/WorldTest.abi.json.d.ts +8 -76
  279. package/out/World.t.sol/WorldTest.json +1 -1
  280. package/out/World.t.sol/WorldTestSystem.json +1 -1
  281. package/out/WorldContext.sol/WorldContextConsumer.json +1 -1
  282. package/out/WorldContext.sol/WorldContextConsumerLib.json +1 -1
  283. package/out/WorldContext.sol/WorldContextProviderLib.json +1 -1
  284. package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json +4 -52
  285. package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json.d.ts +4 -52
  286. package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1 -1
  287. package/out/WorldResourceId.sol/WorldResourceIdInstance.json +1 -1
  288. package/out/WorldResourceId.sol/WorldResourceIdLib.json +1 -1
  289. package/out/console.sol/console.json +1 -1
  290. package/out/console2.sol/console2.json +1 -1
  291. package/out/constants.sol/LayoutOffsets.json +1 -1
  292. package/out/interfaces/IBaseWorld.sol/IBaseWorld.abi.json +10 -274
  293. package/out/interfaces/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +10 -274
  294. package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +1 -1
  295. package/out/query.t.sol/QueryTest.abi.json +8 -41
  296. package/out/query.t.sol/QueryTest.abi.json.d.ts +8 -41
  297. package/out/query.t.sol/QueryTest.json +1 -1
  298. package/out/safeconsole.sol/safeconsole.json +1 -1
  299. package/out/src/IERC165.sol/IERC165.json +1 -1
  300. package/out/tables/Balances.sol/Balances.json +1 -1
  301. package/out/test.sol/DSTest.json +1 -1
  302. package/out/world/src/IERC165.sol/IERC165.json +1 -1
  303. package/package.json +9 -9
  304. package/src/index.sol +6 -6
  305. package/src/interfaces/IBaseWorld.sol +4 -3
  306. package/src/interfaces/IERC20System.sol +1 -2
  307. package/src/interfaces/IPuppetFactorySystem.sol +1 -2
  308. package/src/interfaces/IUniqueEntitySystem.sol +7 -0
  309. package/src/modules/erc20-puppet/ERC20Module.sol +25 -16
  310. package/src/modules/erc20-puppet/ERC20System.sol +1 -1
  311. package/src/modules/erc20-puppet/IERC20.sol +1 -1
  312. package/src/modules/erc20-puppet/IERC20Errors.sol +1 -1
  313. package/src/modules/erc20-puppet/IERC20Events.sol +1 -1
  314. package/src/modules/erc20-puppet/IERC20Mintable.sol +1 -1
  315. package/src/modules/erc20-puppet/constants.sol +2 -1
  316. package/src/modules/erc20-puppet/registerERC20.sol +1 -1
  317. package/src/modules/erc20-puppet/tables/Allowances.sol +43 -12
  318. package/src/modules/erc20-puppet/tables/ERC20Metadata.sol +44 -13
  319. package/src/modules/erc20-puppet/tables/ERC20Registry.sol +42 -12
  320. package/src/modules/erc20-puppet/tables/TotalSupply.sol +41 -12
  321. package/src/modules/erc20-puppet/utils.sol +1 -1
  322. package/src/modules/erc721-puppet/ERC721Module.sol +25 -16
  323. package/src/modules/erc721-puppet/ERC721System.sol +1 -1
  324. package/src/modules/erc721-puppet/IERC721.sol +1 -1
  325. package/src/modules/erc721-puppet/IERC721Errors.sol +1 -1
  326. package/src/modules/erc721-puppet/IERC721Events.sol +1 -1
  327. package/src/modules/erc721-puppet/IERC721Metadata.sol +1 -2
  328. package/src/modules/erc721-puppet/IERC721Mintable.sol +1 -1
  329. package/src/modules/erc721-puppet/IERC721Receiver.sol +1 -2
  330. package/src/modules/erc721-puppet/constants.sol +2 -1
  331. package/src/modules/erc721-puppet/registerERC721.sol +1 -1
  332. package/src/modules/erc721-puppet/tables/ERC721Metadata.sol +43 -12
  333. package/src/modules/erc721-puppet/tables/ERC721Registry.sol +42 -12
  334. package/src/modules/erc721-puppet/tables/OperatorApproval.sol +43 -12
  335. package/src/modules/erc721-puppet/tables/Owners.sol +42 -12
  336. package/src/modules/erc721-puppet/tables/TokenApproval.sol +42 -12
  337. package/src/modules/erc721-puppet/tables/TokenURI.sol +42 -12
  338. package/src/modules/erc721-puppet/utils.sol +1 -1
  339. package/src/modules/keysintable/KeysInTableHook.sol +1 -1
  340. package/src/modules/keysintable/KeysInTableModule.sol +23 -17
  341. package/src/modules/keysintable/constants.sol +1 -1
  342. package/src/modules/keysintable/getKeysInTable.sol +1 -1
  343. package/src/modules/keysintable/hasKey.sol +1 -1
  344. package/src/modules/keysintable/query.sol +1 -1
  345. package/src/modules/keysintable/tables/KeysInTable.sol +51 -15
  346. package/src/modules/keysintable/tables/UsedKeysIndex.sol +51 -17
  347. package/src/modules/keyswithvalue/KeysWithValueHook.sol +1 -1
  348. package/src/modules/keyswithvalue/KeysWithValueModule.sol +17 -22
  349. package/src/modules/keyswithvalue/constants.sol +1 -1
  350. package/src/modules/keyswithvalue/getKeysWithValue.sol +1 -1
  351. package/src/modules/keyswithvalue/getTargetTableId.sol +1 -1
  352. package/src/modules/keyswithvalue/tables/KeysWithValue.sol +43 -13
  353. package/src/modules/puppet/Puppet.sol +1 -1
  354. package/src/modules/puppet/PuppetDelegationControl.sol +1 -1
  355. package/src/modules/puppet/PuppetFactorySystem.sol +1 -1
  356. package/src/modules/puppet/PuppetMaster.sol +1 -1
  357. package/src/modules/puppet/PuppetModule.sol +9 -24
  358. package/src/modules/puppet/constants.sol +3 -4
  359. package/src/modules/puppet/createPuppet.sol +1 -1
  360. package/src/modules/puppet/tables/PuppetRegistry.sol +42 -12
  361. package/src/modules/puppet/utils.sol +1 -1
  362. package/src/modules/std-delegations/CallboundDelegationControl.sol +1 -1
  363. package/src/modules/std-delegations/StandardDelegationsModule.sol +6 -2
  364. package/src/modules/std-delegations/SystemboundDelegationControl.sol +1 -1
  365. package/src/modules/std-delegations/TimeboundDelegationControl.sol +1 -1
  366. package/src/modules/std-delegations/constants.sol +3 -1
  367. package/src/modules/std-delegations/tables/CallboundDelegations.sol +49 -14
  368. package/src/modules/std-delegations/tables/SystemboundDelegations.sol +48 -14
  369. package/src/modules/std-delegations/tables/TimeboundDelegations.sol +47 -14
  370. package/src/modules/tokens/tables/Balances.sol +42 -12
  371. package/src/modules/uniqueentity/UniqueEntityModule.sol +15 -16
  372. package/src/modules/uniqueentity/UniqueEntitySystem.sol +1 -1
  373. package/src/modules/uniqueentity/constants.sol +3 -3
  374. package/src/modules/uniqueentity/getUniqueEntity.sol +3 -2
  375. package/src/modules/uniqueentity/tables/UniqueEntity.sol +42 -13
  376. package/src/modules/utils/ArrayLib.sol +2 -2
  377. package/src/utils/AccessControlLib.sol +1 -2
  378. package/src/utils/SystemSwitch.sol +10 -8
  379. package/dist/mud.config.d.ts +0 -256
  380. package/out/ERC165Checker.sol/ERC165Checker.json +0 -1
  381. package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.abi.json +0 -88
  382. package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.abi.json.d.ts +0 -88
  383. package/out/IFieldLayoutErrors.sol/IFieldLayoutErrors.json +0 -1
  384. package/out/IModuleErrors.sol/IModuleErrors.abi.json +0 -28
  385. package/out/IModuleErrors.sol/IModuleErrors.abi.json.d.ts +0 -28
  386. package/out/IModuleErrors.sol/IModuleErrors.json +0 -1
  387. package/out/IPackedCounterErrors.sol/IPackedCounterErrors.abi.json +0 -13
  388. package/out/IPackedCounterErrors.sol/IPackedCounterErrors.json +0 -1
  389. package/out/IRegistrationSystem.sol/IRegistrationSystem.abi.json +0 -1
  390. package/out/IRegistrationSystem.sol/IRegistrationSystem.json +0 -1
  391. package/out/ISchemaErrors.sol/ISchemaErrors.abi.json +0 -18
  392. package/out/ISchemaErrors.sol/ISchemaErrors.json +0 -1
  393. package/out/ISliceErrors.sol/ISliceErrors.abi.json +0 -23
  394. package/out/ISliceErrors.sol/ISliceErrors.json +0 -1
  395. package/out/IWorldEvents.sol/IWorldEvents.abi.json +0 -15
  396. package/out/IWorldEvents.sol/IWorldEvents.abi.json.d.ts +0 -15
  397. package/out/IWorldEvents.sol/IWorldEvents.json +0 -1
  398. package/out/InitModule.sol/InitModule.json +0 -1
  399. package/out/InitModuleAddress.sol/InitModuleAddress.abi.json +0 -1
  400. package/out/InitModuleAddress.sol/InitModuleAddress.json +0 -1
  401. package/out/LimitedCallContext.sol/LimitedCallContext.abi.json +0 -7
  402. package/out/LimitedCallContext.sol/LimitedCallContext.abi.json.d.ts +0 -7
  403. package/out/LimitedCallContext.sol/LimitedCallContext.json +0 -1
  404. package/out/RegistrationSystem.sol/RegistrationSystem.json +0 -1
  405. /package/out/{ERC165Checker.sol/ERC165Checker.abi.json → ICoreSystem.sol/ICoreSystem.abi.json} +0 -0
  406. /package/out/{IPackedCounterErrors.sol/IPackedCounterErrors.abi.json.d.ts → PackedCounter.sol/PackedCounterInstance.abi.json.d.ts} +0 -0
  407. /package/out/{ISliceErrors.sol/ISliceErrors.abi.json.d.ts → Slice.sol/SliceLib.abi.json.d.ts} +0 -0
@@ -1,8 +1,11 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.24;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
6
+ // Import schema type
7
+ import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
8
+
6
9
  // Import store internals
7
10
  import { IStore } from "@latticexyz/store/src/IStore.sol";
8
11
  import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
@@ -11,19 +14,46 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
11
14
  import { Memory } from "@latticexyz/store/src/Memory.sol";
12
15
  import { SliceLib } from "@latticexyz/store/src/Slice.sol";
13
16
  import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
14
- import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
15
- import { Schema } from "@latticexyz/store/src/Schema.sol";
17
+ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.sol";
18
+ import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
16
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
17
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
+ import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
+
23
+ FieldLayout constant _fieldLayout = FieldLayout.wrap(
24
+ 0x0020010020000000000000000000000000000000000000000000000000000000
25
+ );
18
26
 
19
27
  library Balances {
20
- FieldLayout constant _fieldLayout =
21
- FieldLayout.wrap(0x0020010020000000000000000000000000000000000000000000000000000000);
28
+ /**
29
+ * @notice Get the table values' field layout.
30
+ * @return _fieldLayout The field layout for the table.
31
+ */
32
+ function getFieldLayout() internal pure returns (FieldLayout) {
33
+ return _fieldLayout;
34
+ }
35
+
36
+ /**
37
+ * @notice Get the table's key schema.
38
+ * @return _keySchema The key schema for the table.
39
+ */
40
+ function getKeySchema() internal pure returns (Schema) {
41
+ SchemaType[] memory _keySchema = new SchemaType[](1);
42
+ _keySchema[0] = SchemaType.ADDRESS;
43
+
44
+ return SchemaLib.encode(_keySchema);
45
+ }
22
46
 
23
- // Hex-encoded key schema of (address)
24
- Schema constant _keySchema = Schema.wrap(0x0014010061000000000000000000000000000000000000000000000000000000);
25
- // Hex-encoded value schema of (uint256)
26
- Schema constant _valueSchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
47
+ /**
48
+ * @notice Get the table's value schema.
49
+ * @return _valueSchema The value schema for the table.
50
+ */
51
+ function getValueSchema() internal pure returns (Schema) {
52
+ SchemaType[] memory _valueSchema = new SchemaType[](1);
53
+ _valueSchema[0] = SchemaType.UINT256;
54
+
55
+ return SchemaLib.encode(_valueSchema);
56
+ }
27
57
 
28
58
  /**
29
59
  * @notice Get the table's key field names.
@@ -47,14 +77,14 @@ library Balances {
47
77
  * @notice Register the table with its config.
48
78
  */
49
79
  function register(ResourceId _tableId) internal {
50
- StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
80
+ StoreSwitch.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
51
81
  }
52
82
 
53
83
  /**
54
84
  * @notice Register the table with its config.
55
85
  */
56
86
  function _register(ResourceId _tableId) internal {
57
- StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
87
+ StoreCore.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
58
88
  }
59
89
 
60
90
  /**
@@ -173,7 +203,7 @@ library Balances {
173
203
  * @notice Encode all of a record's fields.
174
204
  * @return The static (fixed length) data, encoded into a sequence of bytes.
175
205
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
176
- * @return The dynamic (variable length) data, encoded into a sequence of bytes.
206
+ * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
177
207
  */
178
208
  function encode(uint256 value) internal pure returns (bytes memory, PackedCounter, bytes memory) {
179
209
  bytes memory _staticData = encodeStatic(value);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.24;
2
+ pragma solidity >=0.8.21;
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 { TABLE_ID, SYSTEM_ID, NAMESPACE_ID } from "./constants.sol";
14
+ import { MODULE_NAME, TABLE_ID, SYSTEM_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 installRoot(bytes memory encodedArgs) public {
25
+ function getName() public pure returns (bytes16) {
26
+ return MODULE_NAME;
27
+ }
28
+
29
+ function installRoot(bytes memory args) public {
26
30
  // Naive check to ensure this is only installed once
27
31
  // TODO: only revert if there's nothing to do
28
- requireNotInstalled(__self, encodedArgs);
32
+ if (InstalledModules.getModuleAddress(getName(), keccak256(args)) != address(0)) {
33
+ revert Module_AlreadyInstalled();
34
+ }
29
35
 
30
36
  IBaseWorld world = IBaseWorld(_world());
31
37
 
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
- (success, data) = address(world).delegatecall(
42
+ (bool success, bytes memory data) = address(world).delegatecall(
43
43
  abi.encodeCall(world.registerSystem, (SYSTEM_ID, uniqueEntitySystem, true))
44
44
  );
45
45
  if (!success) revertWithBytes(data);
@@ -51,16 +51,15 @@ contract UniqueEntityModule is Module {
51
51
  if (!success) revertWithBytes(data);
52
52
  }
53
53
 
54
- function install(bytes memory encodedArgs) public {
54
+ function install(bytes memory args) public {
55
55
  // Naive check to ensure this is only installed once
56
56
  // TODO: only revert if there's nothing to do
57
- requireNotInstalled(__self, encodedArgs);
57
+ if (InstalledModules.getModuleAddress(getName(), keccak256(args)) != address(0)) {
58
+ revert Module_AlreadyInstalled();
59
+ }
58
60
 
59
61
  IBaseWorld world = IBaseWorld(_world());
60
62
 
61
- // Register namespace
62
- world.registerNamespace(NAMESPACE_ID);
63
-
64
63
  // Register table
65
64
  UniqueEntity.register(TABLE_ID);
66
65
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.24;
2
+ pragma solidity >=0.8.21;
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.24;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { ResourceId } from "@latticexyz/world/src/WorldResourceId.sol";
5
- import { RESOURCE_TABLE, RESOURCE_SYSTEM, RESOURCE_NAMESPACE } from "@latticexyz/world/src/worldResourceTypes.sol";
5
+ import { RESOURCE_TABLE, RESOURCE_SYSTEM } from "@latticexyz/world/src/worldResourceTypes.sol";
6
6
 
7
7
  bytes14 constant NAMESPACE = bytes14("uniqueEntity");
8
+ bytes16 constant MODULE_NAME = bytes16("uniqueEntity");
8
9
  bytes16 constant SYSTEM_NAME = bytes16("system");
9
10
  bytes16 constant TABLE_NAME = bytes16("table");
10
11
 
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,8 +1,9 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.24;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
5
 
6
+ import { IUniqueEntitySystem } from "../../interfaces/IUniqueEntitySystem.sol";
6
7
  import { UniqueEntitySystem } from "./UniqueEntitySystem.sol";
7
8
 
8
9
  import { SystemSwitch } from "../../utils/SystemSwitch.sol";
@@ -22,5 +23,5 @@ function getUniqueEntity() returns (bytes32 uniqueEntity) {
22
23
  * Increment and get an entity nonce.
23
24
  */
24
25
  function getUniqueEntity(IBaseWorld world) returns (bytes32 uniqueEntity) {
25
- return abi.decode(world.call(SYSTEM_ID, abi.encodeCall(UniqueEntitySystem.getUniqueEntity, ())), (bytes32));
26
+ return IUniqueEntitySystem(address(world)).uniqueEntity_system_getUniqueEntity();
26
27
  }
@@ -1,8 +1,11 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.24;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
6
+ // Import schema type
7
+ import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol";
8
+
6
9
  // Import store internals
7
10
  import { IStore } from "@latticexyz/store/src/IStore.sol";
8
11
  import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
@@ -11,19 +14,45 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol";
11
14
  import { Memory } from "@latticexyz/store/src/Memory.sol";
12
15
  import { SliceLib } from "@latticexyz/store/src/Slice.sol";
13
16
  import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
14
- import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
15
- import { Schema } from "@latticexyz/store/src/Schema.sol";
17
+ import { FieldLayout, FieldLayoutLib } from "@latticexyz/store/src/FieldLayout.sol";
18
+ import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
16
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
17
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
+ import { RESOURCE_TABLE, RESOURCE_OFFCHAIN_TABLE } from "@latticexyz/store/src/storeResourceTypes.sol";
22
+
23
+ FieldLayout constant _fieldLayout = FieldLayout.wrap(
24
+ 0x0020010020000000000000000000000000000000000000000000000000000000
25
+ );
18
26
 
19
27
  library UniqueEntity {
20
- FieldLayout constant _fieldLayout =
21
- FieldLayout.wrap(0x0020010020000000000000000000000000000000000000000000000000000000);
28
+ /**
29
+ * @notice Get the table values' field layout.
30
+ * @return _fieldLayout The field layout for the table.
31
+ */
32
+ function getFieldLayout() internal pure returns (FieldLayout) {
33
+ return _fieldLayout;
34
+ }
35
+
36
+ /**
37
+ * @notice Get the table's key schema.
38
+ * @return _keySchema The key schema for the table.
39
+ */
40
+ function getKeySchema() internal pure returns (Schema) {
41
+ SchemaType[] memory _keySchema = new SchemaType[](0);
42
+
43
+ return SchemaLib.encode(_keySchema);
44
+ }
22
45
 
23
- // Hex-encoded key schema of ()
24
- Schema constant _keySchema = Schema.wrap(0x0000000000000000000000000000000000000000000000000000000000000000);
25
- // Hex-encoded value schema of (uint256)
26
- Schema constant _valueSchema = Schema.wrap(0x002001001f000000000000000000000000000000000000000000000000000000);
46
+ /**
47
+ * @notice Get the table's value schema.
48
+ * @return _valueSchema The value schema for the table.
49
+ */
50
+ function getValueSchema() internal pure returns (Schema) {
51
+ SchemaType[] memory _valueSchema = new SchemaType[](1);
52
+ _valueSchema[0] = SchemaType.UINT256;
53
+
54
+ return SchemaLib.encode(_valueSchema);
55
+ }
27
56
 
28
57
  /**
29
58
  * @notice Get the table's key field names.
@@ -46,21 +75,21 @@ library UniqueEntity {
46
75
  * @notice Register the table with its config.
47
76
  */
48
77
  function register(ResourceId _tableId) internal {
49
- StoreSwitch.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
78
+ StoreSwitch.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
50
79
  }
51
80
 
52
81
  /**
53
82
  * @notice Register the table with its config.
54
83
  */
55
84
  function _register(ResourceId _tableId) internal {
56
- StoreCore.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
85
+ StoreCore.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
57
86
  }
58
87
 
59
88
  /**
60
89
  * @notice Register the table with its config (using the specified store).
61
90
  */
62
91
  function register(IStore _store, ResourceId _tableId) internal {
63
- _store.registerTable(_tableId, _fieldLayout, _keySchema, _valueSchema, getKeyNames(), getFieldNames());
92
+ _store.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
64
93
  }
65
94
 
66
95
  /**
@@ -216,7 +245,7 @@ library UniqueEntity {
216
245
  * @notice Encode all of a record's fields.
217
246
  * @return The static (fixed length) data, encoded into a sequence of bytes.
218
247
  * @return The lengths of the dynamic fields (packed into a single bytes32 value).
219
- * @return The dynamic (variable length) data, encoded into a sequence of bytes.
248
+ * @return The dyanmic (variable length) data, encoded into a sequence of bytes.
220
249
  */
221
250
  function encode(uint256 value) internal pure returns (bytes memory, PackedCounter, bytes memory) {
222
251
  bytes memory _staticData = encodeStatic(value);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.24;
2
+ pragma solidity >=0.8.21;
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;
39
+ uint256 filteredIndex = 0;
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.24;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { ResourceId, WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol";
5
5
  import { IWorldErrors } from "@latticexyz/world/src/IWorldErrors.sol";
@@ -8,7 +8,6 @@ import { NamespaceOwner } from "@latticexyz/world/src/codegen/tables/NamespaceOw
8
8
 
9
9
  /**
10
10
  * @title AccessControlLib
11
- * @author MUD (https://mud.dev) by Lattice (https://lattice.xyz)
12
11
  * @dev Provides access control functions for checking permissions and ownership within a namespace.
13
12
  * This library is functionally equivalent with the AccessControl library from world,
14
13
  * but uses StoreSwitch instead of always reading from own storage.
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity >=0.8.24;
2
+ pragma solidity >=0.8.21;
3
3
 
4
4
  import { Hook } from "@latticexyz/store/src/Hook.sol";
5
5
  import { Bytes } from "@latticexyz/store/src/Bytes.sol";
@@ -11,7 +11,6 @@ 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";
15
14
 
16
15
  import { IWorldErrors } from "@latticexyz/world/src/IWorldErrors.sol";
17
16
  import { ISystemHook } from "@latticexyz/world/src/ISystemHook.sol";
@@ -23,7 +22,6 @@ import { Balances } from "@latticexyz/world/src/codegen/tables/Balances.sol";
23
22
 
24
23
  /**
25
24
  * @title SystemSwitch
26
- * @author MUD (https://mud.dev) by Lattice (https://lattice.xyz)
27
25
  * @dev The SystemSwitch library provides functions for interacting with systems from other systems.
28
26
  */
29
27
  library SystemSwitch {
@@ -41,13 +39,17 @@ library SystemSwitch {
41
39
  function call(ResourceId systemId, bytes memory callData) internal returns (bytes memory returnData) {
42
40
  address worldAddress = WorldContextConsumerLib._world();
43
41
 
44
- // If we're in the World context, call via the internal library
42
+ // If we're in the World context, call the system directly via delegatecall
45
43
  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
+
46
48
  bool success;
47
- (success, returnData) = SystemCall.call({
48
- caller: WorldContextConsumerLib._msgSender(),
49
- value: 0,
50
- systemId: systemId,
49
+ (success, returnData) = WorldContextProviderLib.delegatecallWithContext({
50
+ msgSender: WorldContextConsumerLib._msgSender(),
51
+ msgValue: WorldContextConsumerLib._msgValue(),
52
+ target: systemAddress,
51
53
  callData: callData
52
54
  });
53
55
 
@@ -1,256 +0,0 @@
1
- import * as _latticexyz_store_register from '@latticexyz/store/register';
2
-
3
- declare const _default: _latticexyz_store_register.ExpandMUDUserConfig<{
4
- worldgenDirectory: string;
5
- worldInterfaceName: string;
6
- codegenDirectory: string;
7
- userTypes: {
8
- ResourceId: {
9
- filePath: string;
10
- internalType: "bytes32";
11
- };
12
- };
13
- tables: {
14
- /************************************************************************
15
- *
16
- * KEYS WITH VALUE MODULE
17
- *
18
- ************************************************************************/
19
- KeysWithValue: {
20
- directory: string;
21
- keySchema: {
22
- valueHash: "bytes32";
23
- };
24
- valueSchema: {
25
- keysWithValue: "bytes32[]";
26
- };
27
- tableIdArgument: true;
28
- storeArgument: true;
29
- };
30
- /************************************************************************
31
- *
32
- * KEYS IN TABLE MODULE
33
- *
34
- ************************************************************************/
35
- KeysInTable: {
36
- directory: string;
37
- keySchema: {
38
- sourceTableId: "ResourceId";
39
- };
40
- valueSchema: {
41
- keys0: "bytes32[]";
42
- keys1: "bytes32[]";
43
- keys2: "bytes32[]";
44
- keys3: "bytes32[]";
45
- keys4: "bytes32[]";
46
- };
47
- storeArgument: true;
48
- };
49
- UsedKeysIndex: {
50
- directory: string;
51
- keySchema: {
52
- sourceTableId: "ResourceId";
53
- keysHash: "bytes32";
54
- };
55
- valueSchema: {
56
- has: "bool";
57
- index: "uint40";
58
- };
59
- dataStruct: false;
60
- storeArgument: true;
61
- };
62
- /************************************************************************
63
- *
64
- * UNIQUE ENTITY MODULE
65
- *
66
- ************************************************************************/
67
- UniqueEntity: {
68
- directory: string;
69
- keySchema: {};
70
- valueSchema: "uint256";
71
- tableIdArgument: true;
72
- storeArgument: true;
73
- };
74
- /************************************************************************
75
- *
76
- * STD DELEGATIONS MODULE
77
- *
78
- ************************************************************************/
79
- CallboundDelegations: {
80
- directory: string;
81
- keySchema: {
82
- delegator: "address";
83
- delegatee: "address";
84
- systemId: "ResourceId";
85
- callDataHash: "bytes32";
86
- };
87
- valueSchema: {
88
- availableCalls: "uint256";
89
- };
90
- };
91
- SystemboundDelegations: {
92
- directory: string;
93
- keySchema: {
94
- delegator: "address";
95
- delegatee: "address";
96
- systemId: "ResourceId";
97
- };
98
- valueSchema: {
99
- availableCalls: "uint256";
100
- };
101
- };
102
- TimeboundDelegations: {
103
- directory: string;
104
- keySchema: {
105
- delegator: "address";
106
- delegatee: "address";
107
- };
108
- valueSchema: {
109
- maxTimestamp: "uint256";
110
- };
111
- };
112
- /************************************************************************
113
- *
114
- * PUPPET MODULE
115
- *
116
- ************************************************************************/
117
- PuppetRegistry: {
118
- directory: string;
119
- keySchema: {
120
- systemId: "ResourceId";
121
- };
122
- valueSchema: {
123
- puppet: "address";
124
- };
125
- tableIdArgument: true;
126
- };
127
- /************************************************************************
128
- *
129
- * TOKEN TABLES (SHARED BY ERC20, ERC721)
130
- *
131
- ************************************************************************/
132
- Balances: {
133
- directory: string;
134
- keySchema: {
135
- account: "address";
136
- };
137
- valueSchema: {
138
- value: "uint256";
139
- };
140
- tableIdArgument: true;
141
- };
142
- /************************************************************************
143
- *
144
- * ERC20 MODULE
145
- *
146
- ************************************************************************/
147
- ERC20Metadata: {
148
- directory: string;
149
- keySchema: {};
150
- valueSchema: {
151
- decimals: "uint8";
152
- name: "string";
153
- symbol: "string";
154
- };
155
- tableIdArgument: true;
156
- };
157
- Allowances: {
158
- directory: string;
159
- keySchema: {
160
- account: "address";
161
- spender: "address";
162
- };
163
- valueSchema: {
164
- value: "uint256";
165
- };
166
- tableIdArgument: true;
167
- };
168
- TotalSupply: {
169
- directory: string;
170
- keySchema: {};
171
- valueSchema: {
172
- totalSupply: "uint256";
173
- };
174
- tableIdArgument: true;
175
- };
176
- ERC20Registry: {
177
- directory: string;
178
- keySchema: {
179
- namespaceId: "ResourceId";
180
- };
181
- valueSchema: {
182
- tokenAddress: "address";
183
- };
184
- tableIdArgument: true;
185
- };
186
- /************************************************************************
187
- *
188
- * ERC721 MODULE
189
- *
190
- ************************************************************************/
191
- ERC721Metadata: {
192
- directory: string;
193
- keySchema: {};
194
- valueSchema: {
195
- name: "string";
196
- symbol: "string";
197
- baseURI: "string";
198
- };
199
- tableIdArgument: true;
200
- };
201
- TokenURI: {
202
- directory: string;
203
- keySchema: {
204
- tokenId: "uint256";
205
- };
206
- valueSchema: {
207
- tokenURI: "string";
208
- };
209
- tableIdArgument: true;
210
- };
211
- Owners: {
212
- directory: string;
213
- keySchema: {
214
- tokenId: "uint256";
215
- };
216
- valueSchema: {
217
- owner: "address";
218
- };
219
- tableIdArgument: true;
220
- };
221
- TokenApproval: {
222
- directory: string;
223
- keySchema: {
224
- tokenId: "uint256";
225
- };
226
- valueSchema: {
227
- account: "address";
228
- };
229
- tableIdArgument: true;
230
- };
231
- OperatorApproval: {
232
- directory: string;
233
- keySchema: {
234
- owner: "address";
235
- operator: "address";
236
- };
237
- valueSchema: {
238
- approved: "bool";
239
- };
240
- tableIdArgument: true;
241
- };
242
- ERC721Registry: {
243
- directory: string;
244
- keySchema: {
245
- namespaceId: "ResourceId";
246
- };
247
- valueSchema: {
248
- tokenAddress: "address";
249
- };
250
- tableIdArgument: true;
251
- };
252
- };
253
- excludeSystems: string[];
254
- }>;
255
-
256
- export { _default as default };
@@ -1 +0,0 @@
1
- {"abi":[],"bytecode":{"object":"0x602d6037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000818000a","sourceMap":"466:4244:49:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;466:4244:49;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000818000a","sourceMap":"466:4244:49:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library used to query support of an interface declared via {IERC165}. Note that these functions return the actual result of the query: they do not `revert` if an interface is not supported. It is up to the caller to decide what to do in these cases.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@latticexyz/world/src/ERC165Checker.sol\":\"ERC165Checker\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":3000},\"remappings\":[\":@latticexyz/=node_modules/@latticexyz/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\"]},\"sources\":{\"node_modules/@latticexyz/world/src/ERC165Checker.sol\":{\"keccak256\":\"0xc63b86705fd62b862e422f830604b7e14e18f1fab662b70a02f656f6ace4fdc7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9d674c90bcc5b21e93b0b2a685c6cff86a69962cf900811af677ce77c3598dcf\",\"dweb:/ipfs/QmVE4pv8AFQWP9RRdaqGo6FP1AR8svMaUQsPnEHZc5VLgF\"]},\"node_modules/@latticexyz/world/src/IERC165.sol\":{\"keccak256\":\"0xe3d9074a1be3247be67ff4dd2c9e41481650ddaa799285a249736bb85673e33d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0b6743ee1e6d0c74927bf17fc1da0cad7575aa7634871b94190ffbdb4c28c2a7\",\"dweb:/ipfs/Qma5bNsPJSBTesWxg3eAAMUBTDE7UjqWaHF7eMiGwP87jr\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@latticexyz/=node_modules/@latticexyz/","ds-test/=node_modules/ds-test/src/","forge-std/=node_modules/forge-std/src/"],"optimizer":{"enabled":true,"runs":3000},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"node_modules/@latticexyz/world/src/ERC165Checker.sol":"ERC165Checker"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@latticexyz/world/src/ERC165Checker.sol":{"keccak256":"0xc63b86705fd62b862e422f830604b7e14e18f1fab662b70a02f656f6ace4fdc7","urls":["bzz-raw://9d674c90bcc5b21e93b0b2a685c6cff86a69962cf900811af677ce77c3598dcf","dweb:/ipfs/QmVE4pv8AFQWP9RRdaqGo6FP1AR8svMaUQsPnEHZc5VLgF"],"license":"MIT"},"node_modules/@latticexyz/world/src/IERC165.sol":{"keccak256":"0xe3d9074a1be3247be67ff4dd2c9e41481650ddaa799285a249736bb85673e33d","urls":["bzz-raw://0b6743ee1e6d0c74927bf17fc1da0cad7575aa7634871b94190ffbdb4c28c2a7","dweb:/ipfs/Qma5bNsPJSBTesWxg3eAAMUBTDE7UjqWaHF7eMiGwP87jr"],"license":"MIT"}},"version":1},"id":49}