@latticexyz/world-modules 2.0.0-main-251170e1 → 2.0.0-main-c07fa021

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 (91) hide show
  1. package/dist/mud.config.js +1 -1
  2. package/dist/mud.config.js.map +1 -1
  3. package/out/ArrayLib.sol/ArrayLib.json +477 -477
  4. package/out/CallboundDelegationControl.sol/CallboundDelegationControl.json +314 -314
  5. package/out/CallboundDelegations.sol/CallboundDelegations.json +4012 -4012
  6. package/out/DelegationControl.sol/DelegationControl.json +22 -22
  7. package/out/IAccessManagementSystem.sol/IAccessManagementSystem.json +97 -97
  8. package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.json +81 -81
  9. package/out/IBaseWorld.sol/IBaseWorld.abi.json +0 -13
  10. package/out/IBaseWorld.sol/IBaseWorld.abi.json.d.ts +0 -13
  11. package/out/IBaseWorld.sol/IBaseWorld.json +63 -143
  12. package/out/ICallBatchSystem.sol/ICallBatchSystem.json +51 -51
  13. package/out/ICoreSystem.sol/ICoreSystem.json +15 -15
  14. package/out/IDelegationControl.sol/IDelegationControl.json +93 -93
  15. package/out/IModule.sol/IModule.json +139 -139
  16. package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.json +58 -58
  17. package/out/ISystemHook.sol/ISystemHook.json +129 -129
  18. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json +2 -2
  19. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json.d.ts +2 -2
  20. package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.json +37 -37
  21. package/out/IWorldContextConsumer.sol/IWorldContextConsumer.json +118 -118
  22. package/out/IWorldErrors.sol/IWorldErrors.json +238 -238
  23. package/out/IWorldKernel.sol/IWorldCall.json +241 -241
  24. package/out/IWorldKernel.sol/IWorldKernel.json +241 -241
  25. package/out/IWorldKernel.sol/IWorldModuleInstallation.json +241 -241
  26. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +282 -282
  27. package/out/KeysInTable.sol/KeysInTable.json +15792 -15792
  28. package/out/KeysInTableHook.sol/KeysInTableHook.json +1253 -1253
  29. package/out/KeysInTableModule.sol/KeysInTableModule.json +798 -798
  30. package/out/KeysWithValue.sol/KeysWithValue.json +5879 -5879
  31. package/out/KeysWithValueHook.sol/KeysWithValueHook.json +1335 -1335
  32. package/out/KeysWithValueModule.sol/KeysWithValueModule.json +619 -619
  33. package/out/Module.sol/Module.json +20 -20
  34. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.json +467 -467
  35. package/out/StoreHook.sol/StoreHook.json +31 -31
  36. package/out/System.sol/System.json +3 -3
  37. package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.json +166 -166
  38. package/out/TimeboundDelegations.sol/TimeboundDelegations.json +3149 -3149
  39. package/out/UniqueEntity.sol/UniqueEntity.json +1976 -1976
  40. package/out/UniqueEntityModule.sol/UniqueEntityModule.json +486 -486
  41. package/out/UniqueEntitySystem.sol/UniqueEntitySystem.json +114 -114
  42. package/out/UsedKeysIndex.sol/UsedKeysIndex.json +3954 -3954
  43. package/out/WorldContext.sol/WorldContextConsumer.json +17 -17
  44. package/out/WorldContext.sol/WorldContextProvider.json +17 -17
  45. package/out/WorldResourceId.sol/WorldResourceIdInstance.json +7 -7
  46. package/out/WorldResourceId.sol/WorldResourceIdLib.json +7 -7
  47. package/out/constants.sol/constants.json +116 -116
  48. package/out/getKeysInTable.sol/getKeysInTable.json +819 -819
  49. package/out/getKeysWithValue.sol/getKeysWithValue.json +374 -374
  50. package/out/getTargetTableId.sol/getTargetTableId.json +232 -232
  51. package/out/getUniqueEntity.sol/getUniqueEntity.json +143 -143
  52. package/out/hasKey.sol/hasKey.json +189 -189
  53. package/out/index.sol/index.json +73 -73
  54. package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +197 -197
  55. package/out/interfaces/IERC165.sol/IERC165.json +50 -50
  56. package/out/interfaces/IWorldKernel.sol/IWorldCall.json +137 -137
  57. package/out/interfaces/IWorldKernel.sol/IWorldKernel.json +137 -137
  58. package/out/interfaces/IWorldKernel.sol/IWorldModuleInstallation.json +137 -137
  59. package/out/query.sol/query.json +1791 -1791
  60. package/out/src/FieldLayout.sol/FieldLayoutInstance.json +47 -47
  61. package/out/src/FieldLayout.sol/FieldLayoutLib.json +47 -47
  62. package/out/src/IStore.sol/IStore.json +21 -21
  63. package/out/src/IStore.sol/IStoreData.json +21 -21
  64. package/out/src/IStore.sol/IStoreRead.json +21 -21
  65. package/out/src/IStore.sol/IStoreRegistration.json +21 -21
  66. package/out/src/IStore.sol/IStoreWrite.json +21 -21
  67. package/out/src/Memory.sol/Memory.json +4 -4
  68. package/out/src/Schema.sol/SchemaInstance.json +42 -42
  69. package/out/src/Schema.sol/SchemaLib.json +42 -42
  70. package/out/src/Slice.sol/SliceInstance.json +4 -4
  71. package/out/src/Slice.sol/SliceLib.json +4 -4
  72. package/out/src/StoreCore.sol/StoreCore.json +294 -294
  73. package/out/src/StoreCore.sol/StoreCoreInternal.json +294 -294
  74. package/out/src/StoreSwitch.sol/StoreSwitch.json +23 -23
  75. package/out/src/WorldContext.sol/WorldContextConsumer.json +22 -22
  76. package/out/src/WorldContext.sol/WorldContextProvider.json +22 -22
  77. package/out/src/WorldResourceId.sol/WorldResourceIdInstance.json +14 -14
  78. package/out/src/WorldResourceId.sol/WorldResourceIdLib.json +14 -14
  79. package/out/tightcoder/EncodeArray.sol/EncodeArray.json +297 -297
  80. package/package.json +8 -8
  81. package/src/interfaces/IBaseWorld.sol +1 -3
  82. package/src/interfaces/IUniqueEntitySystem.sol +2 -3
  83. package/src/modules/keysintable/KeysInTableModule.sol +1 -1
  84. package/src/modules/keyswithvalue/KeysWithValueHook.sol +1 -1
  85. package/src/modules/keyswithvalue/KeysWithValueModule.sol +1 -1
  86. package/src/modules/std-delegations/StandardDelegationsModule.sol +1 -1
  87. package/src/modules/uniqueentity/UniqueEntityModule.sol +1 -1
  88. package/src/modules/uniqueentity/getUniqueEntity.sol +2 -2
  89. package/out/interfaces/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json +0 -15
  90. package/out/interfaces/IUniqueEntitySystem.sol/IUniqueEntitySystem.abi.json.d.ts +0 -16
  91. package/out/interfaces/IUniqueEntitySystem.sol/IUniqueEntitySystem.json +0 -197
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/world-modules",
3
- "version": "2.0.0-main-251170e1",
3
+ "version": "2.0.0-main-c07fa021",
4
4
  "description": "World modules",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,11 +15,11 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "zod": "^3.21.4",
