@latticexyz/world 1.40.0 → 1.41.0

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 (84) hide show
  1. package/LICENSE +21 -0
  2. package/abi/AddressArraySchemaLib.json +718 -869
  3. package/abi/BoolSchemaLib.json +401 -401
  4. package/abi/Bytes.json +1162 -1162
  5. package/abi/CommonBase.json +125 -125
  6. package/abi/DSTest.json +2630 -2630
  7. package/abi/DecodeSlice.json +3883 -3883
  8. package/abi/EncodeArray.json +3336 -3336
  9. package/abi/Hooks.json +1491 -785
  10. package/abi/IMulticall3.json +283 -283
  11. package/abi/IStore.json +623 -421
  12. package/abi/IStoreHook.json +567 -421
  13. package/abi/ISystemHook.json +19 -19
  14. package/abi/Memory.json +131 -131
  15. package/abi/PackedCounterLib.json +683 -683
  16. package/abi/RouteAccess.json +2209 -1159
  17. package/abi/RouteOwnerSchemaLib.json +349 -349
  18. package/abi/RouteOwnerTable.json +297 -297
  19. package/abi/RouteSchemaLib.json +433 -433
  20. package/abi/RouteTable.json +336 -336
  21. package/abi/SchemaLib.json +1211 -1211
  22. package/abi/ScriptBase.json +125 -125
  23. package/abi/SliceInstance.json +429 -429
  24. package/abi/SliceLib.json +429 -429
  25. package/abi/StdAssertions.json +2135 -2135
  26. package/abi/StdChains.json +1051 -1051
  27. package/abi/StdCheats.json +3257 -3257
  28. package/abi/StdCheatsSafe.json +3257 -3257
  29. package/abi/StdInvariant.json +337 -337
  30. package/abi/StdUtils.json +1122 -1122
  31. package/abi/Storage.json +491 -491
  32. package/abi/Store.json +374 -209
  33. package/abi/StoreCore.json +10665 -7865
  34. package/abi/StoreCoreExtended.json +10443 -7722
  35. package/abi/StoreCoreInternal.json +10482 -7638
  36. package/abi/StoreMetadata.json +3719 -2417
  37. package/abi/StoreSwitch.json +1692 -783
  38. package/abi/System.json +16 -16
  39. package/abi/SystemRouteSchemaLib.json +402 -402
  40. package/abi/SystemRouteTable.json +336 -336
  41. package/abi/SystemTable.json +8544 -651
  42. package/abi/SystemTest.json +287 -303
  43. package/abi/Test.json +124 -124
  44. package/abi/TestBase.json +125 -125
  45. package/abi/TestSystem.json +287 -303
  46. package/abi/TightCoder.json +272 -272
  47. package/abi/Utils.json +67 -67
  48. package/abi/Vm.json +1850 -1850
  49. package/abi/VmSafe.json +1850 -1850
  50. package/abi/World.json +5183 -3374
  51. package/abi/WorldTest.json +9983 -10520
  52. package/abi/WorldTestSystem.json +9992 -10503
  53. package/abi/WorldTestTableHook.json +9978 -10511
  54. package/abi/console.json +11417 -11417
  55. package/abi/console2.json +11459 -11459
  56. package/abi/stdError.json +79 -79
  57. package/abi/stdJson.json +1016 -1016
  58. package/abi/stdMath.json +218 -218
  59. package/abi/stdStorage.json +2400 -2400
  60. package/abi/stdStorageSafe.json +2400 -2400
  61. package/package.json +8 -8
  62. package/src/World.sol +78 -32
  63. package/src/schemas/AddressArray.sol +5 -19
  64. package/src/tables/RouteAccess.sol +35 -30
  65. package/src/tables/SystemTable.sol +142 -23
  66. package/types/ethers-contracts/IStore.ts +49 -0
  67. package/types/ethers-contracts/Store.ts +49 -0
  68. package/types/ethers-contracts/World.ts +94 -0
  69. package/types/ethers-contracts/WorldTest.ts +27 -0
  70. package/types/ethers-contracts/factories/IStore__factory.ts +28 -0
  71. package/types/ethers-contracts/factories/StoreCore__factory.ts +2 -23
  72. package/types/ethers-contracts/factories/StoreSwitch__factory.ts +1 -1
  73. package/types/ethers-contracts/factories/Store__factory.ts +81 -0
  74. package/types/ethers-contracts/factories/SystemTest__factory.ts +1 -1
  75. package/types/ethers-contracts/factories/TestSystem__factory.ts +1 -1
  76. package/types/ethers-contracts/factories/WorldTestSystem__factory.ts +12 -1
  77. package/types/ethers-contracts/factories/WorldTestTableHook__factory.ts +1 -1
  78. package/types/ethers-contracts/factories/WorldTest__factory.ts +11 -34
  79. package/types/ethers-contracts/factories/World__factory.ts +70 -30
  80. package/types/ethers-contracts/index.ts +0 -2
  81. package/abi/SystemSchemaLib.json +0 -3704
  82. package/src/schemas/SystemSchema.sol +0 -78
  83. package/types/ethers-contracts/StoreCoreExtended.ts +0 -141
  84. package/types/ethers-contracts/factories/StoreCoreExtended__factory.ts +0 -123
