@latticexyz/world 2.0.0-main-33f50f8a → 2.0.0-main-c583f3cd

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 (120) hide show
  1. package/abi/AccessControl.sol/AccessControl.json +32 -32
  2. package/abi/AccessManagementSystem.sol/AccessManagementSystem.abi.json +18 -0
  3. package/abi/AccessManagementSystem.sol/AccessManagementSystem.json +740 -227
  4. package/abi/AddressArray.sol/AddressArray.json +2307 -2307
  5. package/abi/ArrayLib.sol/ArrayLib.json +255 -255
  6. package/abi/Bool.sol/Bool.json +995 -995
  7. package/abi/CoreModule.sol/CoreModule.json +863 -898
  8. package/abi/CoreSystem.sol/CoreSystem.abi.json +19 -1
  9. package/abi/CoreSystem.sol/CoreSystem.json +168 -121
  10. package/abi/EphemeralRecordSystem.sol/EphemeralRecordSystem.json +152 -300
  11. package/abi/FunctionSelectors.sol/FunctionSelectors.json +1161 -1161
  12. package/abi/IAccessManagementSystem.sol/IAccessManagementSystem.abi.json +18 -0
  13. package/abi/IAccessManagementSystem.sol/IAccessManagementSystem.json +153 -33
  14. package/abi/IBaseWorld.sol/IBaseWorld.abi.json +19 -1
  15. package/abi/IBaseWorld.sol/IBaseWorld.json +145 -109
  16. package/abi/ICoreSystem.sol/ICoreSystem.json +6 -6
  17. package/abi/IModule.sol/IModule.json +28 -28
  18. package/abi/IModuleInstallationSystem.sol/IModuleInstallationSystem.json +27 -27
  19. package/abi/ISystemHook.sol/ISystemHook.abi.json +6 -6
  20. package/abi/ISystemHook.sol/ISystemHook.json +87 -89
  21. package/abi/IUniqueEntitySystem.sol/IUniqueEntitySystem.json +13 -13
  22. package/abi/IWorldErrors.sol/IWorldErrors.json +57 -57
  23. package/abi/IWorldKernel.sol/IWorldCall.json +115 -115
  24. package/abi/IWorldKernel.sol/IWorldKernel.json +115 -115
  25. package/abi/IWorldKernel.sol/IWorldModuleInstallation.json +114 -114
  26. package/abi/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.abi.json +1 -1
  27. package/abi/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +184 -184
  28. package/abi/InstalledModules.sol/InstalledModules.json +2055 -2055
  29. package/abi/KeysInTable.sol/KeysInTable.json +5199 -5199
  30. package/abi/KeysInTableHook.sol/KeysInTableHook.json +675 -675
  31. package/abi/KeysInTableModule.sol/KeysInTableModule.json +388 -388
  32. package/abi/KeysWithValue.sol/KeysWithValue.json +1242 -1242
  33. package/abi/KeysWithValueHook.sol/KeysWithValueHook.json +458 -458
  34. package/abi/KeysWithValueModule.sol/KeysWithValueModule.json +320 -320
  35. package/abi/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +201 -238
  36. package/abi/NamespaceOwner.sol/NamespaceOwner.json +1159 -1159
  37. package/abi/ResourceAccess.sol/ResourceAccess.json +1454 -1454
  38. package/abi/ResourceSelector.sol/ResourceSelector.json +440 -440
  39. package/abi/ResourceType.sol/ResourceType.json +654 -654
  40. package/abi/StoreRead.sol/StoreRead.json +8 -8
  41. package/abi/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +587 -621
  42. package/abi/System.sol/System.json +45 -37
  43. package/abi/SystemCall.sol/SystemCall.json +3387 -0
  44. package/abi/SystemHooks.sol/SystemHooks.json +1218 -1218
  45. package/abi/SystemRegistry.sol/SystemRegistry.json +662 -662
  46. package/abi/Systems.sol/Systems.json +1158 -1158
  47. package/abi/Types.sol/Types.json +8 -8
  48. package/abi/UniqueEntity.sol/UniqueEntity.json +513 -513
  49. package/abi/UniqueEntityModule.sol/UniqueEntityModule.json +311 -303
  50. package/abi/UniqueEntitySystem.sol/UniqueEntitySystem.json +112 -104
  51. package/abi/UsedKeysIndex.sol/UsedKeysIndex.json +1338 -1338
  52. package/abi/Utils.sol/Utils.json +73 -73
  53. package/abi/World.sol/World.json +1272 -2835
  54. package/abi/WorldContext.sol/WorldContextConsumer.json +2603 -0
  55. package/abi/WorldContext.sol/WorldContextProvider.abi.json +1 -0
  56. package/abi/WorldContext.sol/WorldContextProvider.json +2603 -0
  57. package/abi/WorldRegistrationSystem.sol/WorldRegistrationSystem.abi.json +1 -1
  58. package/abi/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1181 -1107
  59. package/abi/constants.sol/constants.json +34 -34
  60. package/abi/getKeysInTable.sol/getKeysInTable.json +460 -460
  61. package/abi/getKeysWithValue.sol/getKeysWithValue.json +119 -119
  62. package/abi/getTargetTableSelector.sol/getTargetTableSelector.json +75 -75
  63. package/abi/getUniqueEntity.sol/getUniqueEntity.json +82 -82
  64. package/abi/hasKey.sol/hasKey.json +99 -99
  65. package/abi/query.sol/query.json +980 -980
  66. package/abi/revertWithBytes.sol/revertWithBytes.json +189 -0
  67. package/abi/src/IStore.sol/IStore.json +13 -13
  68. package/abi/src/IStore.sol/IStoreData.json +13 -13
  69. package/abi/src/IStore.sol/IStoreEphemeral.json +13 -13
  70. package/abi/src/IStore.sol/IStoreHook.json +13 -13
  71. package/abi/src/IStore.sol/IStoreRead.json +13 -13
  72. package/abi/src/IStore.sol/IStoreRegistration.json +13 -13
  73. package/abi/src/IStore.sol/IStoreWrite.json +13 -13
  74. package/abi/src/Memory.sol/Memory.json +4 -4
  75. package/abi/src/Slice.sol/SliceInstance.json +4 -4
  76. package/abi/src/Slice.sol/SliceLib.json +4 -4
  77. package/abi/src/StoreCore.sol/StoreCore.json +151 -151
  78. package/abi/src/StoreCore.sol/StoreCoreInternal.json +151 -151
  79. package/abi/src/Tables.sol/Tables.json +122 -122
  80. package/abi/tightcoder/EncodeArray.sol/EncodeArray.json +297 -297
  81. package/package.json +6 -6
  82. package/src/System.sol +3 -3
  83. package/src/SystemCall.sol +99 -0
  84. package/src/World.sol +10 -51
  85. package/src/WorldContext.sol +49 -1
  86. package/src/interfaces/IAccessManagementSystem.sol +2 -0
  87. package/src/interfaces/ISystemHook.sol +2 -2
  88. package/src/interfaces/IWorldKernel.sol +2 -2
  89. package/src/interfaces/IWorldRegistrationSystem.sol +2 -2
  90. package/src/modules/core/CoreModule.sol +7 -10
  91. package/src/modules/core/implementations/AccessManagementSystem.sol +20 -1
  92. package/src/modules/core/implementations/EphemeralRecordSystem.sol +0 -4
  93. package/src/modules/core/implementations/ModuleInstallationSystem.sol +2 -3
  94. package/src/modules/core/implementations/StoreRegistrationSystem.sol +3 -5
  95. package/src/modules/core/implementations/WorldRegistrationSystem.sol +3 -1
  96. package/src/modules/keysintable/KeysInTableModule.sol +2 -2
  97. package/src/modules/keyswithvalue/KeysWithValueModule.sol +2 -2
  98. package/src/modules/uniqueentity/UniqueEntityModule.sol +2 -2
  99. package/src/revertWithBytes.sol +12 -0
  100. package/types/ethers-contracts/AccessManagementSystem.ts +40 -1
  101. package/types/ethers-contracts/CoreSystem.ts +40 -0
  102. package/types/ethers-contracts/IAccessManagementSystem.ts +40 -1
  103. package/types/ethers-contracts/IBaseWorld.ts +40 -0
  104. package/types/ethers-contracts/ISystemHook.ts +14 -14
  105. package/types/ethers-contracts/factories/AccessManagementSystem__factory.ts +19 -1
  106. package/types/ethers-contracts/factories/CoreModule__factory.ts +1 -1
  107. package/types/ethers-contracts/factories/CoreSystem__factory.ts +20 -2
  108. package/types/ethers-contracts/factories/IAccessManagementSystem__factory.ts +18 -0
  109. package/types/ethers-contracts/factories/IBaseWorld__factory.ts +19 -1
  110. package/types/ethers-contracts/factories/ISystemHook__factory.ts +6 -6
  111. package/types/ethers-contracts/factories/IWorldRegistrationSystem__factory.ts +1 -1
  112. package/types/ethers-contracts/factories/ModuleInstallationSystem__factory.ts +1 -1
  113. package/types/ethers-contracts/factories/StoreRegistrationSystem__factory.ts +1 -1
  114. package/types/ethers-contracts/factories/WorldRegistrationSystem__factory.ts +1 -1
  115. package/types/ethers-contracts/factories/World__factory.ts +1 -1
  116. package/abi/Call.sol/Call.json +0 -1103
  117. package/abi/WorldContext.sol/WorldContext.json +0 -744
  118. package/src/Call.sol +0 -39
  119. /package/abi/{Call.sol/Call.abi.json → SystemCall.sol/SystemCall.abi.json} +0 -0
  120. /package/abi/WorldContext.sol/{WorldContext.abi.json → WorldContextConsumer.abi.json} +0 -0