18
- "@latticexyz/common": "2.0.0-main-251170e1",
19
- "@latticexyz/config": "2.0.0-main-251170e1",
20
- "@latticexyz/schema-type": "2.0.0-main-251170e1",
21
- "@latticexyz/store": "2.0.0-main-251170e1",
22
- "@latticexyz/world": "2.0.0-main-251170e1"
18
+ "@latticexyz/common": "2.0.0-main-c07fa021",
19
+ "@latticexyz/config": "2.0.0-main-c07fa021",
20
+ "@latticexyz/schema-type": "2.0.0-main-c07fa021",
21
+ "@latticexyz/store": "2.0.0-main-c07fa021",
22
+ "@latticexyz/world": "2.0.0-main-c07fa021"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/ejs": "^3.1.1",
@@ -34,8 +34,8 @@
34
34
  "tsup": "^6.7.0",
35
35
  "tsx": "^3.12.6",
36
36
  "vitest": "0.31.4",
37
- "@latticexyz/abi-ts": "2.0.0-main-251170e1",
38
- "@latticexyz/gas-report": "2.0.0-main-251170e1"
37
+ "@latticexyz/abi-ts": "2.0.0-main-c07fa021",
38
+ "@latticexyz/gas-report": "2.0.0-main-c07fa021"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -6,12 +6,10 @@ pragma solidity >=0.8.21;
6
6
  import { IStore } from "@latticexyz/store/src/IStore.sol";
