@latticexyz/world-modules 2.0.0-main-cf2104eb → 2.0.0-main-5fdbb127

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 (47) hide show
  1. package/out/CallboundDelegationControl.sol/CallboundDelegationControl.json +17 -17
  2. package/out/CallboundDelegations.sol/CallboundDelegations.json +1608 -1608
  3. package/out/DelegationControl.sol/DelegationControl.json +13 -13
  4. package/out/Hook.sol/HookInstance.json +13 -13
  5. package/out/Hook.sol/HookLib.json +13 -13
  6. package/out/Hooks.sol/Hooks.json +2872 -2872
  7. package/out/IBaseWorld.sol/IBaseWorld.json +15 -15
  8. package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +13 -13
  9. package/out/KeysInTable.sol/KeysInTable.json +7285 -7285
  10. package/out/KeysInTableHook.sol/KeysInTableHook.json +20 -20
  11. package/out/KeysInTableModule.sol/KeysInTableModule.json +23 -23
  12. package/out/KeysWithValue.sol/KeysWithValue.json +2599 -2599
  13. package/out/KeysWithValueHook.sol/KeysWithValueHook.json +20 -20
  14. package/out/KeysWithValueModule.sol/KeysWithValueModule.json +19 -19
  15. package/out/Module.sol/Module.json +13 -13
  16. package/out/ResourceIds.sol/ResourceIds.json +919 -919
  17. package/out/StandardDelegationsModule.sol/StandardDelegationsModule.json +23 -23
  18. package/out/StoreCore.sol/StoreCore.json +13 -13
  19. package/out/StoreCore.sol/StoreCoreInternal.json +13 -13
  20. package/out/StoreHooks.sol/StoreHooks.json +2647 -2647
  21. package/out/StoreSwitch.sol/StoreSwitch.json +13 -13
  22. package/out/System.sol/System.json +13 -13
  23. package/out/Tables.sol/Tables.json +4611 -4611
  24. package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.json +17 -17
  25. package/out/TimeboundDelegations.sol/TimeboundDelegations.json +1224 -1224
  26. package/out/UniqueEntity.sol/UniqueEntity.json +723 -723
  27. package/out/UniqueEntityModule.sol/UniqueEntityModule.json +20 -20
  28. package/out/UniqueEntitySystem.sol/UniqueEntitySystem.json +17 -17
  29. package/out/UsedKeysIndex.sol/UsedKeysIndex.json +1586 -1586
  30. package/out/WorldContext.sol/WorldContextConsumer.json +13 -13
  31. package/out/WorldContext.sol/WorldContextProvider.json +13 -13
  32. package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +45 -45
  33. package/out/src/StoreCore.sol/StoreCore.json +13 -13
  34. package/out/src/StoreCore.sol/StoreCoreInternal.json +13 -13
  35. package/out/src/StoreSwitch.sol/StoreSwitch.json +13 -13
  36. package/out/src/WorldContext.sol/WorldContextConsumer.json +13 -13
  37. package/out/src/WorldContext.sol/WorldContextProvider.json +13 -13
  38. package/out/tables/ResourceIds.sol/ResourceIds.json +919 -919
  39. package/out/tables/Tables.sol/Tables.json +4611 -4611
  40. package/package.json +8 -8
  41. package/src/interfaces/IBaseWorld.sol +3 -2
  42. package/src/modules/keysintable/tables/KeysInTable.sol +285 -135
  43. package/src/modules/keysintable/tables/UsedKeysIndex.sol +36 -12
  44. package/src/modules/keyswithvalue/tables/KeysWithValue.sol +114 -54
  45. package/src/modules/std-delegations/tables/CallboundDelegations.sol +36 -12
  46. package/src/modules/std-delegations/tables/TimeboundDelegations.sol +36 -12
  47. package/src/modules/uniqueentity/tables/UniqueEntity.sol +36 -12
@@ -87,7 +87,9 @@ library CallboundDelegations {
87
87
  _store.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
88
88
  }
89
89
 
