@latticexyz/world-modules 2.0.0-main-cf2104eb → 2.0.0-main-fe005ee0
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.
- package/out/ArrayLib.sol/ArrayLib.json +255 -255
- package/out/CallboundDelegationControl.sol/CallboundDelegationControl.json +220 -220
- package/out/CallboundDelegations.sol/CallboundDelegations.json +4203 -4203
- package/out/DelegationControl.sol/DelegationControl.json +98 -98
- package/out/Hook.sol/HookInstance.json +13 -13
- package/out/Hook.sol/HookLib.json +13 -13
- package/out/Hooks.sol/Hooks.json +2917 -2917
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.json +14 -14
- package/out/IBalanceTransferSystem.sol/IBalanceTransferSystem.json +15 -15
- package/out/IBaseWorld.sol/IBaseWorld.json +75 -75
- package/out/IBatchCallSystem.sol/IBatchCallSystem.json +19 -19
- package/out/IDelegationControl.sol/IDelegationControl.json +7 -7
- package/out/ISystemHook.sol/ISystemHook.json +12 -12
- package/out/IUniqueEntitySystem.sol/IUniqueEntitySystem.json +13 -13
- package/out/IWorldErrors.sol/IWorldErrors.json +19 -19
- package/out/IWorldKernel.sol/IWorldCall.json +10 -10
- package/out/IWorldKernel.sol/IWorldKernel.json +10 -10
- package/out/IWorldKernel.sol/IWorldModuleInstallation.json +10 -10
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +52 -52
- package/out/KeysInTable.sol/KeysInTable.json +17953 -17953
- package/out/KeysInTableHook.sol/KeysInTableHook.json +882 -882
- package/out/KeysInTableModule.sol/KeysInTableModule.json +549 -549
- package/out/KeysWithValue.sol/KeysWithValue.json +6427 -6427
- package/out/KeysWithValueHook.sol/KeysWithValueHook.json +1008 -1008
- package/out/KeysWithValueModule.sol/KeysWithValueModule.json +434 -434
- package/out/Module.sol/Module.json +88 -88
- package/out/ResourceIds.sol/ResourceIds.json +964 -964
- package/out/Schema.sol/SchemaInstance.json +30 -30
- package/out/Schema.sol/SchemaLib.json +30 -30
- package/out/SchemaType.sol/SchemaType.json +276 -276
- package/out/StandardDelegationsModule.sol/StandardDelegationsModule.json +315 -315
- package/out/StoreCore.sol/StoreCore.json +13 -13
- package/out/StoreCore.sol/StoreCoreInternal.json +13 -13
- package/out/StoreHook.sol/StoreHook.json +368 -368
- package/out/StoreHooks.sol/StoreHooks.json +2692 -2692
- package/out/StoreSwitch.sol/StoreSwitch.json +13 -13
- package/out/System.sol/System.json +32 -32
- package/out/Tables.sol/Tables.json +4684 -4684
- package/out/TimeboundDelegationControl.sol/TimeboundDelegationControl.json +124 -124
- package/out/TimeboundDelegations.sol/TimeboundDelegations.json +3210 -3210
- package/out/UniqueEntity.sol/UniqueEntity.json +2125 -2125
- package/out/UniqueEntityModule.sol/UniqueEntityModule.json +336 -336
- package/out/UniqueEntitySystem.sol/UniqueEntitySystem.json +98 -98
- package/out/UsedKeysIndex.sol/UsedKeysIndex.json +4308 -4308
- package/out/WorldContext.sol/WorldContextConsumer.json +24 -24
- package/out/WorldContext.sol/WorldContextProvider.json +24 -24
- package/out/WorldResourceId.sol/WorldResourceIdInstance.json +96 -96
- package/out/WorldResourceId.sol/WorldResourceIdLib.json +96 -96
- package/out/constants.sol/constants.json +35 -35
- package/out/getKeysInTable.sol/getKeysInTable.json +564 -564
- package/out/getKeysWithValue.sol/getKeysWithValue.json +264 -264
- package/out/getTargetTableId.sol/getTargetTableId.json +163 -163
- package/out/getUniqueEntity.sol/getUniqueEntity.json +88 -88
- package/out/hasKey.sol/hasKey.json +130 -130
- package/out/index.sol/index.json +53 -53
- package/out/interfaces/IBaseWorld.sol/IBaseWorld.json +168 -168
- package/out/query.sol/query.json +1154 -1154
- package/out/revertWithBytes.sol/revertWithBytes.json +15 -15
- package/out/src/Bytes.sol/Bytes.json +1332 -1332
- package/out/src/FieldLayout.sol/FieldLayoutInstance.json +697 -697
- package/out/src/FieldLayout.sol/FieldLayoutLib.json +697 -697
- package/out/src/IStore.sol/IStore.json +52 -52
- package/out/src/IWorldKernel.sol/IWorldCall.json +150 -150
- package/out/src/IWorldKernel.sol/IWorldKernel.json +150 -150
- package/out/src/IWorldKernel.sol/IWorldModuleInstallation.json +150 -150
- package/out/src/Memory.sol/Memory.json +91 -91
- package/out/src/PackedCounter.sol/PackedCounterInstance.json +929 -929
- package/out/src/PackedCounter.sol/PackedCounterLib.json +929 -929
- package/out/src/ResourceId.sol/ResourceIdInstance.json +116 -116
- package/out/src/ResourceId.sol/ResourceIdLib.json +116 -116
- package/out/src/Schema.sol/SchemaInstance.json +790 -790
- package/out/src/Schema.sol/SchemaLib.json +790 -790
- package/out/src/Slice.sol/SliceInstance.json +430 -430
- package/out/src/Slice.sol/SliceLib.json +430 -430
- package/out/src/StoreCore.sol/StoreCore.json +4468 -4468
- package/out/src/StoreCore.sol/StoreCoreInternal.json +4468 -4468
- package/out/src/StoreSwitch.sol/StoreSwitch.json +2496 -2496
- package/out/src/WorldContext.sol/WorldContextConsumer.json +376 -376
- package/out/src/WorldContext.sol/WorldContextProvider.json +376 -376
- package/out/src/WorldResourceId.sol/WorldResourceIdInstance.json +476 -476
- package/out/src/WorldResourceId.sol/WorldResourceIdLib.json +476 -476
- package/out/storeHookTypes.sol/storeHookTypes.json +115 -115
- package/out/storeResourceTypes.sol/storeResourceTypes.json +12 -12
- package/out/tables/ResourceIds.sol/ResourceIds.json +2665 -2665
- package/out/tables/Tables.sol/Tables.json +11899 -11899
- package/out/tightcoder/EncodeArray.sol/EncodeArray.json +3345 -3345
- package/out/types.sol/types.json +60 -72
- package/out/worldResourceTypes.sol/worldResourceTypes.json +53 -53
- package/package.json +8 -8
- package/src/interfaces/IBaseWorld.sol +3 -2
- package/src/modules/keysintable/tables/KeysInTable.sol +285 -135
- package/src/modules/keysintable/tables/UsedKeysIndex.sol +36 -12
- package/src/modules/keyswithvalue/tables/KeysWithValue.sol +114 -54
- package/src/modules/std-delegations/tables/CallboundDelegations.sol +36 -12
- package/src/modules/std-delegations/tables/TimeboundDelegations.sol +36 -12
- package/src/modules/uniqueentity/tables/UniqueEntity.sol +36 -12
@@ -97,7 +97,9 @@ library KeysInTable {
|
|
97
97
|
_store.registerTable(_tableId, _fieldLayout, getKeySchema(), getValueSchema(), getKeyNames(), getFieldNames());
|
98
98
|
}
|
99
99
|
|
100
|
-
/**
|
100
|
+
/**
|
101
|
+
* @notice Get keys0
|
102
|
+
*/
|
101
103
|
function getKeys0(ResourceId sourceTableId) internal view returns (bytes32[] memory keys0) {
|
102
104
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
103
105
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -106,7 +108,9 @@ library KeysInTable {
|
|
106
108
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
107
109
|
}
|
108
110
|
|
109
|
-
/**
|
111
|
+
/**
|
112
|
+
* @notice Get keys0
|
113
|
+
*/
|
110
114
|
function _getKeys0(ResourceId sourceTableId) internal view returns (bytes32[] memory keys0) {
|
111
115
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
112
116
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -115,7 +119,9 @@ library KeysInTable {
|
|
115
119
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
116
120
|
}
|
117
121
|
|
118
|
-
/**
|
122
|
+
/**
|
123
|
+
* @notice Get keys0 (using the specified store)
|
124
|
+
*/
|
119
125
|
function getKeys0(IStore _store, ResourceId sourceTableId) internal view returns (bytes32[] memory keys0) {
|
120
126
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
121
127
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -124,7 +130,9 @@ library KeysInTable {
|
|
124
130
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
125
131
|
}
|
126
132
|
|
127
|
-
/**
|
133
|
+
/**
|
134
|
+
* @notice Set keys0
|
135
|
+
*/
|
128
136
|
function setKeys0(ResourceId sourceTableId, bytes32[] memory keys0) internal {
|
129
137
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
130
138
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -132,7 +140,9 @@ library KeysInTable {
|
|
132
140
|
StoreSwitch.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keys0)));
|
133
141
|
}
|
134
142
|
|
135
|
-
/**
|
143
|
+
/**
|
144
|
+
* @notice Set keys0
|
145
|
+
*/
|
136
146
|
function _setKeys0(ResourceId sourceTableId, bytes32[] memory keys0) internal {
|
137
147
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
138
148
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -140,7 +150,9 @@ library KeysInTable {
|
|
140
150
|
StoreCore.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keys0)));
|
141
151
|
}
|
142
152
|
|
143
|
-
/**
|
153
|
+
/**
|
154
|
+
* @notice Set keys0 (using the specified store)
|
155
|
+
*/
|
144
156
|
function setKeys0(IStore _store, ResourceId sourceTableId, bytes32[] memory keys0) internal {
|
145
157
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
146
158
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -148,7 +160,9 @@ library KeysInTable {
|
|
148
160
|
_store.setDynamicField(_tableId, _keyTuple, 0, EncodeArray.encode((keys0)));
|
149
161
|
}
|
150
162
|
|
151
|
-
/**
|
163
|
+
/**
|
164
|
+
* @notice Get length of keys0
|
165
|
+
*/
|
152
166
|
function lengthKeys0(ResourceId sourceTableId) internal view returns (uint256) {
|
153
167
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
154
168
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -159,7 +173,9 @@ library KeysInTable {
|
|
159
173
|
}
|
160
174
|
}
|
161
175
|
|
162
|
-
/**
|
176
|
+
/**
|
177
|
+
* @notice Get length of keys0
|
178
|
+
*/
|
163
179
|
function _lengthKeys0(ResourceId sourceTableId) internal view returns (uint256) {
|
164
180
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
165
181
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -170,7 +186,9 @@ library KeysInTable {
|
|
170
186
|
}
|
171
187
|
}
|
172
188
|
|
173
|
-
/**
|
189
|
+
/**
|
190
|
+
* @notice Get length of keys0 (using the specified store)
|
191
|
+
*/
|
174
192
|
function lengthKeys0(IStore _store, ResourceId sourceTableId) internal view returns (uint256) {
|
175
193
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
176
194
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -182,8 +200,8 @@ library KeysInTable {
|
|
182
200
|
}
|
183
201
|
|
184
202
|
/**
|
185
|
-
* Get an item of keys0
|
186
|
-
* (unchecked, returns invalid data if index overflows)
|
203
|
+
* @notice Get an item of keys0
|
204
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
187
205
|
*/
|
188
206
|
function getItemKeys0(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
189
207
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -196,8 +214,8 @@ library KeysInTable {
|
|
196
214
|
}
|
197
215
|
|
198
216
|
/**
|
199
|
-
* Get an item of keys0
|
200
|
-
* (unchecked, returns invalid data if index overflows)
|
217
|
+
* @notice Get an item of keys0
|
218
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
201
219
|
*/
|
202
220
|
function _getItemKeys0(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
203
221
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -210,8 +228,8 @@ library KeysInTable {
|
|
210
228
|
}
|
211
229
|
|
212
230
|
/**
|
213
|
-
* Get an item of keys0 (using the specified store)
|
214
|
-
* (unchecked, returns invalid data if index overflows)
|
231
|
+
* @notice Get an item of keys0 (using the specified store)
|
232
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
215
233
|
*/
|
216
234
|
function getItemKeys0(IStore _store, ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
217
235
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -223,7 +241,9 @@ library KeysInTable {
|
|
223
241
|
}
|
224
242
|
}
|
225
243
|
|
226
|
-
/**
|
244
|
+
/**
|
245
|
+
* @notice Push an element to keys0
|
246
|
+
*/
|
227
247
|
function pushKeys0(ResourceId sourceTableId, bytes32 _element) internal {
|
228
248
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
229
249
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -231,7 +251,9 @@ library KeysInTable {
|
|
231
251
|
StoreSwitch.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
|
232
252
|
}
|
233
253
|
|
234
|
-
/**
|
254
|
+
/**
|
255
|
+
* @notice Push an element to keys0
|
256
|
+
*/
|
235
257
|
function _pushKeys0(ResourceId sourceTableId, bytes32 _element) internal {
|
236
258
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
237
259
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -239,7 +261,9 @@ library KeysInTable {
|
|
239
261
|
StoreCore.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
|
240
262
|
}
|
241
263
|
|
242
|
-
/**
|
264
|
+
/**
|
265
|
+
* @notice Push an element to keys0 (using the specified store)
|
266
|
+
*/
|
243
267
|
function pushKeys0(IStore _store, ResourceId sourceTableId, bytes32 _element) internal {
|
244
268
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
245
269
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -247,7 +271,9 @@ library KeysInTable {
|
|
247
271
|
_store.pushToDynamicField(_tableId, _keyTuple, 0, abi.encodePacked((_element)));
|
248
272
|
}
|
249
273
|
|
250
|
-
/**
|
274
|
+
/**
|
275
|
+
* @notice Pop an element from keys0
|
276
|
+
*/
|
251
277
|
function popKeys0(ResourceId sourceTableId) internal {
|
252
278
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
253
279
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -255,7 +281,9 @@ library KeysInTable {
|
|
255
281
|
StoreSwitch.popFromDynamicField(_tableId, _keyTuple, 0, 32);
|
256
282
|
}
|
257
283
|
|
258
|
-
/**
|
284
|
+
/**
|
285
|
+
* @notice Pop an element from keys0
|
286
|
+
*/
|
259
287
|
function _popKeys0(ResourceId sourceTableId) internal {
|
260
288
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
261
289
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -263,7 +291,9 @@ library KeysInTable {
|
|
263
291
|
StoreCore.popFromDynamicField(_tableId, _keyTuple, 0, 32);
|
264
292
|
}
|
265
293
|
|
266
|
-
/**
|
294
|
+
/**
|
295
|
+
* @notice Pop an element from keys0 (using the specified store)
|
296
|
+
*/
|
267
297
|
function popKeys0(IStore _store, ResourceId sourceTableId) internal {
|
268
298
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
269
299
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -272,8 +302,8 @@ library KeysInTable {
|
|
272
302
|
}
|
273
303
|
|
274
304
|
/**
|
275
|
-
* Update an element of keys0 at `_index`
|
276
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
305
|
+
* @notice Update an element of keys0 at `_index`
|
306
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
277
307
|
*/
|
278
308
|
function updateKeys0(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
279
309
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -286,8 +316,8 @@ library KeysInTable {
|
|
286
316
|
}
|
287
317
|
|
288
318
|
/**
|
289
|
-
* Update an element of keys0 at `_index`
|
290
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
319
|
+
* @notice Update an element of keys0 at `_index`
|
320
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
291
321
|
*/
|
292
322
|
function _updateKeys0(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
293
323
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -300,8 +330,8 @@ library KeysInTable {
|
|
300
330
|
}
|
301
331
|
|
302
332
|
/**
|
303
|
-
* Update an element of keys0 (using the specified store) at `_index`
|
304
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
333
|
+
* @notice Update an element of keys0 (using the specified store) at `_index`
|
334
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
305
335
|
*/
|
306
336
|
function updateKeys0(IStore _store, ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
307
337
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -313,7 +343,9 @@ library KeysInTable {
|
|
313
343
|
}
|
314
344
|
}
|
315
345
|
|
316
|
-
/**
|
346
|
+
/**
|
347
|
+
* @notice Get keys1
|
348
|
+
*/
|
317
349
|
function getKeys1(ResourceId sourceTableId) internal view returns (bytes32[] memory keys1) {
|
318
350
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
319
351
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -322,7 +354,9 @@ library KeysInTable {
|
|
322
354
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
323
355
|
}
|
324
356
|
|
325
|
-
/**
|
357
|
+
/**
|
358
|
+
* @notice Get keys1
|
359
|
+
*/
|
326
360
|
function _getKeys1(ResourceId sourceTableId) internal view returns (bytes32[] memory keys1) {
|
327
361
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
328
362
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -331,7 +365,9 @@ library KeysInTable {
|
|
331
365
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
332
366
|
}
|
333
367
|
|
334
|
-
/**
|
368
|
+
/**
|
369
|
+
* @notice Get keys1 (using the specified store)
|
370
|
+
*/
|
335
371
|
function getKeys1(IStore _store, ResourceId sourceTableId) internal view returns (bytes32[] memory keys1) {
|
336
372
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
337
373
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -340,7 +376,9 @@ library KeysInTable {
|
|
340
376
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
341
377
|
}
|
342
378
|
|
343
|
-
/**
|
379
|
+
/**
|
380
|
+
* @notice Set keys1
|
381
|
+
*/
|
344
382
|
function setKeys1(ResourceId sourceTableId, bytes32[] memory keys1) internal {
|
345
383
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
346
384
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -348,7 +386,9 @@ library KeysInTable {
|
|
348
386
|
StoreSwitch.setDynamicField(_tableId, _keyTuple, 1, EncodeArray.encode((keys1)));
|
349
387
|
}
|
350
388
|
|
351
|
-
/**
|
389
|
+
/**
|
390
|
+
* @notice Set keys1
|
391
|
+
*/
|
352
392
|
function _setKeys1(ResourceId sourceTableId, bytes32[] memory keys1) internal {
|
353
393
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
354
394
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -356,7 +396,9 @@ library KeysInTable {
|
|
356
396
|
StoreCore.setDynamicField(_tableId, _keyTuple, 1, EncodeArray.encode((keys1)));
|
357
397
|
}
|
358
398
|
|
359
|
-
/**
|
399
|
+
/**
|
400
|
+
* @notice Set keys1 (using the specified store)
|
401
|
+
*/
|
360
402
|
function setKeys1(IStore _store, ResourceId sourceTableId, bytes32[] memory keys1) internal {
|
361
403
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
362
404
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -364,7 +406,9 @@ library KeysInTable {
|
|
364
406
|
_store.setDynamicField(_tableId, _keyTuple, 1, EncodeArray.encode((keys1)));
|
365
407
|
}
|
366
408
|
|
367
|
-
/**
|
409
|
+
/**
|
410
|
+
* @notice Get length of keys1
|
411
|
+
*/
|
368
412
|
function lengthKeys1(ResourceId sourceTableId) internal view returns (uint256) {
|
369
413
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
370
414
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -375,7 +419,9 @@ library KeysInTable {
|
|
375
419
|
}
|
376
420
|
}
|
377
421
|
|
378
|
-
/**
|
422
|
+
/**
|
423
|
+
* @notice Get length of keys1
|
424
|
+
*/
|
379
425
|
function _lengthKeys1(ResourceId sourceTableId) internal view returns (uint256) {
|
380
426
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
381
427
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -386,7 +432,9 @@ library KeysInTable {
|
|
386
432
|
}
|
387
433
|
}
|
388
434
|
|
389
|
-
/**
|
435
|
+
/**
|
436
|
+
* @notice Get length of keys1 (using the specified store)
|
437
|
+
*/
|
390
438
|
function lengthKeys1(IStore _store, ResourceId sourceTableId) internal view returns (uint256) {
|
391
439
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
392
440
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -398,8 +446,8 @@ library KeysInTable {
|
|
398
446
|
}
|
399
447
|
|
400
448
|
/**
|
401
|
-
* Get an item of keys1
|
402
|
-
* (unchecked, returns invalid data if index overflows)
|
449
|
+
* @notice Get an item of keys1
|
450
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
403
451
|
*/
|
404
452
|
function getItemKeys1(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
405
453
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -412,8 +460,8 @@ library KeysInTable {
|
|
412
460
|
}
|
413
461
|
|
414
462
|
/**
|
415
|
-
* Get an item of keys1
|
416
|
-
* (unchecked, returns invalid data if index overflows)
|
463
|
+
* @notice Get an item of keys1
|
464
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
417
465
|
*/
|
418
466
|
function _getItemKeys1(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
419
467
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -426,8 +474,8 @@ library KeysInTable {
|
|
426
474
|
}
|
427
475
|
|
428
476
|
/**
|
429
|
-
* Get an item of keys1 (using the specified store)
|
430
|
-
* (unchecked, returns invalid data if index overflows)
|
477
|
+
* @notice Get an item of keys1 (using the specified store)
|
478
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
431
479
|
*/
|
432
480
|
function getItemKeys1(IStore _store, ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
433
481
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -439,7 +487,9 @@ library KeysInTable {
|
|
439
487
|
}
|
440
488
|
}
|
441
489
|
|
442
|
-
/**
|
490
|
+
/**
|
491
|
+
* @notice Push an element to keys1
|
492
|
+
*/
|
443
493
|
function pushKeys1(ResourceId sourceTableId, bytes32 _element) internal {
|
444
494
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
445
495
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -447,7 +497,9 @@ library KeysInTable {
|
|
447
497
|
StoreSwitch.pushToDynamicField(_tableId, _keyTuple, 1, abi.encodePacked((_element)));
|
448
498
|
}
|
449
499
|
|
450
|
-
/**
|
500
|
+
/**
|
501
|
+
* @notice Push an element to keys1
|
502
|
+
*/
|
451
503
|
function _pushKeys1(ResourceId sourceTableId, bytes32 _element) internal {
|
452
504
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
453
505
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -455,7 +507,9 @@ library KeysInTable {
|
|
455
507
|
StoreCore.pushToDynamicField(_tableId, _keyTuple, 1, abi.encodePacked((_element)));
|
456
508
|
}
|
457
509
|
|
458
|
-
/**
|
510
|
+
/**
|
511
|
+
* @notice Push an element to keys1 (using the specified store)
|
512
|
+
*/
|
459
513
|
function pushKeys1(IStore _store, ResourceId sourceTableId, bytes32 _element) internal {
|
460
514
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
461
515
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -463,7 +517,9 @@ library KeysInTable {
|
|
463
517
|
_store.pushToDynamicField(_tableId, _keyTuple, 1, abi.encodePacked((_element)));
|
464
518
|
}
|
465
519
|
|
466
|
-
/**
|
520
|
+
/**
|
521
|
+
* @notice Pop an element from keys1
|
522
|
+
*/
|
467
523
|
function popKeys1(ResourceId sourceTableId) internal {
|
468
524
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
469
525
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -471,7 +527,9 @@ library KeysInTable {
|
|
471
527
|
StoreSwitch.popFromDynamicField(_tableId, _keyTuple, 1, 32);
|
472
528
|
}
|
473
529
|
|
474
|
-
/**
|
530
|
+
/**
|
531
|
+
* @notice Pop an element from keys1
|
532
|
+
*/
|
475
533
|
function _popKeys1(ResourceId sourceTableId) internal {
|
476
534
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
477
535
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -479,7 +537,9 @@ library KeysInTable {
|
|
479
537
|
StoreCore.popFromDynamicField(_tableId, _keyTuple, 1, 32);
|
480
538
|
}
|
481
539
|
|
482
|
-
/**
|
540
|
+
/**
|
541
|
+
* @notice Pop an element from keys1 (using the specified store)
|
542
|
+
*/
|
483
543
|
function popKeys1(IStore _store, ResourceId sourceTableId) internal {
|
484
544
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
485
545
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -488,8 +548,8 @@ library KeysInTable {
|
|
488
548
|
}
|
489
549
|
|
490
550
|
/**
|
491
|
-
* Update an element of keys1 at `_index`
|
492
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
551
|
+
* @notice Update an element of keys1 at `_index`
|
552
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
493
553
|
*/
|
494
554
|
function updateKeys1(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
495
555
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -502,8 +562,8 @@ library KeysInTable {
|
|
502
562
|
}
|
503
563
|
|
504
564
|
/**
|
505
|
-
* Update an element of keys1 at `_index`
|
506
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
565
|
+
* @notice Update an element of keys1 at `_index`
|
566
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
507
567
|
*/
|
508
568
|
function _updateKeys1(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
509
569
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -516,8 +576,8 @@ library KeysInTable {
|
|
516
576
|
}
|
517
577
|
|
518
578
|
/**
|
519
|
-
* Update an element of keys1 (using the specified store) at `_index`
|
520
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
579
|
+
* @notice Update an element of keys1 (using the specified store) at `_index`
|
580
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
521
581
|
*/
|
522
582
|
function updateKeys1(IStore _store, ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
523
583
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -529,7 +589,9 @@ library KeysInTable {
|
|
529
589
|
}
|
530
590
|
}
|
531
591
|
|
532
|
-
/**
|
592
|
+
/**
|
593
|
+
* @notice Get keys2
|
594
|
+
*/
|
533
595
|
function getKeys2(ResourceId sourceTableId) internal view returns (bytes32[] memory keys2) {
|
534
596
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
535
597
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -538,7 +600,9 @@ library KeysInTable {
|
|
538
600
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
539
601
|
}
|
540
602
|
|
541
|
-
/**
|
603
|
+
/**
|
604
|
+
* @notice Get keys2
|
605
|
+
*/
|
542
606
|
function _getKeys2(ResourceId sourceTableId) internal view returns (bytes32[] memory keys2) {
|
543
607
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
544
608
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -547,7 +611,9 @@ library KeysInTable {
|
|
547
611
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
548
612
|
}
|
549
613
|
|
550
|
-
/**
|
614
|
+
/**
|
615
|
+
* @notice Get keys2 (using the specified store)
|
616
|
+
*/
|
551
617
|
function getKeys2(IStore _store, ResourceId sourceTableId) internal view returns (bytes32[] memory keys2) {
|
552
618
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
553
619
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -556,7 +622,9 @@ library KeysInTable {
|
|
556
622
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
557
623
|
}
|
558
624
|
|
559
|
-
/**
|
625
|
+
/**
|
626
|
+
* @notice Set keys2
|
627
|
+
*/
|
560
628
|
function setKeys2(ResourceId sourceTableId, bytes32[] memory keys2) internal {
|
561
629
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
562
630
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -564,7 +632,9 @@ library KeysInTable {
|
|
564
632
|
StoreSwitch.setDynamicField(_tableId, _keyTuple, 2, EncodeArray.encode((keys2)));
|
565
633
|
}
|
566
634
|
|
567
|
-
/**
|
635
|
+
/**
|
636
|
+
* @notice Set keys2
|
637
|
+
*/
|
568
638
|
function _setKeys2(ResourceId sourceTableId, bytes32[] memory keys2) internal {
|
569
639
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
570
640
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -572,7 +642,9 @@ library KeysInTable {
|
|
572
642
|
StoreCore.setDynamicField(_tableId, _keyTuple, 2, EncodeArray.encode((keys2)));
|
573
643
|
}
|
574
644
|
|
575
|
-
/**
|
645
|
+
/**
|
646
|
+
* @notice Set keys2 (using the specified store)
|
647
|
+
*/
|
576
648
|
function setKeys2(IStore _store, ResourceId sourceTableId, bytes32[] memory keys2) internal {
|
577
649
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
578
650
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -580,7 +652,9 @@ library KeysInTable {
|
|
580
652
|
_store.setDynamicField(_tableId, _keyTuple, 2, EncodeArray.encode((keys2)));
|
581
653
|
}
|
582
654
|
|
583
|
-
/**
|
655
|
+
/**
|
656
|
+
* @notice Get length of keys2
|
657
|
+
*/
|
584
658
|
function lengthKeys2(ResourceId sourceTableId) internal view returns (uint256) {
|
585
659
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
586
660
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -591,7 +665,9 @@ library KeysInTable {
|
|
591
665
|
}
|
592
666
|
}
|
593
667
|
|
594
|
-
/**
|
668
|
+
/**
|
669
|
+
* @notice Get length of keys2
|
670
|
+
*/
|
595
671
|
function _lengthKeys2(ResourceId sourceTableId) internal view returns (uint256) {
|
596
672
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
597
673
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -602,7 +678,9 @@ library KeysInTable {
|
|
602
678
|
}
|
603
679
|
}
|
604
680
|
|
605
|
-
/**
|
681
|
+
/**
|
682
|
+
* @notice Get length of keys2 (using the specified store)
|
683
|
+
*/
|
606
684
|
function lengthKeys2(IStore _store, ResourceId sourceTableId) internal view returns (uint256) {
|
607
685
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
608
686
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -614,8 +692,8 @@ library KeysInTable {
|
|
614
692
|
}
|
615
693
|
|
616
694
|
/**
|
617
|
-
* Get an item of keys2
|
618
|
-
* (unchecked, returns invalid data if index overflows)
|
695
|
+
* @notice Get an item of keys2
|
696
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
619
697
|
*/
|
620
698
|
function getItemKeys2(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
621
699
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -628,8 +706,8 @@ library KeysInTable {
|
|
628
706
|
}
|
629
707
|
|
630
708
|
/**
|
631
|
-
* Get an item of keys2
|
632
|
-
* (unchecked, returns invalid data if index overflows)
|
709
|
+
* @notice Get an item of keys2
|
710
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
633
711
|
*/
|
634
712
|
function _getItemKeys2(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
635
713
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -642,8 +720,8 @@ library KeysInTable {
|
|
642
720
|
}
|
643
721
|
|
644
722
|
/**
|
645
|
-
* Get an item of keys2 (using the specified store)
|
646
|
-
* (unchecked, returns invalid data if index overflows)
|
723
|
+
* @notice Get an item of keys2 (using the specified store)
|
724
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
647
725
|
*/
|
648
726
|
function getItemKeys2(IStore _store, ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
649
727
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -655,7 +733,9 @@ library KeysInTable {
|
|
655
733
|
}
|
656
734
|
}
|
657
735
|
|
658
|
-
/**
|
736
|
+
/**
|
737
|
+
* @notice Push an element to keys2
|
738
|
+
*/
|
659
739
|
function pushKeys2(ResourceId sourceTableId, bytes32 _element) internal {
|
660
740
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
661
741
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -663,7 +743,9 @@ library KeysInTable {
|
|
663
743
|
StoreSwitch.pushToDynamicField(_tableId, _keyTuple, 2, abi.encodePacked((_element)));
|
664
744
|
}
|
665
745
|
|
666
|
-
/**
|
746
|
+
/**
|
747
|
+
* @notice Push an element to keys2
|
748
|
+
*/
|
667
749
|
function _pushKeys2(ResourceId sourceTableId, bytes32 _element) internal {
|
668
750
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
669
751
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -671,7 +753,9 @@ library KeysInTable {
|
|
671
753
|
StoreCore.pushToDynamicField(_tableId, _keyTuple, 2, abi.encodePacked((_element)));
|
672
754
|
}
|
673
755
|
|
674
|
-
/**
|
756
|
+
/**
|
757
|
+
* @notice Push an element to keys2 (using the specified store)
|
758
|
+
*/
|
675
759
|
function pushKeys2(IStore _store, ResourceId sourceTableId, bytes32 _element) internal {
|
676
760
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
677
761
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -679,7 +763,9 @@ library KeysInTable {
|
|
679
763
|
_store.pushToDynamicField(_tableId, _keyTuple, 2, abi.encodePacked((_element)));
|
680
764
|
}
|
681
765
|
|
682
|
-
/**
|
766
|
+
/**
|
767
|
+
* @notice Pop an element from keys2
|
768
|
+
*/
|
683
769
|
function popKeys2(ResourceId sourceTableId) internal {
|
684
770
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
685
771
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -687,7 +773,9 @@ library KeysInTable {
|
|
687
773
|
StoreSwitch.popFromDynamicField(_tableId, _keyTuple, 2, 32);
|
688
774
|
}
|
689
775
|
|
690
|
-
/**
|
776
|
+
/**
|
777
|
+
* @notice Pop an element from keys2
|
778
|
+
*/
|
691
779
|
function _popKeys2(ResourceId sourceTableId) internal {
|
692
780
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
693
781
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -695,7 +783,9 @@ library KeysInTable {
|
|
695
783
|
StoreCore.popFromDynamicField(_tableId, _keyTuple, 2, 32);
|
696
784
|
}
|
697
785
|
|
698
|
-
/**
|
786
|
+
/**
|
787
|
+
* @notice Pop an element from keys2 (using the specified store)
|
788
|
+
*/
|
699
789
|
function popKeys2(IStore _store, ResourceId sourceTableId) internal {
|
700
790
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
701
791
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -704,8 +794,8 @@ library KeysInTable {
|
|
704
794
|
}
|
705
795
|
|
706
796
|
/**
|
707
|
-
* Update an element of keys2 at `_index`
|
708
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
797
|
+
* @notice Update an element of keys2 at `_index`
|
798
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
709
799
|
*/
|
710
800
|
function updateKeys2(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
711
801
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -718,8 +808,8 @@ library KeysInTable {
|
|
718
808
|
}
|
719
809
|
|
720
810
|
/**
|
721
|
-
* Update an element of keys2 at `_index`
|
722
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
811
|
+
* @notice Update an element of keys2 at `_index`
|
812
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
723
813
|
*/
|
724
814
|
function _updateKeys2(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
725
815
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -732,8 +822,8 @@ library KeysInTable {
|
|
732
822
|
}
|
733
823
|
|
734
824
|
/**
|
735
|
-
* Update an element of keys2 (using the specified store) at `_index`
|
736
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
825
|
+
* @notice Update an element of keys2 (using the specified store) at `_index`
|
826
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
737
827
|
*/
|
738
828
|
function updateKeys2(IStore _store, ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
739
829
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -745,7 +835,9 @@ library KeysInTable {
|
|
745
835
|
}
|
746
836
|
}
|
747
837
|
|
748
|
-
/**
|
838
|
+
/**
|
839
|
+
* @notice Get keys3
|
840
|
+
*/
|
749
841
|
function getKeys3(ResourceId sourceTableId) internal view returns (bytes32[] memory keys3) {
|
750
842
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
751
843
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -754,7 +846,9 @@ library KeysInTable {
|
|
754
846
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
755
847
|
}
|
756
848
|
|
757
|
-
/**
|
849
|
+
/**
|
850
|
+
* @notice Get keys3
|
851
|
+
*/
|
758
852
|
function _getKeys3(ResourceId sourceTableId) internal view returns (bytes32[] memory keys3) {
|
759
853
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
760
854
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -763,7 +857,9 @@ library KeysInTable {
|
|
763
857
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
764
858
|
}
|
765
859
|
|
766
|
-
/**
|
860
|
+
/**
|
861
|
+
* @notice Get keys3 (using the specified store)
|
862
|
+
*/
|
767
863
|
function getKeys3(IStore _store, ResourceId sourceTableId) internal view returns (bytes32[] memory keys3) {
|
768
864
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
769
865
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -772,7 +868,9 @@ library KeysInTable {
|
|
772
868
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
773
869
|
}
|
774
870
|
|
775
|
-
/**
|
871
|
+
/**
|
872
|
+
* @notice Set keys3
|
873
|
+
*/
|
776
874
|
function setKeys3(ResourceId sourceTableId, bytes32[] memory keys3) internal {
|
777
875
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
778
876
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -780,7 +878,9 @@ library KeysInTable {
|
|
780
878
|
StoreSwitch.setDynamicField(_tableId, _keyTuple, 3, EncodeArray.encode((keys3)));
|
781
879
|
}
|
782
880
|
|
783
|
-
/**
|
881
|
+
/**
|
882
|
+
* @notice Set keys3
|
883
|
+
*/
|
784
884
|
function _setKeys3(ResourceId sourceTableId, bytes32[] memory keys3) internal {
|
785
885
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
786
886
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -788,7 +888,9 @@ library KeysInTable {
|
|
788
888
|
StoreCore.setDynamicField(_tableId, _keyTuple, 3, EncodeArray.encode((keys3)));
|
789
889
|
}
|
790
890
|
|
791
|
-
/**
|
891
|
+
/**
|
892
|
+
* @notice Set keys3 (using the specified store)
|
893
|
+
*/
|
792
894
|
function setKeys3(IStore _store, ResourceId sourceTableId, bytes32[] memory keys3) internal {
|
793
895
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
794
896
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -796,7 +898,9 @@ library KeysInTable {
|
|
796
898
|
_store.setDynamicField(_tableId, _keyTuple, 3, EncodeArray.encode((keys3)));
|
797
899
|
}
|
798
900
|
|
799
|
-
/**
|
901
|
+
/**
|
902
|
+
* @notice Get length of keys3
|
903
|
+
*/
|
800
904
|
function lengthKeys3(ResourceId sourceTableId) internal view returns (uint256) {
|
801
905
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
802
906
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -807,7 +911,9 @@ library KeysInTable {
|
|
807
911
|
}
|
808
912
|
}
|
809
913
|
|
810
|
-
/**
|
914
|
+
/**
|
915
|
+
* @notice Get length of keys3
|
916
|
+
*/
|
811
917
|
function _lengthKeys3(ResourceId sourceTableId) internal view returns (uint256) {
|
812
918
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
813
919
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -818,7 +924,9 @@ library KeysInTable {
|
|
818
924
|
}
|
819
925
|
}
|
820
926
|
|
821
|
-
/**
|
927
|
+
/**
|
928
|
+
* @notice Get length of keys3 (using the specified store)
|
929
|
+
*/
|
822
930
|
function lengthKeys3(IStore _store, ResourceId sourceTableId) internal view returns (uint256) {
|
823
931
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
824
932
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -830,8 +938,8 @@ library KeysInTable {
|
|
830
938
|
}
|
831
939
|
|
832
940
|
/**
|
833
|
-
* Get an item of keys3
|
834
|
-
* (unchecked, returns invalid data if index overflows)
|
941
|
+
* @notice Get an item of keys3
|
942
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
835
943
|
*/
|
836
944
|
function getItemKeys3(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
837
945
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -844,8 +952,8 @@ library KeysInTable {
|
|
844
952
|
}
|
845
953
|
|
846
954
|
/**
|
847
|
-
* Get an item of keys3
|
848
|
-
* (unchecked, returns invalid data if index overflows)
|
955
|
+
* @notice Get an item of keys3
|
956
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
849
957
|
*/
|
850
958
|
function _getItemKeys3(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
851
959
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -858,8 +966,8 @@ library KeysInTable {
|
|
858
966
|
}
|
859
967
|
|
860
968
|
/**
|
861
|
-
* Get an item of keys3 (using the specified store)
|
862
|
-
* (unchecked, returns invalid data if index overflows)
|
969
|
+
* @notice Get an item of keys3 (using the specified store)
|
970
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
863
971
|
*/
|
864
972
|
function getItemKeys3(IStore _store, ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
865
973
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -871,7 +979,9 @@ library KeysInTable {
|
|
871
979
|
}
|
872
980
|
}
|
873
981
|
|
874
|
-
/**
|
982
|
+
/**
|
983
|
+
* @notice Push an element to keys3
|
984
|
+
*/
|
875
985
|
function pushKeys3(ResourceId sourceTableId, bytes32 _element) internal {
|
876
986
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
877
987
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -879,7 +989,9 @@ library KeysInTable {
|
|
879
989
|
StoreSwitch.pushToDynamicField(_tableId, _keyTuple, 3, abi.encodePacked((_element)));
|
880
990
|
}
|
881
991
|
|
882
|
-
/**
|
992
|
+
/**
|
993
|
+
* @notice Push an element to keys3
|
994
|
+
*/
|
883
995
|
function _pushKeys3(ResourceId sourceTableId, bytes32 _element) internal {
|
884
996
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
885
997
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -887,7 +999,9 @@ library KeysInTable {
|
|
887
999
|
StoreCore.pushToDynamicField(_tableId, _keyTuple, 3, abi.encodePacked((_element)));
|
888
1000
|
}
|
889
1001
|
|
890
|
-
/**
|
1002
|
+
/**
|
1003
|
+
* @notice Push an element to keys3 (using the specified store)
|
1004
|
+
*/
|
891
1005
|
function pushKeys3(IStore _store, ResourceId sourceTableId, bytes32 _element) internal {
|
892
1006
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
893
1007
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -895,7 +1009,9 @@ library KeysInTable {
|
|
895
1009
|
_store.pushToDynamicField(_tableId, _keyTuple, 3, abi.encodePacked((_element)));
|
896
1010
|
}
|
897
1011
|
|
898
|
-
/**
|
1012
|
+
/**
|
1013
|
+
* @notice Pop an element from keys3
|
1014
|
+
*/
|
899
1015
|
function popKeys3(ResourceId sourceTableId) internal {
|
900
1016
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
901
1017
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -903,7 +1019,9 @@ library KeysInTable {
|
|
903
1019
|
StoreSwitch.popFromDynamicField(_tableId, _keyTuple, 3, 32);
|
904
1020
|
}
|
905
1021
|
|
906
|
-
/**
|
1022
|
+
/**
|
1023
|
+
* @notice Pop an element from keys3
|
1024
|
+
*/
|
907
1025
|
function _popKeys3(ResourceId sourceTableId) internal {
|
908
1026
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
909
1027
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -911,7 +1029,9 @@ library KeysInTable {
|
|
911
1029
|
StoreCore.popFromDynamicField(_tableId, _keyTuple, 3, 32);
|
912
1030
|
}
|
913
1031
|
|
914
|
-
/**
|
1032
|
+
/**
|
1033
|
+
* @notice Pop an element from keys3 (using the specified store)
|
1034
|
+
*/
|
915
1035
|
function popKeys3(IStore _store, ResourceId sourceTableId) internal {
|
916
1036
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
917
1037
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -920,8 +1040,8 @@ library KeysInTable {
|
|
920
1040
|
}
|
921
1041
|
|
922
1042
|
/**
|
923
|
-
* Update an element of keys3 at `_index`
|
924
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1043
|
+
* @notice Update an element of keys3 at `_index`
|
1044
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
925
1045
|
*/
|
926
1046
|
function updateKeys3(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
927
1047
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -934,8 +1054,8 @@ library KeysInTable {
|
|
934
1054
|
}
|
935
1055
|
|
936
1056
|
/**
|
937
|
-
* Update an element of keys3 at `_index`
|
938
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1057
|
+
* @notice Update an element of keys3 at `_index`
|
1058
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
939
1059
|
*/
|
940
1060
|
function _updateKeys3(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
941
1061
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -948,8 +1068,8 @@ library KeysInTable {
|
|
948
1068
|
}
|
949
1069
|
|
950
1070
|
/**
|
951
|
-
* Update an element of keys3 (using the specified store) at `_index`
|
952
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1071
|
+
* @notice Update an element of keys3 (using the specified store) at `_index`
|
1072
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
953
1073
|
*/
|
954
1074
|
function updateKeys3(IStore _store, ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
955
1075
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -961,7 +1081,9 @@ library KeysInTable {
|
|
961
1081
|
}
|
962
1082
|
}
|
963
1083
|
|
964
|
-
/**
|
1084
|
+
/**
|
1085
|
+
* @notice Get keys4
|
1086
|
+
*/
|
965
1087
|
function getKeys4(ResourceId sourceTableId) internal view returns (bytes32[] memory keys4) {
|
966
1088
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
967
1089
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -970,7 +1092,9 @@ library KeysInTable {
|
|
970
1092
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
971
1093
|
}
|
972
1094
|
|
973
|
-
/**
|
1095
|
+
/**
|
1096
|
+
* @notice Get keys4
|
1097
|
+
*/
|
974
1098
|
function _getKeys4(ResourceId sourceTableId) internal view returns (bytes32[] memory keys4) {
|
975
1099
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
976
1100
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -979,7 +1103,9 @@ library KeysInTable {
|
|
979
1103
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
980
1104
|
}
|
981
1105
|
|
982
|
-
/**
|
1106
|
+
/**
|
1107
|
+
* @notice Get keys4 (using the specified store)
|
1108
|
+
*/
|
983
1109
|
function getKeys4(IStore _store, ResourceId sourceTableId) internal view returns (bytes32[] memory keys4) {
|
984
1110
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
985
1111
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -988,7 +1114,9 @@ library KeysInTable {
|
|
988
1114
|
return (SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes32());
|
989
1115
|
}
|
990
1116
|
|
991
|
-
/**
|
1117
|
+
/**
|
1118
|
+
* @notice Set keys4
|
1119
|
+
*/
|
992
1120
|
function setKeys4(ResourceId sourceTableId, bytes32[] memory keys4) internal {
|
993
1121
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
994
1122
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -996,7 +1124,9 @@ library KeysInTable {
|
|
996
1124
|
StoreSwitch.setDynamicField(_tableId, _keyTuple, 4, EncodeArray.encode((keys4)));
|
997
1125
|
}
|
998
1126
|
|
999
|
-
/**
|
1127
|
+
/**
|
1128
|
+
* @notice Set keys4
|
1129
|
+
*/
|
1000
1130
|
function _setKeys4(ResourceId sourceTableId, bytes32[] memory keys4) internal {
|
1001
1131
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1002
1132
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1004,7 +1134,9 @@ library KeysInTable {
|
|
1004
1134
|
StoreCore.setDynamicField(_tableId, _keyTuple, 4, EncodeArray.encode((keys4)));
|
1005
1135
|
}
|
1006
1136
|
|
1007
|
-
/**
|
1137
|
+
/**
|
1138
|
+
* @notice Set keys4 (using the specified store)
|
1139
|
+
*/
|
1008
1140
|
function setKeys4(IStore _store, ResourceId sourceTableId, bytes32[] memory keys4) internal {
|
1009
1141
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1010
1142
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1012,7 +1144,9 @@ library KeysInTable {
|
|
1012
1144
|
_store.setDynamicField(_tableId, _keyTuple, 4, EncodeArray.encode((keys4)));
|
1013
1145
|
}
|
1014
1146
|
|
1015
|
-
/**
|
1147
|
+
/**
|
1148
|
+
* @notice Get length of keys4
|
1149
|
+
*/
|
1016
1150
|
function lengthKeys4(ResourceId sourceTableId) internal view returns (uint256) {
|
1017
1151
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1018
1152
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1023,7 +1157,9 @@ library KeysInTable {
|
|
1023
1157
|
}
|
1024
1158
|
}
|
1025
1159
|
|
1026
|
-
/**
|
1160
|
+
/**
|
1161
|
+
* @notice Get length of keys4
|
1162
|
+
*/
|
1027
1163
|
function _lengthKeys4(ResourceId sourceTableId) internal view returns (uint256) {
|
1028
1164
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1029
1165
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1034,7 +1170,9 @@ library KeysInTable {
|
|
1034
1170
|
}
|
1035
1171
|
}
|
1036
1172
|
|
1037
|
-
/**
|
1173
|
+
/**
|
1174
|
+
* @notice Get length of keys4 (using the specified store)
|
1175
|
+
*/
|
1038
1176
|
function lengthKeys4(IStore _store, ResourceId sourceTableId) internal view returns (uint256) {
|
1039
1177
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1040
1178
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1046,8 +1184,8 @@ library KeysInTable {
|
|
1046
1184
|
}
|
1047
1185
|
|
1048
1186
|
/**
|
1049
|
-
* Get an item of keys4
|
1050
|
-
* (unchecked, returns invalid data if index overflows)
|
1187
|
+
* @notice Get an item of keys4
|
1188
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
1051
1189
|
*/
|
1052
1190
|
function getItemKeys4(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
1053
1191
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1060,8 +1198,8 @@ library KeysInTable {
|
|
1060
1198
|
}
|
1061
1199
|
|
1062
1200
|
/**
|
1063
|
-
* Get an item of keys4
|
1064
|
-
* (unchecked, returns invalid data if index overflows)
|
1201
|
+
* @notice Get an item of keys4
|
1202
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
1065
1203
|
*/
|
1066
1204
|
function _getItemKeys4(ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
1067
1205
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1074,8 +1212,8 @@ library KeysInTable {
|
|
1074
1212
|
}
|
1075
1213
|
|
1076
1214
|
/**
|
1077
|
-
* Get an item of keys4 (using the specified store)
|
1078
|
-
* (unchecked, returns invalid data if index overflows)
|
1215
|
+
* @notice Get an item of keys4 (using the specified store)
|
1216
|
+
* @dev (unchecked, returns invalid data if index overflows)
|
1079
1217
|
*/
|
1080
1218
|
function getItemKeys4(IStore _store, ResourceId sourceTableId, uint256 _index) internal view returns (bytes32) {
|
1081
1219
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1087,7 +1225,9 @@ library KeysInTable {
|
|
1087
1225
|
}
|
1088
1226
|
}
|
1089
1227
|
|
1090
|
-
/**
|
1228
|
+
/**
|
1229
|
+
* @notice Push an element to keys4
|
1230
|
+
*/
|
1091
1231
|
function pushKeys4(ResourceId sourceTableId, bytes32 _element) internal {
|
1092
1232
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1093
1233
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1095,7 +1235,9 @@ library KeysInTable {
|
|
1095
1235
|
StoreSwitch.pushToDynamicField(_tableId, _keyTuple, 4, abi.encodePacked((_element)));
|
1096
1236
|
}
|
1097
1237
|
|
1098
|
-
/**
|
1238
|
+
/**
|
1239
|
+
* @notice Push an element to keys4
|
1240
|
+
*/
|
1099
1241
|
function _pushKeys4(ResourceId sourceTableId, bytes32 _element) internal {
|
1100
1242
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1101
1243
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1103,7 +1245,9 @@ library KeysInTable {
|
|
1103
1245
|
StoreCore.pushToDynamicField(_tableId, _keyTuple, 4, abi.encodePacked((_element)));
|
1104
1246
|
}
|
1105
1247
|
|
1106
|
-
/**
|
1248
|
+
/**
|
1249
|
+
* @notice Push an element to keys4 (using the specified store)
|
1250
|
+
*/
|
1107
1251
|
function pushKeys4(IStore _store, ResourceId sourceTableId, bytes32 _element) internal {
|
1108
1252
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1109
1253
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1111,7 +1255,9 @@ library KeysInTable {
|
|
1111
1255
|
_store.pushToDynamicField(_tableId, _keyTuple, 4, abi.encodePacked((_element)));
|
1112
1256
|
}
|
1113
1257
|
|
1114
|
-
/**
|
1258
|
+
/**
|
1259
|
+
* @notice Pop an element from keys4
|
1260
|
+
*/
|
1115
1261
|
function popKeys4(ResourceId sourceTableId) internal {
|
1116
1262
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1117
1263
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1119,7 +1265,9 @@ library KeysInTable {
|
|
1119
1265
|
StoreSwitch.popFromDynamicField(_tableId, _keyTuple, 4, 32);
|
1120
1266
|
}
|
1121
1267
|
|
1122
|
-
/**
|
1268
|
+
/**
|
1269
|
+
* @notice Pop an element from keys4
|
1270
|
+
*/
|
1123
1271
|
function _popKeys4(ResourceId sourceTableId) internal {
|
1124
1272
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1125
1273
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1127,7 +1275,9 @@ library KeysInTable {
|
|
1127
1275
|
StoreCore.popFromDynamicField(_tableId, _keyTuple, 4, 32);
|
1128
1276
|
}
|
1129
1277
|
|
1130
|
-
/**
|
1278
|
+
/**
|
1279
|
+
* @notice Pop an element from keys4 (using the specified store)
|
1280
|
+
*/
|
1131
1281
|
function popKeys4(IStore _store, ResourceId sourceTableId) internal {
|
1132
1282
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
1133
1283
|
_keyTuple[0] = ResourceId.unwrap(sourceTableId);
|
@@ -1136,8 +1286,8 @@ library KeysInTable {
|
|
1136
1286
|
}
|
1137
1287
|
|
1138
1288
|
/**
|
1139
|
-
* Update an element of keys4 at `_index`
|
1140
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1289
|
+
* @notice Update an element of keys4 at `_index`
|
1290
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1141
1291
|
*/
|
1142
1292
|
function updateKeys4(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
1143
1293
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1150,8 +1300,8 @@ library KeysInTable {
|
|
1150
1300
|
}
|
1151
1301
|
|
1152
1302
|
/**
|
1153
|
-
* Update an element of keys4 at `_index`
|
1154
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1303
|
+
* @notice Update an element of keys4 at `_index`
|
1304
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1155
1305
|
*/
|
1156
1306
|
function _updateKeys4(ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
1157
1307
|
bytes32[] memory _keyTuple = new bytes32[](1);
|
@@ -1164,8 +1314,8 @@ library KeysInTable {
|
|
1164
1314
|
}
|
1165
1315
|
|
1166
1316
|
/**
|
1167
|
-
* Update an element of keys4 (using the specified store) at `_index`
|
1168
|
-
* (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1317
|
+
* @notice Update an element of keys4 (using the specified store) at `_index`
|
1318
|
+
* @dev (checked only to prevent modifying other tables; can corrupt own data if index overflows)
|
1169
1319
|
*/
|
1170
1320
|
function updateKeys4(IStore _store, ResourceId sourceTableId, uint256 _index, bytes32 _element) internal {
|
1171
1321
|
bytes32[] memory _keyTuple = new bytes32[](1);
|