package/abi/Utils.json CHANGED
@@ -72,17 +72,17 @@
72
72
  },
73
73
  "ast": {
74
74
  "absolutePath": "../../node_modules/@latticexyz/store/src/Utils.sol",
75
- "id": 78661,
75
+ "id": 80085,
76
76
  "exportedSymbols": {
77
77
  "Utils": [
78
- 78660
78
+ 80084
79
79
  ]
80
80
  },
81
81
  "nodeType": "SourceUnit",
82
82
  "src": "32:775:11",
83
83
  "nodes": [
84
84
  {
85
- "id": 78612,
85
+ "id": 80036,
86
86
  "nodeType": "PragmaDirective",
87
87
  "src": "32:24:11",
88
88
  "nodes": [],
@@ -94,17 +94,17 @@
94
94
  ]
95
95
  },
96
96
  {
97
- "id": 78660,
97
+ "id": 80084,
98
98
  "nodeType": "ContractDefinition",
99
99
  "src": "58:748:11",
100
100
  "nodes": [
101
101
  {
102
- "id": 78636,
102
+ "id": 80060,
103
103
  "nodeType": "FunctionDefinition",
104
104
  "src": "76:117:11",
105
105
  "nodes": [],
106
106
  "body": {
107
- "id": 78635,
107
+ "id": 80059,
108
108
  "nodeType": "Block",
109
109
  "src": "147:46:11",
110
110
  "nodes": [],
@@ -115,7 +115,7 @@
115
115
  "typeIdentifier": "t_uint256",
116
116
  "typeString": "uint256"
117
117
  },
118
- "id": 78633,
118
+ "id": 80057,
119
119
  "isConstant": false,
120
120
  "isLValue": false,
121
121
  "isPure": false,
@@ -125,17 +125,17 @@
125
125
  "typeIdentifier": "t_uint256",
126
126
  "typeString": "uint256"
127
127
  },
128
- "id": 78623,
128
+ "id": 80047,
129
129
  "isConstant": false,
130
130
  "isLValue": false,
131
131
  "isPure": false,
132
132
  "lValueRequested": false,
133
133
  "leftExpression": {
134
- "id": 78621,
134
+ "id": 80045,
135
135
  "name": "a",
136
136
  "nodeType": "Identifier",
137
137
  "overloadedDeclarations": [],
138
- "referencedDeclaration": 78614,
138
+ "referencedDeclaration": 80038,
139
139
  "src": "160:1:11",
140
140
  "typeDescriptions": {
141
141
  "typeIdentifier": "t_uint256",
@@ -145,11 +145,11 @@
145
145
  "nodeType": "BinaryOperation",
146
146
  "operator": "/",
147
147
  "rightExpression": {
148
- "id": 78622,
148
+ "id": 80046,
149
149
  "name": "b",
150
150
  "nodeType": "Identifier",
151
151
  "overloadedDeclarations": [],
152
- "referencedDeclaration": 78616,
152
+ "referencedDeclaration": 80040,
153
153
  "src": "164:1:11",
154
154
  "typeDescriptions": {
155
155
  "typeIdentifier": "t_uint256",
@@ -172,7 +172,7 @@
172
172
  "typeIdentifier": "t_uint256",
173
173
  "typeString": "uint256"
174
174
  },
175
- "id": 78628,
175
+ "id": 80052,
176
176
  "isConstant": false,
177
177
  "isLValue": false,
178
178
  "isPure": false,
@@ -182,17 +182,17 @@
182
182
  "typeIdentifier": "t_uint256",
183
183
  "typeString": "uint256"
184
184
  },
185
- "id": 78626,
185
+ "id": 80050,
186
186
  "isConstant": false,
187
187
  "isLValue": false,
188
188
  "isPure": false,
189
189
  "lValueRequested": false,
190
190
  "leftExpression": {
191
- "id": 78624,
191
+ "id": 80048,
192
192
  "name": "a",
193
193
  "nodeType": "Identifier",
194
194
  "overloadedDeclarations": [],
195
- "referencedDeclaration": 78614,
195
+ "referencedDeclaration": 80038,
196
196
  "src": "169:1:11",
197
197
  "typeDescriptions": {
198
198
  "typeIdentifier": "t_uint256",
@@ -202,11 +202,11 @@
202
202
  "nodeType": "BinaryOperation",
203
203
  "operator": "%",
204
204
  "rightExpression": {
205
- "id": 78625,
205
+ "id": 80049,
206
206
  "name": "b",
207
207
  "nodeType": "Identifier",
208
208
  "overloadedDeclarations": [],
209
- "referencedDeclaration": 78616,
209
+ "referencedDeclaration": 80040,
210
210
  "src": "173:1:11",
211
211
  "typeDescriptions": {
212
212
  "typeIdentifier": "t_uint256",
@@ -223,7 +223,7 @@
223
223
  "operator": "==",
224
224
  "rightExpression": {
225
225
  "hexValue": "30",
226
- "id": 78627,
226
+ "id": 80051,
227
227
  "isConstant": false,
228
228
  "isLValue": false,
229
229
  "isPure": true,
@@ -245,7 +245,7 @@
245
245
  },
246
246
  "falseExpression": {
247
247
  "hexValue": "31",
248
- "id": 78630,
248
+ "id": 80054,
249
249
  "isConstant": false,
250
250
  "isLValue": false,
251
251
  "isPure": true,
@@ -259,7 +259,7 @@
259
259
  },
260
260
  "value": "1"
261
261
  },
262
- "id": 78631,
262
+ "id": 80055,
263
263
  "isConstant": false,
264
264
  "isLValue": false,
265
265
  "isPure": false,
@@ -268,7 +268,7 @@
268
268
  "src": "169:18:11",
269
269
  "trueExpression": {
270
270
  "hexValue": "30",
271
- "id": 78629,
271
+ "id": 80053,
272
272
  "isConstant": false,
273
273
  "isLValue": false,
274
274
  "isPure": true,
@@ -288,7 +288,7 @@
288
288
  }
289
289
  }
290
290
  ],
291
- "id": 78632,
291
+ "id": 80056,
292
292
  "isConstant": false,
293
293
  "isInlineArray": false,
294
294
  "isLValue": false,
@@ -307,8 +307,8 @@
307
307
  "typeString": "uint256"
308
308
  }
309
309
  },
310
- "functionReturnParameters": 78620,
311
- "id": 78634,
310
+ "functionReturnParameters": 80044,
311
+ "id": 80058,
312
312
  "nodeType": "Return",
313
313
  "src": "153:35:11"
314
314
  }
@@ -320,17 +320,17 @@
320
320
  "name": "divCeil",
321
321
  "nameLocation": "85:7:11",
322
322
  "parameters": {
323
- "id": 78617,
323
+ "id": 80041,
324
324
  "nodeType": "ParameterList",
325
325
  "parameters": [
326
326
  {
327
327
  "constant": false,
328
- "id": 78614,
328
+ "id": 80038,
329
329
  "mutability": "mutable",
330
330
  "name": "a",
331
331
  "nameLocation": "101:1:11",
332
332
  "nodeType": "VariableDeclaration",
333
- "scope": 78636,
333
+ "scope": 80060,
334
334
  "src": "93:9:11",
335
335
  "stateVariable": false,
336
336
  "storageLocation": "default",
@@ -339,7 +339,7 @@
339
339
  "typeString": "uint256"
340
340
  },
341
341
  "typeName": {
342
- "id": 78613,
342
+ "id": 80037,
343
343
  "name": "uint256",
344
344
  "nodeType": "ElementaryTypeName",
345
345
  "src": "93:7:11",
@@ -352,12 +352,12 @@
352
352
  },
353
353
  {
354
354
  "constant": false,
355
- "id": 78616,
355
+ "id": 80040,
356
356
  "mutability": "mutable",
357
357
  "name": "b",
358
358
  "nameLocation": "112:1:11",
359
359
  "nodeType": "VariableDeclaration",
360
- "scope": 78636,
360
+ "scope": 80060,
361
361
  "src": "104:9:11",
362
362
  "stateVariable": false,
363
363
  "storageLocation": "default",
@@ -366,7 +366,7 @@
366
366
  "typeString": "uint256"
367
367
  },
368
368
  "typeName": {
369
- "id": 78615,
369
+ "id": 80039,
370
370
  "name": "uint256",
371
371
  "nodeType": "ElementaryTypeName",
372
372
  "src": "104:7:11",
@@ -381,17 +381,17 @@
381
381
  "src": "92:22:11"
382
382
  },
383
383
  "returnParameters": {
384
- "id": 78620,
384
+ "id": 80044,
385
385
  "nodeType": "ParameterList",
386
386
  "parameters": [
387
387
  {
388
388
  "constant": false,
389
- "id": 78619,
389
+ "id": 80043,
390
390
  "mutability": "mutable",
391
391
  "name": "",
392
392
  "nameLocation": "-1:-1:-1",
393
393
  "nodeType": "VariableDeclaration",
394
- "scope": 78636,
394
+ "scope": 80060,
395
395
  "src": "138:7:11",
396
396
  "stateVariable": false,
397
397
  "storageLocation": "default",
@@ -400,7 +400,7 @@
400
400
  "typeString": "uint256"
401
401
  },
402
402
  "typeName": {
403
- "id": 78618,
403
+ "id": 80042,
404
404
  "name": "uint256",
405
405
  "nodeType": "ElementaryTypeName",
406
406
  "src": "138:7:11",
@@ -414,30 +414,30 @@
414
414
  ],
415
415
  "src": "137:9:11"
416
416
  },
417
- "scope": 78660,
417
+ "scope": 80084,
418
418
  "stateMutability": "pure",
419
419
  "virtual": false,
420
420
  "visibility": "internal"
421
421
  },
422
422
  {
423
- "id": 78659,
423
+ "id": 80083,
424
424
  "nodeType": "FunctionDefinition",
425
425
  "src": "652:152:11",
426
426
  "nodes": [],
427
427
  "body": {
428
- "id": 78658,
428
+ "id": 80082,
429
429
  "nodeType": "Block",
430
430
  "src": "722:82:11",
431
431
  "nodes": [],
432
432
  "statements": [
433
433
  {
434
- "id": 78657,
434
+ "id": 80081,
435
435
  "nodeType": "UncheckedBlock",
436
436
  "src": "728:72:11",
437
437
  "statements": [
438
438
  {
439
439
  "expression": {
440
- "id": 78655,
440
+ "id": 80079,
441
441
  "isConstant": false,
442
442
  "isLValue": false,
443
443
  "isPure": false,
@@ -453,7 +453,7 @@
453
453
  "typeIdentifier": "t_uint256",
454
454
  "typeString": "uint256"
455
455
  },
456
- "id": 78653,
456
+ "id": 80077,
457
457
  "isConstant": false,
458
458
  "isLValue": false,
459
459
  "isPure": false,
@@ -462,7 +462,7 @@
462
462
  "expression": {
463
463
  "arguments": [
464
464
  {
465
- "id": 78646,
465
+ "id": 80070,
466
466
  "isConstant": false,
467
467
  "isLValue": false,
468
468
  "isPure": true,
@@ -474,7 +474,7 @@
474
474
  "typeString": "type(uint256)"
475
475
  },
476
476
  "typeName": {
477
- "id": 78645,
477
+ "id": 80069,
478
478
  "name": "uint256",
479
479
  "nodeType": "ElementaryTypeName",
480
480
  "src": "760:7:11",
@@ -489,7 +489,7 @@
489
489
  "typeString": "type(uint256)"
490
490
  }
491
491
  ],
492
- "id": 78644,
492
+ "id": 80068,
493
493
  "name": "type",
494
494
  "nodeType": "Identifier",
495
495
  "overloadedDeclarations": [],
@@ -500,7 +500,7 @@
500
500
  "typeString": "function () pure"
501
501
  }
502
502
  },
503
- "id": 78647,
503
+ "id": 80071,
504
504
  "isConstant": false,
505
505
  "isLValue": false,
506
506
  "isPure": true,
@@ -515,7 +515,7 @@
515
515
  "typeString": "type(uint256)"
516
516
  }
517
517
  },
518
- "id": 78648,
518
+ "id": 80072,
519
519
  "isConstant": false,
520
520
  "isLValue": false,
521
521
  "isPure": true,
@@ -537,17 +537,17 @@
537
537
  "typeIdentifier": "t_uint256",
538
538
  "typeString": "uint256"
539
539
  },
540
- "id": 78651,
540
+ "id": 80075,
541
541
  "isConstant": false,
542
542
  "isLValue": false,
543
543
  "isPure": false,
544
544
  "lValueRequested": false,
545
545
  "leftExpression": {
546
- "id": 78649,
546
+ "id": 80073,
547
547
  "name": "byteLength",
548
548
  "nodeType": "Identifier",
549
549
  "overloadedDeclarations": [],
550
- "referencedDeclaration": 78639,
550
+ "referencedDeclaration": 80063,
551
551
  "src": "777:10:11",
552
552
  "typeDescriptions": {
553
553
  "typeIdentifier": "t_uint256",
@@ -558,7 +558,7 @@
558
558
  "operator": "*",
559
559
  "rightExpression": {
560
560
  "hexValue": "38",
561
- "id": 78650,
561
+ "id": 80074,
562
562
  "isConstant": false,
563
563
  "isLValue": false,
564
564
  "isPure": true,
@@ -579,7 +579,7 @@
579
579
  }
580
580
  }
581
581
  ],
582
- "id": 78652,
582
+ "id": 80076,
583
583
  "isConstant": false,
584
584
  "isInlineArray": false,
585
585
  "isLValue": false,
@@ -599,7 +599,7 @@
599
599
  }
600
600
  }
601
601
  ],
602
- "id": 78654,
602
+ "id": 80078,
603
603
  "isConstant": false,
604
604
  "isInlineArray": false,
605
605
  "isLValue": false,
@@ -617,8 +617,8 @@
617
617
  "typeString": "uint256"
618
618
  }
619
619
  },
620
- "functionReturnParameters": 78643,
621
- "id": 78656,
620
+ "functionReturnParameters": 80067,
621
+ "id": 80080,
622
622
  "nodeType": "Return",
623
623
  "src": "746:47:11"
624
624
  }
@@ -627,7 +627,7 @@
627
627
  ]