90
- /** Get availableCalls */
90
+ /**
91
+ * @notice Get availableCalls
92
+ */
91
93
  function getAvailableCalls(
92
94
  address delegator,
93
95
  address delegatee,
@@ -104,7 +106,9 @@ library CallboundDelegations {
104
106
  return (uint256(bytes32(_blob)));
105
107
  }
106
108
 
107
- /** Get availableCalls */
109
+ /**
110
+ * @notice Get availableCalls
111
+ */
108
112
  function _getAvailableCalls(
109
113
  address delegator,
110
114
  address delegatee,
@@ -121,7 +125,9 @@ library CallboundDelegations {
121
125
  return (uint256(bytes32(_blob)));
122
126
  }
123
127
 
124
- /** Get availableCalls (using the specified store) */
128
+ /**
129
+ * @notice Get availableCalls (using the specified store)
130
+ */
125
131
  function getAvailableCalls(
126
132
  IStore _store,
127
133
  address delegator,
@@ -139,7 +145,9 @@ library CallboundDelegations {
139
145
  return (uint256(bytes32(_blob)));
140
146
  }
141
147
 
142
- /** Get availableCalls */
148
+ /**
149
+ * @notice Get availableCalls
150
+ */
143
151
  function get(
144
152
  address delegator,
145
153
  address delegatee,
@@ -156,7 +164,9 @@ library CallboundDelegations {
156
164
  return (uint256(bytes32(_blob)));
157
165
  }
158
166
 
159
- /** Get availableCalls */
167
+ /**
168
+ * @notice Get availableCalls
169
+ */
160
170
  function _get(
161
171
  address delegator,
162
172
  address delegatee,
@@ -173,7 +183,9 @@ library CallboundDelegations {
173
183
  return (uint256(bytes32(_blob)));
174
184
  }
175
185
 
176
- /** Get availableCalls (using the specified store) */
186
+ /**
187
+ * @notice Get availableCalls (using the specified store)
188
+ */
177
189
  function get(
178
190
  IStore _store,
179
191
  address delegator,
@@ -191,7 +203,9 @@ library CallboundDelegations {
191
203
  return (uint256(bytes32(_blob)));
192
204
  }
193
205
 
194
- /** Set availableCalls */
206
+ /**
207
+ * @notice Set availableCalls
208
+ */
195
209
  function setAvailableCalls(
196
210
  address delegator,
197
211
  address delegatee,
@@ -208,7 +222,9 @@ library CallboundDelegations {
208
222
  StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((availableCalls)), _fieldLayout);
209
223
  }
210
224
 
211
- /** Set availableCalls */
225
+ /**
226
+ * @notice Set availableCalls
227
+ */
212
228
  function _setAvailableCalls(
213
229
  address delegator,
214
230
  address delegatee,
@@ -225,7 +241,9 @@ library CallboundDelegations {
225
241
  StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((availableCalls)), _fieldLayout);
226
242
  }
227
243
 
228
- /** Set availableCalls (using the specified store) */
244
+ /**
245
+ * @notice Set availableCalls (using the specified store)
246
+ */
229
247
  function setAvailableCalls(
230
248
  IStore _store,
231
249
  address delegator,
@@ -243,7 +261,9 @@ library CallboundDelegations {
243
261
  _store.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((availableCalls)), _fieldLayout);
244
262
  }
245
263
 
246
- /** Set availableCalls */
264
+ /**
265
+ * @notice Set availableCalls
266
+ */
247
267
  function set(
248
268
  address delegator,
249
269
  address delegatee,
@@ -260,7 +280,9 @@ library CallboundDelegations {
260
280
  StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((availableCalls)), _fieldLayout);
261
281
  }
262
282
 
263
- /** Set availableCalls */
283
+ /**
284
+ * @notice Set availableCalls
285
+ */
264
286
  function _set(
265
287
  address delegator,
266
288
  address delegatee,
@@ -277,7 +299,9 @@ library CallboundDelegations {
277
299
  StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((availableCalls)), _fieldLayout);
278
300
  }
279
301
 
280
- /** Set availableCalls (using the specified store) */
302
+ /**
303
+ * @notice Set availableCalls (using the specified store)
304
+ */
281
305
  function set(
282
306
  IStore _store,
283
307
  address delegator,
@@ -80,7 +80,9 @@ library TimeboundDelegations {
80
80
  _store.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
81
81
  }
82
82
 
83
- /** Get maxTimestamp */
83
+ /**
84
+ * @notice Get maxTimestamp
85
+ */
84
86
  function getMaxTimestamp(address delegator, address delegatee) internal view returns (uint256 maxTimestamp) {
85
87
  bytes32[] memory _keyTuple = new bytes32[](2);
86
88
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -90,7 +92,9 @@ library TimeboundDelegations {
90
92
  return (uint256(bytes32(_blob)));
91
93
  }
92
94
 
93
- /** Get maxTimestamp */
95
+ /**
96
+ * @notice Get maxTimestamp
97
+ */
94
98
  function _getMaxTimestamp(address delegator, address delegatee) internal view returns (uint256 maxTimestamp) {
95
99
  bytes32[] memory _keyTuple = new bytes32[](2);
96
100
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -100,7 +104,9 @@ library TimeboundDelegations {
100
104
  return (uint256(bytes32(_blob)));
101
105
  }
102
106
 
103
- /** Get maxTimestamp (using the specified store) */
107
+ /**
108
+ * @notice Get maxTimestamp (using the specified store)
109
+ */
104
110
  function getMaxTimestamp(
105
111
  IStore _store,
106
112
  address delegator,
@@ -114,7 +120,9 @@ library TimeboundDelegations {
114
120
  return (uint256(bytes32(_blob)));
115
121
  }
116
122
 
117
- /** Get maxTimestamp */
123
+ /**
124
+ * @notice Get maxTimestamp
125
+ */
118
126
  function get(address delegator, address delegatee) internal view returns (uint256 maxTimestamp) {
119
127
  bytes32[] memory _keyTuple = new bytes32[](2);
120
128
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -124,7 +132,9 @@ library TimeboundDelegations {
124
132
  return (uint256(bytes32(_blob)));
125
133
  }
126
134
 
127
- /** Get maxTimestamp */
135
+ /**
136
+ * @notice Get maxTimestamp
137
+ */
128
138
  function _get(address delegator, address delegatee) internal view returns (uint256 maxTimestamp) {
129
139
  bytes32[] memory _keyTuple = new bytes32[](2);
130
140
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -134,7 +144,9 @@ library TimeboundDelegations {
134
144
  return (uint256(bytes32(_blob)));
135
145
  }
136
146
 
137
- /** Get maxTimestamp (using the specified store) */
147
+ /**
148
+ * @notice Get maxTimestamp (using the specified store)
149
+ */
138
150
  function get(IStore _store, address delegator, address delegatee) internal view returns (uint256 maxTimestamp) {
139
151
  bytes32[] memory _keyTuple = new bytes32[](2);
140
152
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -144,7 +156,9 @@ library TimeboundDelegations {
144
156
  return (uint256(bytes32(_blob)));
145
157
  }
146
158
 
147
- /** Set maxTimestamp */
159
+ /**
160
+ * @notice Set maxTimestamp
161
+ */
148
162
  function setMaxTimestamp(address delegator, address delegatee, uint256 maxTimestamp) internal {
149
163
  bytes32[] memory _keyTuple = new bytes32[](2);
150
164
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -153,7 +167,9 @@ library TimeboundDelegations {
153
167
  StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((maxTimestamp)), _fieldLayout);
154
168
  }
155
169
 
156
- /** Set maxTimestamp */
170
+ /**
171
+ * @notice Set maxTimestamp
172
+ */
157
173
  function _setMaxTimestamp(address delegator, address delegatee, uint256 maxTimestamp) internal {
158
174
  bytes32[] memory _keyTuple = new bytes32[](2);
159
175
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -162,7 +178,9 @@ library TimeboundDelegations {
162
178
  StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((maxTimestamp)), _fieldLayout);
163
179
  }
164
180
 
165
- /** Set maxTimestamp (using the specified store) */
181
+ /**
182
+ * @notice Set maxTimestamp (using the specified store)
183
+ */
166
184
  function setMaxTimestamp(IStore _store, address delegator, address delegatee, uint256 maxTimestamp) internal {
167
185
  bytes32[] memory _keyTuple = new bytes32[](2);
168
186
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -171,7 +189,9 @@ library TimeboundDelegations {
171
189
  _store.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((maxTimestamp)), _fieldLayout);
172
190
  }
173
191
 
174
- /** Set maxTimestamp */
192
+ /**
193
+ * @notice Set maxTimestamp
194
+ */
175
195
  function set(address delegator, address delegatee, uint256 maxTimestamp) internal {
176
196
  bytes32[] memory _keyTuple = new bytes32[](2);
177
197
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -180,7 +200,9 @@ library TimeboundDelegations {
180
200
  StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((maxTimestamp)), _fieldLayout);
181
201
  }
182
202
 
183
- /** Set maxTimestamp */
203
+ /**
204
+ * @notice Set maxTimestamp
205
+ */
184
206
  function _set(address delegator, address delegatee, uint256 maxTimestamp) internal {
185
207
  bytes32[] memory _keyTuple = new bytes32[](2);
186
208
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -189,7 +211,9 @@ library TimeboundDelegations {
189
211
  StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((maxTimestamp)), _fieldLayout);
190
212
  }
191
213
 
192
- /** Set maxTimestamp (using the specified store) */
214
+ /**
215
+ * @notice Set maxTimestamp (using the specified store)
216
+ */
193
217
  function set(IStore _store, address delegator, address delegatee, uint256 maxTimestamp) internal {
194
218
  bytes32[] memory _keyTuple = new bytes32[](2);
195
219
  _keyTuple[0] = bytes32(uint256(uint160(delegator)));
@@ -71,7 +71,9 @@ library UniqueEntity {
71
71
  _store.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
72
72
  }
73
73
 
74
- /** Get value */
74
+ /**
75
+ * @notice Get value
76
+ */
75
77
  function getValue(ResourceId _tableId) internal view returns (uint256 value) {
76
78
  bytes32[] memory _keyTuple = new bytes32[](0);
77
79
 
@@ -79,7 +81,9 @@ library UniqueEntity {
79
81
  return (uint256(bytes32(_blob)));
80
82
  }
81
83
 
82
- /** Get value */
84
+ /**
85
+ * @notice Get value
86
+ */
83
87
  function _getValue(ResourceId _tableId) internal view returns (uint256 value) {
84
88
  bytes32[] memory _keyTuple = new bytes32[](0);
85
89
 
@@ -87,7 +91,9 @@ library UniqueEntity {
87
91
  return (uint256(bytes32(_blob)));
88
92
  }
89
93
 
90
- /** Get value (using the specified store) */
94
+ /**
95
+ * @notice Get value (using the specified store)
96
+ */
91
97
  function getValue(IStore _store, ResourceId _tableId) internal view returns (uint256 value) {
92
98
  bytes32[] memory _keyTuple = new bytes32[](0);
93
99
 
@@ -95,7 +101,9 @@ library UniqueEntity {
95
101
  return (uint256(bytes32(_blob)));
96
102
  }
97
103
 
98
- /** Get value */
104
+ /**
105
+ * @notice Get value
106
+ */
99
107
  function get(ResourceId _tableId) internal view returns (uint256 value) {
100
108
  bytes32[] memory _keyTuple = new bytes32[](0);
101
109
 
@@ -103,7 +111,9 @@ library UniqueEntity {
103
111
  return (uint256(bytes32(_blob)));
104
112
  }
105
113
 
106
- /** Get value */
114
+ /**
115
+ * @notice Get value
116
+ */
107
117
  function _get(ResourceId _tableId) internal view returns (uint256 value) {
108
118
  bytes32[] memory _keyTuple = new bytes32[](0);
109
119
 
@@ -111,7 +121,9 @@ library UniqueEntity {
111
121
  return (uint256(bytes32(_blob)));
112
122
  }
113
123
 
114
- /** Get value (using the specified store) */
124
+ /**
125
+ * @notice Get value (using the specified store)
126
+ */
115
127
  function get(IStore _store, ResourceId _tableId) internal view returns (uint256 value) {
116
128
  bytes32[] memory _keyTuple = new bytes32[](0);
117
129
 
@@ -119,42 +131,54 @@ library UniqueEntity {
119
131
  return (uint256(bytes32(_blob)));
120
132
  }
121
133
 
122
- /** Set value */
134
+ /**
135
+ * @notice Set value
136
+ */
123
137
  function setValue(ResourceId _tableId, uint256 value) internal {
124
138
  bytes32[] memory _keyTuple = new bytes32[](0);
125
139
 
126
140
  StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
127
141
  }
128
142
 
129
- /** Set value */
143
+ /**
144
+ * @notice Set value
145
+ */
130
146
  function _setValue(ResourceId _tableId, uint256 value) internal {
131
147
  bytes32[] memory _keyTuple = new bytes32[](0);
132
148
 
133
149
  StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
134
150
  }
135
151
 
136
- /** Set value (using the specified store) */
152
+ /**
153
+ * @notice Set value (using the specified store)
154
+ */
137
155
  function setValue(IStore _store, ResourceId _tableId, uint256 value) internal {
138
156
  bytes32[] memory _keyTuple = new bytes32[](0);
139
157
 
140
158
  _store.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
141
159
  }
142
160
 
143
- /** Set value */
161
+ /**
162
+ * @notice Set value
163
+ */
144
164
  function set(ResourceId _tableId, uint256 value) internal {
145
165
  bytes32[] memory _keyTuple = new bytes32[](0);
146
166
 
147
167
  StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
148
168
  }
149
169
 
150
- /** Set value */
170
+ /**
171
+ * @notice Set value
172
+ */
151
173
  function _set(ResourceId _tableId, uint256 value) internal {
152
174
  bytes32[] memory _keyTuple = new bytes32[](0);
153
175
 
154
176
  StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((value)), _fieldLayout);
155
177
  }
156
178
 
157
- /** Set value (using the specified store) */
179
+ /**
180
+ * @notice Set value (using the specified store)
181
+ */
158
182
  function set(IStore _store, ResourceId _tableId, uint256 value) internal {
159
183
  bytes32[] memory _keyTuple = new bytes32[](0);
160
184