@@ -293,16 +293,16 @@
293
293
  27815
294
294
  ],
295
295
  "IWorldErrors": [
296
- 28857
296
+ 29061
297
297
  ],
298
298
  "NamespaceOwner": [
299
- 44213
299
+ 44459
300
300
  ],
301
301
  "ResourceAccess": [
302
- 44834
302
+ 45080
303
303
  ],
304
304
  "ResourceSelector": [
305
- 28044
305
+ 27988
306
306
  ]
307
307
  },
308
308
  "nodeType": "SourceUnit",
@@ -329,7 +329,7 @@
329
329
  "file": "./ResourceSelector.sol",
330
330
  "nameLocation": "-1:-1:-1",
331
331
  "scope": 27816,
332
- "sourceUnit": 28045,
332
+ "sourceUnit": 27989,
333
333
  "symbolAliases": [
334
334
  {
335
335
  "foreign": {
@@ -337,7 +337,7 @@
337
337
  "name": "ResourceSelector",
338
338
  "nodeType": "Identifier",
339
339
  "overloadedDeclarations": [],
340
- "referencedDeclaration": 28044,
340
+ "referencedDeclaration": 27988,
341
341
  "src": "67:16:46",
342
342
  "typeDescriptions": {}
343
343
  },
@@ -355,7 +355,7 @@
355
355
  "file": "./interfaces/IWorldErrors.sol",
356
356
  "nameLocation": "-1:-1:-1",
357
357
  "scope": 27816,
358
- "sourceUnit": 28858,
358
+ "sourceUnit": 29062,
359
359
  "symbolAliases": [
360
360
  {
361
361
  "foreign": {
@@ -363,7 +363,7 @@
363
363
  "name": "IWorldErrors",
364
364
  "nodeType": "Identifier",
365
365
  "overloadedDeclarations": [],
366
- "referencedDeclaration": 28857,
366
+ "referencedDeclaration": 29061,
367
367
  "src": "126:12:46",
368
368
  "typeDescriptions": {}
369
369
  },
@@ -381,7 +381,7 @@
381
381
  "file": "./tables/ResourceAccess.sol",
382
382
  "nameLocation": "-1:-1:-1",
383
383
  "scope": 27816,
384
- "sourceUnit": 44844,
384
+ "sourceUnit": 45090,
385
385
  "symbolAliases": [
386
386
  {
387
387
  "foreign": {
@@ -389,7 +389,7 @@
389
389
  "name": "ResourceAccess",
390
390
  "nodeType": "Identifier",
391
391
  "overloadedDeclarations": [],
392
- "referencedDeclaration": 44834,
392
+ "referencedDeclaration": 45080,
393
393
  "src": "189:14:46",
394
394
  "typeDescriptions": {}
395
395
  },
@@ -407,7 +407,7 @@
407
407
  "file": "./tables/NamespaceOwner.sol",
408
408
  "nameLocation": "-1:-1:-1",
409
409
  "scope": 27816,
410
- "sourceUnit": 44214,
410
+ "sourceUnit": 44460,
411
411
  "symbolAliases": [
412
412
  {
413
413
  "foreign": {
@@ -415,7 +415,7 @@
415
415
  "name": "NamespaceOwner",
416
416
  "nodeType": "Identifier",
417
417
  "overloadedDeclarations": [],
418
- "referencedDeclaration": 44213,
418
+ "referencedDeclaration": 44459,
419
419
  "src": "251:14:46",
420
420
  "typeDescriptions": {}
421
421
  },
@@ -439,7 +439,7 @@
439
439
  "id": 27720,
440
440
  "name": "ResourceSelector",
441
441
  "nodeType": "IdentifierPath",
442
- "referencedDeclaration": 28044,
442
+ "referencedDeclaration": 27988,
443
443
  "src": "337:16:46"
444
444
  },
445
445
  "typeName": {
@@ -598,7 +598,7 @@
598
598
  "lValueRequested": false,
599
599
  "memberName": "getNamespace",
600
600
  "nodeType": "MemberAccess",
601
- "referencedDeclaration": 27942,
601
+ "referencedDeclaration": 27886,
602
602
  "src": "675:29:46",
603
603
  "typeDescriptions": {
604
604
  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bytes16_$bound_to$_t_bytes32_$",
@@ -649,10 +649,10 @@
649
649
  "name": "ResourceAccess",
650
650
  "nodeType": "Identifier",
651
651
  "overloadedDeclarations": [],
652
- "referencedDeclaration": 44834,
652
+ "referencedDeclaration": 45080,
653
653
  "src": "656:14:46",
654
654
  "typeDescriptions": {
655
- "typeIdentifier": "t_type$_t_contract$_ResourceAccess_$44834_$",
655
+ "typeIdentifier": "t_type$_t_contract$_ResourceAccess_$45080_$",
656
656
  "typeString": "type(library ResourceAccess)"
657
657
  }
658
658
  },
@@ -663,7 +663,7 @@
663
663
  "lValueRequested": false,
664
664
  "memberName": "get",
665
665
  "nodeType": "MemberAccess",
666
- "referencedDeclaration": 44484,
666
+ "referencedDeclaration": 44730,
667
667
  "src": "656:18:46",
668
668
  "typeDescriptions": {
669
669
  "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$",
@@ -736,10 +736,10 @@
736
736
  "name": "ResourceAccess",
737
737
  "nodeType": "Identifier",
738
738
  "overloadedDeclarations": [],
739
- "referencedDeclaration": 44834,
739
+ "referencedDeclaration": 45080,
740
740
  "src": "769:14:46",
741
741
  "typeDescriptions": {
742
- "typeIdentifier": "t_type$_t_contract$_ResourceAccess_$44834_$",
742
+ "typeIdentifier": "t_type$_t_contract$_ResourceAccess_$45080_$",
743
743
  "typeString": "type(library ResourceAccess)"
744
744
  }
745
745
  },
@@ -750,7 +750,7 @@
750
750
  "lValueRequested": false,
751
751
  "memberName": "get",
752
752
  "nodeType": "MemberAccess",
753
- "referencedDeclaration": 44484,
753
+ "referencedDeclaration": 44730,
754
754
  "src": "769:18:46",
755
755
  "typeDescriptions": {
756
756
  "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$",
@@ -1022,7 +1022,7 @@
1022
1022
  "lValueRequested": false,
1023
1023
  "memberName": "toString",
1024
1024
  "nodeType": "MemberAccess",
1025
- "referencedDeclaration": 27999,
1025
+ "referencedDeclaration": 27943,
1026
1026
  "src": "1254:25:46",
1027
1027
  "typeDescriptions": {
1028
1028
  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_string_memory_ptr_$bound_to$_t_bytes32_$",
@@ -1073,10 +1073,10 @@
1073
1073
  "name": "IWorldErrors",
1074
1074
  "nodeType": "Identifier",
1075
1075
  "overloadedDeclarations": [],
1076
- "referencedDeclaration": 28857,
1076
+ "referencedDeclaration": 29061,
1077
1077
  "src": "1228:12:46",
1078
1078
  "typeDescriptions": {
1079
- "typeIdentifier": "t_type$_t_contract$_IWorldErrors_$28857_$",
1079
+ "typeIdentifier": "t_type$_t_contract$_IWorldErrors_$29061_$",
1080
1080
  "typeString": "type(contract IWorldErrors)"
1081
1081
  }
1082
1082
  },
@@ -1087,7 +1087,7 @@
1087
1087
  "lValueRequested": false,
1088
1088
  "memberName": "AccessDenied",
1089
1089
  "nodeType": "MemberAccess",
1090
- "referencedDeclaration": 28836,
1090
+ "referencedDeclaration": 29040,
1091
1091
  "src": "1228:25:46",
1092
1092
  "typeDescriptions": {
1093
1093
  "typeIdentifier": "t_function_error_pure$_t_string_memory_ptr_$_t_address_$returns$__$",
@@ -1347,7 +1347,7 @@
1347
1347
  "lValueRequested": false,
1348
1348
  "memberName": "getNamespace",
1349
1349
  "nodeType": "MemberAccess",
1350
- "referencedDeclaration": 27942,
1350
+ "referencedDeclaration": 27886,
1351
1351
  "src": "1644:29:46",
1352
1352
  "typeDescriptions": {
1353
1353
  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bytes16_$bound_to$_t_bytes32_$",
@@ -1382,10 +1382,10 @@
1382
1382
  "name": "NamespaceOwner",
1383
1383
  "nodeType": "Identifier",
1384
1384
  "overloadedDeclarations": [],
1385
- "referencedDeclaration": 44213,
1385
+ "referencedDeclaration": 44459,
1386
1386
  "src": "1625:14:46",
1387
1387
  "typeDescriptions": {
1388
- "typeIdentifier": "t_type$_t_contract$_NamespaceOwner_$44213_$",
1388
+ "typeIdentifier": "t_type$_t_contract$_NamespaceOwner_$44459_$",
1389
1389
  "typeString": "type(library NamespaceOwner)"
1390
1390
  }
1391
1391
  },
@@ -1396,7 +1396,7 @@
1396
1396
  "lValueRequested": false,
1397
1397
  "memberName": "get",
1398
1398
  "nodeType": "MemberAccess",
1399
- "referencedDeclaration": 43949,
1399
+ "referencedDeclaration": 44195,
1400
1400
  "src": "1625:18:46",
1401
1401
  "typeDescriptions": {
1402
1402
  "typeIdentifier": "t_function_internal_view$_t_bytes16_$returns$_t_address_$",
@@ -1478,7 +1478,7 @@
1478
1478
  "lValueRequested": false,
1479
1479
  "memberName": "toString",
1480
1480
  "nodeType": "MemberAccess",
1481
- "referencedDeclaration": 27999,
1481
+ "referencedDeclaration": 27943,
1482
1482
  "src": "1729:25:46",
1483
1483
  "typeDescriptions": {
1484
1484
  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_string_memory_ptr_$bound_to$_t_bytes32_$",
@@ -1529,10 +1529,10 @@
1529
1529
  "name": "IWorldErrors",
1530
1530
  "nodeType": "Identifier",
1531
1531
  "overloadedDeclarations": [],
1532
- "referencedDeclaration": 28857,
1532
+ "referencedDeclaration": 29061,
1533
1533
  "src": "1703:12:46",
1534
1534
  "typeDescriptions": {
1535
- "typeIdentifier": "t_type$_t_contract$_IWorldErrors_$28857_$",
1535
+ "typeIdentifier": "t_type$_t_contract$_IWorldErrors_$29061_$",
1536
1536
  "typeString": "type(contract IWorldErrors)"
1537
1537
  }
1538
1538
  },
@@ -1543,7 +1543,7 @@
1543
1543
  "lValueRequested": false,
1544
1544
  "memberName": "AccessDenied",
1545
1545
  "nodeType": "MemberAccess",
1546
- "referencedDeclaration": 28836,
1546
+ "referencedDeclaration": 29040,
1547
1547
  "src": "1703:25:46",
1548
1548
  "typeDescriptions": {
1549
1549
  "typeIdentifier": "t_function_error_pure$_t_string_memory_ptr_$_t_address_$returns$__$",
@@ -114,5 +114,23 @@
114
114
  "outputs": [],
115
115
  "stateMutability": "nonpayable",
116
116
  "type": "function"
117
+ },
118
+ {
119
+ "inputs": [
120
+ {
121
+ "internalType": "bytes16",
122
+ "name": "namespace",
123
+ "type": "bytes16"
124
+ },
125
+ {
126
+ "internalType": "address",
127
+ "name": "newOwner",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "name": "transferOwnership",
132
+ "outputs": [],
133
+ "stateMutability": "nonpayable",
134
+ "type": "function"
117
135
  }
118
136
  ]