628
628
  },
629
629
  "documentation": {
630
- "id": 78637,
630
+ "id": 80061,
631
631
  "nodeType": "StructuredDocumentation",
632
632
  "src": "197:452:11",
633
633
  "text": " Adapted from https://github.com/dk1a/solidity-stringutils/blob/main/src/utils/mem.sol#L149-L167\n @dev Left-aligned byte mask (e.g. for partial mload/mstore).\n For byteLength >= 32 returns type(uint256).max\n length 0: 0x000000...000000\n length 1: 0xff0000...000000\n length 2: 0xffff00...000000\n ...\n length 30: 0xffffff...ff0000\n length 31: 0xffffff...ffff00\n length 32+: 0xffffff...ffffff"
@@ -638,17 +638,17 @@
638
638
  "name": "leftMask",
639
639
  "nameLocation": "661:8:11",
640
640
  "parameters": {
641
- "id": 78640,
641
+ "id": 80064,
642
642
  "nodeType": "ParameterList",
643
643
  "parameters": [
644
644
  {
645
645
  "constant": false,
646
- "id": 78639,
646
+ "id": 80063,
647
647
  "mutability": "mutable",
648
648
  "name": "byteLength",
649
649
  "nameLocation": "678:10:11",
650
650
  "nodeType": "VariableDeclaration",
651
- "scope": 78659,
651
+ "scope": 80083,
652
652
  "src": "670:18:11",
653
653
  "stateVariable": false,
654
654
  "storageLocation": "default",
@@ -657,7 +657,7 @@
657
657
  "typeString": "uint256"
658
658
  },
659
659
  "typeName": {
660
- "id": 78638,
660
+ "id": 80062,
661
661
  "name": "uint256",
662
662
  "nodeType": "ElementaryTypeName",
663
663
  "src": "670:7:11",
@@ -672,17 +672,17 @@
672
672
  "src": "669:20:11"
673
673
  },
674
674
  "returnParameters": {
675
- "id": 78643,
675
+ "id": 80067,
676
676
  "nodeType": "ParameterList",
677
677
  "parameters": [
678
678
  {
679
679
  "constant": false,
680
- "id": 78642,
680
+ "id": 80066,
681
681
  "mutability": "mutable",
682
682
  "name": "",
683
683
  "nameLocation": "-1:-1:-1",
684
684
  "nodeType": "VariableDeclaration",
685
- "scope": 78659,
685
+ "scope": 80083,
686
686
  "src": "713:7:11",
687
687
  "stateVariable": false,
688
688
  "storageLocation": "default",
@@ -691,7 +691,7 @@
691
691
  "typeString": "uint256"
692
692
  },
693
693
  "typeName": {
694
- "id": 78641,
694
+ "id": 80065,
695
695
  "name": "uint256",
696
696
  "nodeType": "ElementaryTypeName",
697
697
  "src": "713:7:11",
@@ -705,7 +705,7 @@
705
705
  ],
706
706
  "src": "712:9:11"
707
707
  },
708
- "scope": 78660,
708
+ "scope": 80084,
709
709
  "stateMutability": "pure",
710
710
  "virtual": false,
711
711
  "visibility": "internal"
@@ -718,11 +718,11 @@
718
718
  "contractKind": "library",
719
719
  "fullyImplemented": true,
720
720
  "linearizedBaseContracts": [
721
- 78660
721
+ 80084
722
722
  ],
723
723
  "name": "Utils",
724
724
  "nameLocation": "66:5:11",
725
- "scope": 78661,
725
+ "scope": 80085,
726
726
  "usedErrors": []
727
727
  }
728
728
  ],