7
7
  import { IWorldKernel } from "@latticexyz/world/src/interfaces/IWorldKernel.sol";
8
8
 
9
- import { IUniqueEntitySystem } from "./IUniqueEntitySystem.sol";
10
-
11
9
  /**
12
10
  * The IBaseWorld interface includes all systems dynamically added to the World
13
11
  * during the deploy process.
14
12
  */
15
- interface IBaseWorld is IStore, IWorldKernel, IUniqueEntitySystem {
13
+ interface IBaseWorld is IStore, IWorldKernel {
16
14
 
17
15
  }
@@ -1,8 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity >=0.8.21;
3
3
 
4
- /* Autogenerated file. Do not edit manually. */
5
-
4
+ // TODO allow overriding namespace per-system (or a separate config for modules?)
6
5
  interface IUniqueEntitySystem {
7
- function getUniqueEntity() external returns (bytes32);
6
+ function uniqueEntity_system_getUniqueEntity() external returns (bytes32 uniqueEntity);
8
7
  }
@@ -6,7 +6,7 @@ import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.so
6
6
 
7
7
  import { Module } from "@latticexyz/world/src/Module.sol";
8
8
 
9
- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";
9
+ import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
10
10
 
11
11
  import { ResourceId, WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol";
12
12
  import { revertWithBytes } from "@latticexyz/world/src/revertWithBytes.sol";
@@ -7,7 +7,7 @@ import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol";
7
7
  import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
8
8
  import { PackedCounter } from "@latticexyz/store/src/PackedCounter.sol";
9
9
  import { Tables } from "@latticexyz/store/src/codegen/tables/Tables.sol";
10
- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";
10
+ import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
11
11
 
12
12
  import { ResourceId, WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol";
13
13
 
@@ -4,7 +4,7 @@ import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
4
4
  import { BEFORE_SET_RECORD, BEFORE_SPLICE_STATIC_DATA, AFTER_SPLICE_STATIC_DATA, BEFORE_SPLICE_DYNAMIC_DATA, AFTER_SPLICE_DYNAMIC_DATA, BEFORE_DELETE_RECORD } from "@latticexyz/store/src/storeHookTypes.sol";
5
5
  import { Module } from "@latticexyz/world/src/Module.sol";
6
6
 
7
- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";
7
+ import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
8
8
 
9
9
  import { WorldContextConsumer } from "@latticexyz/world/src/WorldContext.sol";
10
10
  import { ResourceId, WorldResourceIdInstance } from "@latticexyz/world/src/WorldResourceId.sol";
@@ -1,7 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity >=0.8.21;
3
3
 
4
- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";
4
+ import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
5
 
6
6
  import { Module } from "@latticexyz/world/src/Module.sol";
7
7
  import { WorldContextConsumer } from "@latticexyz/world/src/WorldContext.sol";
@@ -1,7 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity >=0.8.21;
3
3
 
4
- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";
4
+ import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
5
 
6
6
  import { Module } from "@latticexyz/world/src/Module.sol";
7
7
  import { WorldContextConsumer } from "@latticexyz/world/src/WorldContext.sol";
@@ -2,9 +2,9 @@
2
2
  pragma solidity >=0.8.21;
3
3
 
4
4
  import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
5
+ import { IBaseWorld } from "@latticexyz/world/src/codegen/interfaces/IBaseWorld.sol";
5
6
 
6
- import { IBaseWorld } from "@latticexyz/world/src/interfaces/IBaseWorld.sol";
7
- import { IUniqueEntitySystem } from "@latticexyz/world/src/interfaces/IUniqueEntitySystem.sol";
7
+ import { IUniqueEntitySystem } from "../../interfaces/IUniqueEntitySystem.sol";
8
8
 
9
9
  /**
10
10
  * Increment and get an entity nonce.
@@ -1,15 +0,0 @@
1
- [
2
- {
3
- "inputs": [],
4
- "name": "uniqueEntity_system_getUniqueEntity",
5
- "outputs": [
6
- {
7
- "internalType": "bytes32",
8
- "name": "uniqueEntity",
9
- "type": "bytes32"
10
- }
11
- ],
12
- "stateMutability": "nonpayable",
13
- "type": "function"
14
- }
15
- ]
@@ -1,16 +0,0 @@
1
- declare const abi: [
2
- {
3
- inputs: [];
4
- name: "uniqueEntity_system_getUniqueEntity";
5
- outputs: [
6
- {
7
- internalType: "bytes32";
8
- name: "uniqueEntity";
9
- type: "bytes32";
10
- }
11
- ];
12
- stateMutability: "nonpayable";
13
- type: "function";
14
- }
15
- ];
16
- export default abi;
@@ -1,197 +0,0 @@
1
- {
2
- "abi": [
3
- {
4
- "inputs": [],
5
- "name": "uniqueEntity_system_getUniqueEntity",
6
- "outputs": [
7
- {
8
- "internalType": "bytes32",
9
- "name": "uniqueEntity",
10
- "type": "bytes32"
11
- }
12
- ],
13
- "stateMutability": "nonpayable",
14
- "type": "function"
15
- }
16
- ],
17
- "bytecode": {
18
- "object": "0x",
19
- "sourceMap": "",
20
- "linkReferences": {}
21
- },
22
- "deployedBytecode": {
23
- "object": "0x",
24
- "sourceMap": "",
25
- "linkReferences": {}
26
- },
27
- "methodIdentifiers": {
28
- "uniqueEntity_system_getUniqueEntity()": "8459353e"
29
- },
30
- "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"uniqueEntity_system_getUniqueEntity\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"uniqueEntity\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@latticexyz/world/src/interfaces/IUniqueEntitySystem.sol\":\"IUniqueEntitySystem\"},\"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/interfaces/IUniqueEntitySystem.sol\":{\"keccak256\":\"0x522fec5a5d0005c6902235f49e9c59570c158ff470472d91afb81c8934d1f8b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c65e929a0196d5333f3642a62c21334df295fbdac98660e4ace31ad9d2a22cea\",\"dweb:/ipfs/QmeLXDZrnMQKaBF6nALVsV6HyutugrsCQaqch64YnZ69ya\"]}},\"version\":1}",
31
- "metadata": {
32
- "compiler": {
33
- "version": "0.8.21+commit.d9974bed"
34
- },
35
- "language": "Solidity",
36
- "output": {
37
- "abi": [
38
- {
39
- "inputs": [],
40
- "stateMutability": "nonpayable",
41
- "type": "function",
42
- "name": "uniqueEntity_system_getUniqueEntity",
43
- "outputs": [
44
- {
45
- "internalType": "bytes32",
46
- "name": "uniqueEntity",
47
- "type": "bytes32"
48
- }
49
- ]
50
- }
51
- ],
52
- "devdoc": {
53
- "kind": "dev",
54
- "methods": {},
55
- "version": 1
56
- },
57
- "userdoc": {
58
- "kind": "user",
59
- "methods": {},
60
- "version": 1
61
- }
62
- },
63
- "settings": {
64
- "remappings": [
65
- "@latticexyz/=node_modules/@latticexyz/",
66
- "ds-test/=node_modules/ds-test/src/",
67
- "forge-std/=node_modules/forge-std/src/"
68
- ],
69
- "optimizer": {
70
- "enabled": true,
71
- "runs": 3000
72
- },
73
- "metadata": {
74
- "bytecodeHash": "none"
75
- },
76
- "compilationTarget": {
77
- "node_modules/@latticexyz/world/src/interfaces/IUniqueEntitySystem.sol": "IUniqueEntitySystem"
78
- },
79
- "libraries": {}
80
- },
81
- "sources": {
82
- "node_modules/@latticexyz/world/src/interfaces/IUniqueEntitySystem.sol": {
83
- "keccak256": "0x522fec5a5d0005c6902235f49e9c59570c158ff470472d91afb81c8934d1f8b9",
84
- "urls": [
85
- "bzz-raw://c65e929a0196d5333f3642a62c21334df295fbdac98660e4ace31ad9d2a22cea",
86
- "dweb:/ipfs/QmeLXDZrnMQKaBF6nALVsV6HyutugrsCQaqch64YnZ69ya"
87
- ],
88
- "license": "MIT"
89
- }
90
- },
91
- "version": 1
92
- },
93
- "ast": {
94
- "absolutePath": "node_modules/@latticexyz/world/src/interfaces/IUniqueEntitySystem.sol",
95
- "id": 49298,
96
- "exportedSymbols": {
97
- "IUniqueEntitySystem": [
98
- 49297
99
- ]
100
- },
101
- "nodeType": "SourceUnit",
102
- "src": "32:233:103",
103
- "nodes": [
104
- {
105
- "id": 49291,
106
- "nodeType": "PragmaDirective",
107
- "src": "32:25:103",
108
- "nodes": [],
109
- "literals": [
110
- "solidity",
111
- ">=",
112
- "0.8",
113
- ".21"
114
- ]
115
- },
116
- {
117
- "id": 49297,
118
- "nodeType": "ContractDefinition",
119
- "src": "141:123:103",
120
- "nodes": [
121
- {
122
- "id": 49296,
123
- "nodeType": "FunctionDefinition",
124
- "src": "175:87:103",
125
- "nodes": [],
126
- "functionSelector": "8459353e",
127
- "implemented": false,
128
- "kind": "function",
129
- "modifiers": [],
130
- "name": "uniqueEntity_system_getUniqueEntity",
131
- "nameLocation": "184:35:103",
132
- "parameters": {
133
- "id": 49292,
134
- "nodeType": "ParameterList",
135
- "parameters": [],
136
- "src": "219:2:103"
137
- },
138
- "returnParameters": {
139
- "id": 49295,
140
- "nodeType": "ParameterList",
141
- "parameters": [
142
- {
143
- "constant": false,
144
- "id": 49294,
145
- "mutability": "mutable",
146
- "name": "uniqueEntity",
147
- "nameLocation": "248:12:103",
148
- "nodeType": "VariableDeclaration",
149
- "scope": 49296,
150
- "src": "240:20:103",
151
- "stateVariable": false,
152
- "storageLocation": "default",
153
- "typeDescriptions": {
154
- "typeIdentifier": "t_bytes32",
155
- "typeString": "bytes32"
156
- },
157
- "typeName": {
158
- "id": 49293,
159
- "name": "bytes32",
160
- "nodeType": "ElementaryTypeName",
161
- "src": "240:7:103",
162
- "typeDescriptions": {
163
- "typeIdentifier": "t_bytes32",
164
- "typeString": "bytes32"
165
- }
166
- },
167
- "visibility": "internal"
168
- }
169
- ],
170
- "src": "239:22:103"
171
- },
172
- "scope": 49297,
173
- "stateMutability": "nonpayable",
174
- "virtual": false,
175
- "visibility": "external"
176
- }
177
- ],
178
- "abstract": false,
179
- "baseContracts": [],
180
- "canonicalName": "IUniqueEntitySystem",
181
- "contractDependencies": [],
182
- "contractKind": "interface",
183
- "fullyImplemented": false,
184
- "linearizedBaseContracts": [
185
- 49297
186
- ],
187
- "name": "IUniqueEntitySystem",
188
- "nameLocation": "151:19:103",
189
- "scope": 49298,
190
- "usedErrors": [],
191
- "usedEvents": []
192
- }
193
- ],
194
- "license": "MIT"
195
- },
196
- "id": 103
197
- }