@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
@@ -85,7 +85,9 @@ library UsedKeysIndex {
85
85
  _store.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
86
86
  }
87
87
 
88
- /** Get has */
88
+ /**
89
+ * @notice Get has
90
+ */
89
91
  function getHas(ResourceId sourceTableId, bytes32 keysHash) internal view returns (bool has) {
90
92
  bytes32[] memory _keyTuple = new bytes32[](2);
91
93
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -95,7 +97,9 @@ library UsedKeysIndex {
95
97
  return (_toBool(uint8(bytes1(_blob))));
96
98
  }
97
99
 
98
- /** Get has */
100
+ /**
101
+ * @notice Get has
102
+ */
99
103
  function _getHas(ResourceId sourceTableId, bytes32 keysHash) internal view returns (bool has) {
100
104
  bytes32[] memory _keyTuple = new bytes32[](2);
101
105
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -105,7 +109,9 @@ library UsedKeysIndex {
105
109
  return (_toBool(uint8(bytes1(_blob))));
106
110
  }
107
111
 
108
- /** Get has (using the specified store) */
112
+ /**
113
+ * @notice Get has (using the specified store)
114
+ */
109
115
  function getHas(IStore _store, ResourceId sourceTableId, bytes32 keysHash) internal view returns (bool has) {
110
116
  bytes32[] memory _keyTuple = new bytes32[](2);
111
117
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -115,7 +121,9 @@ library UsedKeysIndex {
115
121
  return (_toBool(uint8(bytes1(_blob))));
116
122
  }
117
123
 
118
- /** Set has */
124
+ /**
125
+ * @notice Set has
126
+ */
119
127
  function setHas(ResourceId sourceTableId, bytes32 keysHash, bool has) internal {
120
128
  bytes32[] memory _keyTuple = new bytes32[](2);
121
129
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -124,7 +132,9 @@ library UsedKeysIndex {
124
132
  StoreSwitch.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((has)), _fieldLayout);
125
133
  }
126
134
 
127
- /** Set has */
135
+ /**
136
+ * @notice Set has
137
+ */
128
138
  function _setHas(ResourceId sourceTableId, bytes32 keysHash, bool has) internal {
129
139
  bytes32[] memory _keyTuple = new bytes32[](2);
130
140
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -133,7 +143,9 @@ library UsedKeysIndex {
133
143
  StoreCore.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((has)), _fieldLayout);
134
144
  }
135
145
 
136
- /** Set has (using the specified store) */
146
+ /**
147
+ * @notice Set has (using the specified store)
148
+ */
137
149
  function setHas(IStore _store, ResourceId sourceTableId, bytes32 keysHash, bool has) internal {
138
150
  bytes32[] memory _keyTuple = new bytes32[](2);
139
151
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -142,7 +154,9 @@ library UsedKeysIndex {
142
154
  _store.setStaticField(_tableId, _keyTuple, 0, abi.encodePacked((has)), _fieldLayout);
143
155
  }
144
156
 
145
- /** Get index */
157
+ /**
158
+ * @notice Get index
159
+ */
146
160
  function getIndex(ResourceId sourceTableId, bytes32 keysHash) internal view returns (uint40 index) {
147
161
  bytes32[] memory _keyTuple = new bytes32[](2);
148
162
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -152,7 +166,9 @@ library UsedKeysIndex {
152
166
  return (uint40(bytes5(_blob)));
153
167
  }
154
168
 
155
- /** Get index */
169
+ /**
170
+ * @notice Get index
171
+ */
156
172
  function _getIndex(ResourceId sourceTableId, bytes32 keysHash) internal view returns (uint40 index) {
157
173
  bytes32[] memory _keyTuple = new bytes32[](2);
158
174
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -162,7 +178,9 @@ library UsedKeysIndex {
162
178
  return (uint40(bytes5(_blob)));
163
179
  }
164
180
 
165
- /** Get index (using the specified store) */
181
+ /**
182
+ * @notice Get index (using the specified store)
183
+ */
166
184
  function getIndex(IStore _store, ResourceId sourceTableId, bytes32 keysHash) internal view returns (uint40 index) {
167
185
  bytes32[] memory _keyTuple = new bytes32[](2);
168
186
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -172,7 +190,9 @@ library UsedKeysIndex {
172
190
  return (uint40(bytes5(_blob)));
173
191
  }
174
192
 
175
- /** Set index */
193
+ /**
194
+ * @notice Set index
195
+ */
176
196
  function setIndex(ResourceId sourceTableId, bytes32 keysHash, uint40 index) internal {
177
197
  bytes32[] memory _keyTuple = new bytes32[](2);
178
198
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -181,7 +201,9 @@ library UsedKeysIndex {
181
201
  StoreSwitch.setStaticField(_tableId, _keyTuple, 1, abi.encodePacked((index)), _fieldLayout);
182
202
  }
183
203
 
184
- /** Set index */
204
+ /**
205
+ * @notice Set index
206
+ */
185
207
  function _setIndex(ResourceId sourceTableId, bytes32 keysHash, uint40 index) internal {
186
208
  bytes32[] memory _keyTuple = new bytes32[](2);
187
209
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -190,7 +212,9 @@ library UsedKeysIndex {
190
212
  StoreCore.setStaticField(_tableId, _keyTuple, 1, abi.encodePacked((index)), _fieldLayout);
191
213
  }
192
214
 
193
- /** Set index (using the specified store) */
215
+ /**
216
+ * @notice Set index (using the specified store)
217
+ */
194
218
  function setIndex(IStore _store, ResourceId sourceTableId, bytes32 keysHash, uint40 index) internal {
195
219
  bytes32[] memory _keyTuple = new bytes32[](2);
196
220
  _keyTuple[0] = ResourceId.unwrap(sourceTableId);
@@ -73,7 +73,9 @@ library KeysWithValue {
73
73
  _store.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
74
74
  }
75
75
 
76
- /** Get keysWithValue */
76
+ /**
77
+ * @notice Get keysWithValue
78
+ */
77
79
  function getKeysWithValue(
78
80
  ResourceId _tableId,
79
81
  bytes32 valueHash
@@ -85,7 +87,9 @@ library KeysWithValue {
85
87
  return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
86
88
  }
87
89
 
88
- /** Get keysWithValue */
90
+ /**
91
+ * @notice Get keysWithValue
92
+ */
89
93
  function _getKeysWithValue(
90
94
  ResourceId _tableId,
91
95
  bytes32 valueHash
@@ -97,7 +101,9 @@ library KeysWithValue {
97
101
  return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
98
102
  }
99
103
 
100
- /** Get keysWithValue (using the specified store) */
104
+ /**
105
+ * @notice Get keysWithValue (using the specified store)
106
+ */
101
107
  function getKeysWithValue(
102
108
  IStore _store,
103
109
  ResourceId _tableId,
@@ -110,7 +116,9 @@ library KeysWithValue {
110
116
  return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
111
117
  }
112
118
 
113
- /** Get keysWithValue */
119
+ /**
120
+ * @notice Get keysWithValue
121
+ */
114
122
  function get(ResourceId _tableId, bytes32 valueHash) internal view returns (bytes32[] memory keysWithValue) {
115
123
  bytes32[] memory _keyTuple = new bytes32[](1);
116
124
  _keyTuple[0] = valueHash;
@@ -119,7 +127,9 @@ library KeysWithValue {
119
127
  return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
120
128
  }
121
129
 
122
- /** Get keysWithValue */
130
+ /**
131
+ * @notice Get keysWithValue
132
+ */
123
133
  function _get(ResourceId _tableId, bytes32 valueHash) internal view returns (bytes32[] memory keysWithValue) {
124
134
  bytes32[] memory _keyTuple = new bytes32[](1);
125
135
  _keyTuple[0] = valueHash;
@@ -128,7 +138,9 @@ library KeysWithValue {
128
138
  return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
129
139
  }
130
140
 
131
- /** Get keysWithValue (using the specified store) */
141
+ /**
142
+ * @notice Get keysWithValue (using the specified store)
143
+ */
132
144
  function get(
133
145
  IStore _store,
134
146
  ResourceId _tableId,
@@ -141,7 +153,9 @@ library KeysWithValue {
141
153
  return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
142
154
  }
143
155
 
144
- /** Set keysWithValue */
156
+ /**
157
+ * @notice Set keysWithValue
158
+ */
145
159
  function setKeysWithValue(ResourceId _tableId, bytes32 valueHash, bytes32[] memory keysWithValue) internal {
146
160
  bytes32[] memory _keyTuple = new bytes32[](1);
147
161
  _keyTuple[0] = valueHash;
@@ -149,7 +163,9 @@ library KeysWithValue {
149
163
  StoreSwitch.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keysWithValue)));
150
164
  }
151
165
 
152
- /** Set keysWithValue */
166
+ /**
167
+ * @notice Set keysWithValue
168
+ */
153
169
  function _setKeysWithValue(ResourceId _tableId, bytes32 valueHash, bytes32[] memory keysWithValue) internal {
154
170
  bytes32[] memory _keyTuple = new bytes32[](1);
155
171
  _keyTuple[0] = valueHash;
@@ -157,7 +173,9 @@ library KeysWithValue {
157
173
  StoreCore.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keysWithValue)));
158
174
  }
159
175
 
160
- /** Set keysWithValue (using the specified store) */
176
+ /**
177
+ * @notice Set keysWithValue (using the specified store)
178
+ */
161
179
  function setKeysWithValue(
162
180
  IStore _store,
163
181
  ResourceId _tableId,
@@ -170,7 +188,9 @@ library KeysWithValue {
170
188
  _store.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keysWithValue)));
171
189
  }
172
190
 
173
- /** Set keysWithValue */
191
+ /**
192
+ * @notice Set keysWithValue
193
+ */
174
194
  function set(ResourceId _tableId, bytes32 valueHash, bytes32[] memory keysWithValue) internal {
175
195
  bytes32[] memory _keyTuple = new bytes32[](1);
176
196
  _keyTuple[0] = valueHash;
@@ -178,7 +198,9 @@ library KeysWithValue {
178
198
  StoreSwitch.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keysWithValue)));
179
199
  }
180
200
 
181
- /** Set keysWithValue */
201
+ /**
202
+ * @notice Set keysWithValue
203
+ */
182
204
  function _set(ResourceId _tableId, bytes32 valueHash, bytes32[] memory keysWithValue) internal {
183
205
  bytes32[] memory _keyTuple = new bytes32[](1);
184
206
  _keyTuple[0] = valueHash;
@@ -186,7 +208,9 @@ library KeysWithValue {
186
208
  StoreCore.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keysWithValue)));
187
209
  }
188
210
 
189
- /** Set keysWithValue (using the specified store) */
211
+ /**
212
+ * @notice Set keysWithValue (using the specified store)
213
+ */
190
214
  function set(IStore _store, ResourceId _tableId, bytes32 valueHash, bytes32[] memory keysWithValue) internal {
191
215
  bytes32[] memory _keyTuple = new bytes32[](1);
192
216
  _keyTuple[0] = valueHash;
@@ -194,7 +218,9 @@ library KeysWithValue {
194
218
  _store.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keysWithValue)));
195
219
  }
196
220
 
197
- /** Get the length of keysWithValue */
221
+ /**
222
+ * @notice Get length of keysWithValue
223
+ */
198
224
  function lengthKeysWithValue(ResourceId _tableId, bytes32 valueHash) internal view returns (uint256) {
199
225
  bytes32[] memory _keyTuple = new bytes32[](1);
200
226
  _keyTuple[0] = valueHash;
@@ -205,7 +231,9 @@ library KeysWithValue {
205
231
  }
206
232
  }
207
233
 
208
- /** Get the length of keysWithValue */
234
+ /**
235
+ * @notice Get length of keysWithValue
236
+ */
209
237
  function _lengthKeysWithValue(ResourceId _tableId, bytes32 valueHash) internal view returns (uint256) {
210
238
  bytes32[] memory _keyTuple = new bytes32[](1);
211
239
  _keyTuple[0] = valueHash;
@@ -216,7 +244,9 @@ library KeysWithValue {
216
244
  }
217
245
  }
218
246
 
219
- /** Get the length of keysWithValue (using the specified store) */
247
+ /**
248
+ * @notice Get length of keysWithValue (using the specified store)
249
+ */
220
250
  function lengthKeysWithValue(IStore _store, ResourceId _tableId, bytes32 valueHash) internal view returns (uint256) {
221
251
  bytes32[] memory _keyTuple = new bytes32[](1);
222
252
  _keyTuple[0] = valueHash;
@@ -227,7 +257,9 @@ library KeysWithValue {
227
257
  }
228
258
  }
229
259
 
230
- /** Get the length of keysWithValue */
260
+ /**
261
+ * @notice Get length of keysWithValue
262
+ */
231
263
  function length(ResourceId _tableId, bytes32 valueHash) internal view returns (uint256) {
232
264
  bytes32[] memory _keyTuple = new bytes32[](1);
233
265
  _keyTuple[0] = valueHash;
@@ -238,7 +270,9 @@ library KeysWithValue {
238
270
  }
239
271
  }
240
272
 
241
- /** Get the length of keysWithValue */
273
+ /**
274
+ * @notice Get length of keysWithValue
275
+ */
242
276
  function _length(ResourceId _tableId, bytes32 valueHash) internal view returns (uint256) {
243
277
  bytes32[] memory _keyTuple = new bytes32[](1);
244
278
  _keyTuple[0] = valueHash;
@@ -249,7 +283,9 @@ library KeysWithValue {
249
283
  }
250
284
  }
251
285
 
252
- /** Get the length of keysWithValue (using the specified store) */
286
+ /**
287
+ * @notice Get length of keysWithValue (using the specified store)
288
+ */
253
289
  function length(IStore _store, ResourceId _tableId, bytes32 valueHash) internal view returns (uint256) {
254
290
  bytes32[] memory _keyTuple = new bytes32[](1);
255
291
  _keyTuple[0] = valueHash;
@@ -261,8 +297,8 @@ library KeysWithValue {
261
297
  }
262
298
 
263
299
  /**
264
- * Get an item of keysWithValue
265
- * (unchecked, returns invalid data if index overflows)
300
+ * @notice Get an item of keysWithValue
301
+ * @dev (unchecked, returns invalid data if index overflows)
266
302
  */
267
303
  function getItemKeysWithValue(
268
304
  ResourceId _tableId,
@@ -279,8 +315,8 @@ library KeysWithValue {
279
315
  }
280
316
 
281
317
  /**
282
- * Get an item of keysWithValue
283
- * (unchecked, returns invalid data if index overflows)
318
+ * @notice Get an item of keysWithValue
319
+ * @dev (unchecked, returns invalid data if index overflows)
284
320
  */
285
321
  function _getItemKeysWithValue(
286
322
  ResourceId _tableId,
@@ -297,8 +333,8 @@ library KeysWithValue {
297
333
  }
298
334
 
299
335
  /**
300
- * Get an item of keysWithValue (using the specified store)
301
- * (unchecked, returns invalid data if index overflows)
336
+ * @notice Get an item of keysWithValue (using the specified store)
337
+ * @dev (unchecked, returns invalid data if index overflows)
302
338
  */
303
339
  function getItemKeysWithValue(
304
340
  IStore _store,
@@ -316,8 +352,8 @@ library KeysWithValue {
316
352
  }
317
353
 
318
354
  /**
319
- * Get an item of keysWithValue
320
- * (unchecked, returns invalid data if index overflows)
355
+ * @notice Get an item of keysWithValue
356
+ * @dev (unchecked, returns invalid data if index overflows)
321
357
  */
322
358
  function getItem(ResourceId _tableId, bytes32 valueHash, uint256 _index) internal view returns (bytes32) {
323
359
  bytes32[] memory _keyTuple = new bytes32[](1);
@@ -330,8 +366,8 @@ library KeysWithValue {
330
366
  }
331
367
 
332
368
  /**
333
- * Get an item of keysWithValue
334
- * (unchecked, returns invalid data if index overflows)
369
+ * @notice Get an item of keysWithValue
370
+ * @dev (unchecked, returns invalid data if index overflows)
335
371
  */
336
372
  function _getItem(ResourceId _tableId, bytes32 valueHash, uint256 _index) internal view returns (bytes32) {
337
373
  bytes32[] memory _keyTuple = new bytes32[](1);
@@ -344,8 +380,8 @@ library KeysWithValue {
344
380
  }
345
381
 
346
382
  /**
347
- * Get an item of keysWithValue (using the specified store)
348
- * (unchecked, returns invalid data if index overflows)
383
+ * @notice Get an item of keysWithValue (using the specified store)
384
+ * @dev (unchecked, returns invalid data if index overflows)
349
385
  */
350
386
  function getItem(
351
387
  IStore _store,
@@ -362,7 +398,9 @@ library KeysWithValue {
362
398
  }
363
399
  }
364
400
 
365
- /** Push an element to keysWithValue */
401
+ /**
402
+ * @notice Push an element to keysWithValue
403
+ */
366
404
  function pushKeysWithValue(ResourceId _tableId, bytes32 valueHash, bytes32 _element) internal {
367
405
  bytes32[] memory _keyTuple = new bytes32[](1);
368
406
  _keyTuple[0] = valueHash;
@@ -370,7 +408,9 @@ library KeysWithValue {
370
408
  StoreSwitch.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
371
409
  }
372
410
 
373
- /** Push an element to keysWithValue */
411
+ /**
412
+ * @notice Push an element to keysWithValue
413
+ */
374
414
  function _pushKeysWithValue(ResourceId _tableId, bytes32 valueHash, bytes32 _element) internal {
375
415
  bytes32[] memory _keyTuple = new bytes32[](1);
376
416
  _keyTuple[0] = valueHash;
@@ -378,7 +418,9 @@ library KeysWithValue {
378
418
  StoreCore.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
379
419
  }
380
420
 
381
- /** Push an element to keysWithValue (using the specified store) */
421
+ /**
422
+ * @notice Push an element to keysWithValue (using the specified store)
423
+ */
382
424
  function pushKeysWithValue(IStore _store, ResourceId _tableId, bytes32 valueHash, bytes32 _element) internal {
383
425
  bytes32[] memory _keyTuple = new bytes32[](1);
384
426
  _keyTuple[0] = valueHash;
@@ -386,7 +428,9 @@ library KeysWithValue {
386
428
  _store.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
387
429
  }
388
430
 
389
- /** Push an element to keysWithValue */
431
+ /**
432
+ * @notice Push an element to keysWithValue
433
+ */
390
434
  function push(ResourceId _tableId, bytes32 valueHash, bytes32 _element) internal {
391
435
  bytes32[] memory _keyTuple = new bytes32[](1);
392
436
  _keyTuple[0] = valueHash;
@@ -394,7 +438,9 @@ library KeysWithValue {
394
438
  StoreSwitch.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
395
439
  }
396
440
 
397
- /** Push an element to keysWithValue */
441
+ /**
442
+ * @notice Push an element to keysWithValue
443
+ */
398
444
  function _push(ResourceId _tableId, bytes32 valueHash, bytes32 _element) internal {
399
445
  bytes32[] memory _keyTuple = new bytes32[](1);
400
446
  _keyTuple[0] = valueHash;
@@ -402,7 +448,9 @@ library KeysWithValue {
402
448
  StoreCore.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
403
449
  }
404
450
 
405
- /** Push an element to keysWithValue (using the specified store) */
451
+ /**
452
+ * @notice Push an element to keysWithValue (using the specified store)
453
+ */
406
454
  function push(IStore _store, ResourceId _tableId, bytes32 valueHash, bytes32 _element) internal {
407
455
  bytes32[] memory _keyTuple = new bytes32[](1);
408
456
  _keyTuple[0] = valueHash;
@@ -410,7 +458,9 @@ library KeysWithValue {
410
458
  _store.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
411
459
  }
412
460
 
413
- /** Pop an element from keysWithValue */
461
+ /**
462
+ * @notice Pop an element from keysWithValue
463
+ */
414
464
  function popKeysWithValue(ResourceId _tableId, bytes32 valueHash) internal {
415
465
  bytes32[] memory _keyTuple = new bytes32[](1);
416
466
  _keyTuple[0] = valueHash;
@@ -418,7 +468,9 @@ library KeysWithValue {
418
468
  StoreSwitch.popFromDynamicField(_tableId, _keyTuple, 0, 32);
419
469
  }
420
470
 
421
- /** Pop an element from keysWithValue */
471
+ /**
472
+ * @notice Pop an element from keysWithValue
473
+ */
422
474
  function _popKeysWithValue(ResourceId _tableId, bytes32 valueHash) internal {
423
475
  bytes32[] memory _keyTuple = new bytes32[](1);
424
476
  _keyTuple[0] = valueHash;
@@ -426,7 +478,9 @@ library KeysWithValue {
426
478
  StoreCore.popFromDynamicField(_tableId, _keyTuple, 0, 32);
427
479
  }
428
480
 
429
- /** Pop an element from keysWithValue (using the specified store) */
481
+ /**
482
+ * @notice Pop an element from keysWithValue (using the specified store)
483
+ */
430
484
  function popKeysWithValue(IStore _store, ResourceId _tableId, bytes32 valueHash) internal {
431
485
  bytes32[] memory _keyTuple = new bytes32[](1);
432
486
  _keyTuple[0] = valueHash;
@@ -434,7 +488,9 @@ library KeysWithValue {
434
488
  _store.popFromDynamicField(_tableId, _keyTuple, 0, 32);
435
489
  }
436
490
 
437
- /** Pop an element from keysWithValue */
491
+ /**
492
+ * @notice Pop an element from keysWithValue
493
+ */
438
494
  function pop(ResourceId _tableId, bytes32 valueHash) internal {
439
495
  bytes32[] memory _keyTuple = new bytes32[](1);
440
496
  _keyTuple[0] = valueHash;
@@ -442,7 +498,9 @@ library KeysWithValue {
442
498
  StoreSwitch.popFromDynamicField(_tableId, _keyTuple, 0, 32);
443
499
  }
444
500
 
445
- /** Pop an element from keysWithValue */
501
+ /**
502
+ * @notice Pop an element from keysWithValue
503
+ */
446
504
  function _pop(ResourceId _tableId, bytes32 valueHash) internal {
447
505
  bytes32[] memory _keyTuple = new bytes32[](1);
448
506
  _keyTuple[0] = valueHash;
@@ -450,7 +508,9 @@ library KeysWithValue {
450
508
  StoreCore.popFromDynamicField(_tableId, _keyTuple, 0, 32);
451
509
  }
452
510
 
453
- /** Pop an element from keysWithValue (using the specified store) */
511
+ /**
512
+ * @notice Pop an element from keysWithValue (using the specified store)
513
+ */
454
514
  function pop(IStore _store, ResourceId _tableId, bytes32 valueHash) internal {
455
515
  bytes32[] memory _keyTuple = new bytes32[](1);
456
516
  _keyTuple[0] = valueHash;
@@ -459,8 +519,8 @@ library KeysWithValue {
459
519
  }
460
520
 
461
521
  /**
462
- * Update an element of keysWithValue at `_index`
463
- * (checked only to prevent modifying other tables; can corrupt own data if index overflows)
522
+ * @notice Update an element of keysWithValue at `_index`
523
+ * @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
464
524
  */
465
525
  function updateKeysWithValue(ResourceId _tableId, bytes32 valueHash, uint256 _index, bytes32 _element) internal {
466
526
  bytes32[] memory _keyTuple = new bytes32[](1);
@@ -473,8 +533,8 @@ library KeysWithValue {
473
533
  }
474
534
 
475
535
  /**
476
- * Update an element of keysWithValue at `_index`
477
- * (checked only to prevent modifying other tables; can corrupt own data if index overflows)
536
+ * @notice Update an element of keysWithValue at `_index`
537
+ * @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
478
538
  */
479
539
  function _updateKeysWithValue(ResourceId _tableId, bytes32 valueHash, uint256 _index, bytes32 _element) internal {
480
540
  bytes32[] memory _keyTuple = new bytes32[](1);
@@ -487,8 +547,8 @@ library KeysWithValue {
487
547
  }
488
548
 
489
549
  /**
490
- * Update an element of keysWithValue (using the specified store) at `_index`
491
- * (checked only to prevent modifying other tables; can corrupt own data if index overflows)
550
+ * @notice Update an element of keysWithValue (using the specified store) at `_index`
551
+ * @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
492
552
  */
493
553
  function updateKeysWithValue(
494
554
  IStore _store,
@@ -507,8 +567,8 @@ library KeysWithValue {
507
567
  }
508
568
 
509
569
  /**
510
- * Update an element of keysWithValue at `_index`
511
- * (checked only to prevent modifying other tables; can corrupt own data if index overflows)
570
+ * @notice Update an element of keysWithValue at `_index`
571
+ * @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
512
572
  */
513
573
  function update(ResourceId _tableId, bytes32 valueHash, uint256 _index, bytes32 _element) internal {
514
574
  bytes32[] memory _keyTuple = new bytes32[](1);
@@ -521,8 +581,8 @@ library KeysWithValue {
521
581
  }
522
582
 
523
583
  /**
524
- * Update an element of keysWithValue at `_index`
525
- * (checked only to prevent modifying other tables; can corrupt own data if index overflows)
584
+ * @notice Update an element of keysWithValue at `_index`
585
+ * @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
526
586
  */
527
587
  function _update(ResourceId _tableId, bytes32 valueHash, uint256 _index, bytes32 _element) internal {
528
588
  bytes32[] memory _keyTuple = new bytes32[](1);
@@ -535,8 +595,8 @@ library KeysWithValue {
535
595
  }
536
596
 
537
597
  /**
538
- * Update an element of keysWithValue (using the specified store) at `_index`
539
- * (checked only to prevent modifying other tables; can corrupt own data if index overflows)
598
+ * @notice Update an element of keysWithValue (using the specified store) at `_index`
599
+ * @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
540
600
  */
541
601
  function update(IStore _store, ResourceId _tableId, bytes32 valueHash, uint256 _index, bytes32 _element) internal {
542
602
  bytes32[] memory _keyTuple = new bytes32[](1);