@latticexyz/world 3.0.0-main-fb1cfef0c → 3.0.0-main-570086e7b
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/dist/chunk-3GDI67QT.js +2 -0
- package/dist/chunk-3GDI67QT.js.map +1 -0
- package/dist/chunk-TKEDEBQZ.js +2 -0
- package/dist/chunk-TKEDEBQZ.js.map +1 -0
- package/dist/{chunk-3EELS6P3.js → chunk-TKS7AYPJ.js} +2 -2
- package/dist/config/v2.d.ts +2 -2
- package/dist/config/v2.js +1 -1
- package/dist/{dynamicResolution-34391fca.d.ts → dynamicResolution-26462ea5.d.ts} +3 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/mud.config.js +1 -1
- package/dist/node.d.ts +17 -16
- package/dist/node.js +13 -15
- package/dist/node.js.map +1 -1
- package/dist/{world-ae07544a.d.ts → world-5ea87cd7.d.ts} +4 -11
- package/out/AccessControl.sol/AccessControl.json +1 -1
- package/out/AccessControl.t.sol/AccessControlTest.json +1 -1
- package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
- package/out/AddressArray.sol/AddressArray.json +1 -1
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
- package/out/Balances.sol/Balances.json +1 -1
- package/out/BatchCall.t.sol/BatchCallTest.json +1 -1
- package/out/BatchCall.t.sol/TestSystem.json +1 -1
- package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
- package/out/Bool.sol/Bool.json +1 -1
- package/out/Delegation.sol/Delegation.json +1 -1
- package/out/DelegationControl.sol/DelegationControl.json +1 -1
- package/out/DelegationControlMock.sol/DelegationControlMock.json +1 -1
- package/out/Factories.t.sol/FactoriesTest.json +1 -1
- package/out/FunctionSelectors.sol/FunctionSelectors.json +1 -1
- package/out/FunctionSignatures.sol/FunctionSignatures.json +1 -1
- package/out/Hook.sol/HookInstance.json +1 -1
- package/out/Hook.sol/HookLib.json +1 -1
- package/out/Hooks.sol/Hooks.json +1 -1
- package/out/IAccessManagementSystem.sol/IAccessManagementSystem.json +1 -1
- package/out/IBaseWorld.sol/IBaseWorld.json +1 -1
- package/out/IBatchCallSystem.sol/IBatchCallSystem.json +1 -1
- package/out/IModuleInstallationSystem.sol/IModuleInstallationSystem.json +1 -1
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -1
- package/out/InitModule.sol/InitModule.json +1 -1
- package/out/InitModule.t.sol/InitModuleTest.json +1 -1
- package/out/InitModule.t.sol/WorldMock.json +1 -1
- package/out/InitModuleAddress.sol/InitModuleAddress.json +1 -1
- package/out/InitSystems.t.sol/LimitedCallContextTest.json +1 -1
- package/out/InstalledModules.sol/InstalledModules.json +1 -1
- package/out/Module.sol/Module.json +1 -1
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +1 -1
- package/out/MudTest.t.sol/MudTest.json +1 -1
- package/out/NamespaceDelegationControl.sol/NamespaceDelegationControl.json +1 -1
- package/out/NamespaceOwner.sol/NamespaceOwner.json +1 -1
- package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -1
- package/out/ResourceAccess.sol/ResourceAccess.json +1 -1
- package/out/ResourceIds.sol/ResourceIds.json +1 -1
- package/out/Store.sol/Store.json +1 -1
- package/out/StoreCore.sol/StoreCore.json +1 -1
- package/out/StoreCore.sol/StoreCoreInternal.json +1 -1
- package/out/StoreHooks.sol/StoreHooks.json +1 -1
- package/out/StoreKernel.sol/StoreKernel.json +1 -1
- package/out/StoreMock.sol/StoreMock.json +1 -1
- package/out/StoreRead.sol/StoreRead.json +1 -1
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -1
- package/out/StoreSwitch.sol/StoreSwitch.json +1 -1
- package/out/System.sol/System.json +1 -1
- package/out/System.t.sol/SystemTest.json +1 -1
- package/out/System.t.sol/TestSystem.json +1 -1
- package/out/SystemCall.sol/SystemCall.json +1 -1
- package/out/SystemHook.t.sol/SystemHookTest.json +1 -1
- package/out/SystemHooks.sol/SystemHooks.json +1 -1
- package/out/SystemRegistry.sol/SystemRegistry.json +1 -1
- package/out/Systems.sol/Systems.json +1 -1
- package/out/Tables.sol/Tables.json +1 -1
- package/out/TwoFields.sol/TwoFields.json +1 -1
- package/out/UserDelegationControl.sol/UserDelegationControl.json +1 -1
- package/out/Utils.sol/Utils.json +1 -1
- package/out/Utils.t.sol/UtilsTest.json +1 -1
- package/out/Utils.t.sol/UtilsTestSystem.json +1 -1
- package/out/World.sol/World.json +1 -1
- package/out/World.t.sol/EchoSystemHook.json +1 -1
- package/out/World.t.sol/IWorldTestSystem.json +1 -1
- package/out/World.t.sol/PayableFallbackSystem.json +1 -1
- package/out/World.t.sol/RevertSystemHook.json +1 -1
- package/out/World.t.sol/WorldTest.json +1 -1
- package/out/World.t.sol/WorldTestSystem.json +1 -1
- package/out/WorldBalance.t.sol/WorldBalanceTest.json +1 -1
- package/out/WorldBalance.t.sol/WorldBalanceTestSystem.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumer.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumerLib.json +1 -1
- package/out/WorldContext.sol/WorldContextProviderLib.json +1 -1
- package/out/WorldContext.t.sol/TestContextConsumer.json +1 -1
- package/out/WorldContext.t.sol/WorldContextTest.json +1 -1
- package/out/WorldDynamicUpdate.t.sol/UpdateInDynamicFieldTest.json +1 -1
- package/out/WorldFactory.sol/WorldFactory.json +1 -1
- package/out/WorldProxy.sol/WorldProxy.json +1 -1
- package/out/WorldProxy.t.sol/WorldProxyTest.json +1 -1
- package/out/WorldProxyFactory.sol/WorldProxyFactory.json +1 -1
- package/out/WorldProxyFactory.t.sol/WorldProxyFactoryTest.json +1 -1
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1 -1
- package/out/build-info/{11c85b26e1969ca82de39d2cfbd09ca2.json → 9140863eb5fa14e70284daf8950dfe77.json} +1 -1
- package/package.json +8 -8
- package/src/codegen/interfaces/IAccessManagementSystem.sol +1 -1
- package/src/codegen/interfaces/IBaseWorld.sol +0 -1
- package/src/codegen/interfaces/IBatchCallSystem.sol +1 -1
- package/src/codegen/interfaces/IModuleInstallationSystem.sol +1 -1
- package/src/codegen/interfaces/IWorldRegistrationSystem.sol +2 -2
- package/dist/chunk-2DPDMM6H.js +0 -2
- package/dist/chunk-2DPDMM6H.js.map +0 -1
- package/dist/chunk-DK3XOTC2.js +0 -2
- package/dist/chunk-DK3XOTC2.js.map +0 -1
- /package/dist/{chunk-3EELS6P3.js.map → chunk-TKS7AYPJ.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"id":"
|
1
|
+
{"id":"9140863eb5fa14e70284daf8950dfe77","source_id_to_path":{"0":"node_modules/@latticexyz/gas-report/src/GasReporter.sol","1":"node_modules/@latticexyz/schema-type/src/solidity/SchemaType.sol","2":"node_modules/@latticexyz/store/src/Bytes.sol","3":"node_modules/@latticexyz/store/src/EncodedLengths.sol","4":"node_modules/@latticexyz/store/src/FieldLayout.sol","5":"node_modules/@latticexyz/store/src/Hook.sol","6":"node_modules/@latticexyz/store/src/IERC165.sol","7":"node_modules/@latticexyz/store/src/IEncodedLengthsErrors.sol","8":"node_modules/@latticexyz/store/src/IFieldLayoutErrors.sol","9":"node_modules/@latticexyz/store/src/ISchemaErrors.sol","10":"node_modules/@latticexyz/store/src/ISliceErrors.sol","11":"node_modules/@latticexyz/store/src/IStore.sol","12":"node_modules/@latticexyz/store/src/IStoreErrors.sol","13":"node_modules/@latticexyz/store/src/IStoreEvents.sol","14":"node_modules/@latticexyz/store/src/IStoreHook.sol","15":"node_modules/@latticexyz/store/src/IStoreKernel.sol","16":"node_modules/@latticexyz/store/src/IStoreRead.sol","17":"node_modules/@latticexyz/store/src/IStoreRegistration.sol","18":"node_modules/@latticexyz/store/src/IStoreWrite.sol","19":"node_modules/@latticexyz/store/src/Memory.sol","20":"node_modules/@latticexyz/store/src/ResourceId.sol","21":"node_modules/@latticexyz/store/src/Schema.sol","22":"node_modules/@latticexyz/store/src/Slice.sol","23":"node_modules/@latticexyz/store/src/Storage.sol","24":"node_modules/@latticexyz/store/src/Store.sol","25":"node_modules/@latticexyz/store/src/StoreCore.sol","26":"node_modules/@latticexyz/store/src/StoreHook.sol","27":"node_modules/@latticexyz/store/src/StoreKernel.sol","28":"node_modules/@latticexyz/store/src/StoreRead.sol","29":"node_modules/@latticexyz/store/src/StoreSwitch.sol","30":"node_modules/@latticexyz/store/src/codegen/index.sol","31":"node_modules/@latticexyz/store/src/codegen/tables/Hooks.sol","32":"node_modules/@latticexyz/store/src/codegen/tables/ResourceIds.sol","33":"node_modules/@latticexyz/store/src/codegen/tables/StoreHooks.sol","34":"node_modules/@latticexyz/store/src/codegen/tables/Tables.sol","35":"node_modules/@latticexyz/store/src/constants.sol","36":"node_modules/@latticexyz/store/src/rightMask.sol","37":"node_modules/@latticexyz/store/src/storeHookTypes.sol","38":"node_modules/@latticexyz/store/src/storeResourceTypes.sol","39":"node_modules/@latticexyz/store/src/tightcoder/DecodeSlice.sol","40":"node_modules/@latticexyz/store/src/tightcoder/EncodeArray.sol","41":"node_modules/@latticexyz/store/src/tightcoder/TightCoder.sol","42":"node_modules/@latticexyz/store/src/version.sol","43":"node_modules/@latticexyz/store/test/EchoSubscriber.sol","44":"node_modules/@latticexyz/store/test/FieldLayoutEncodeHelper.sol","45":"node_modules/@latticexyz/store/test/RevertSubscriber.sol","46":"node_modules/@latticexyz/store/test/SchemaEncodeHelper.sol","47":"node_modules/@latticexyz/store/test/StoreMock.sol","48":"node_modules/ds-test/src/test.sol","49":"node_modules/forge-std/src/Base.sol","50":"node_modules/forge-std/src/StdAssertions.sol","51":"node_modules/forge-std/src/StdChains.sol","52":"node_modules/forge-std/src/StdCheats.sol","53":"node_modules/forge-std/src/StdError.sol","54":"node_modules/forge-std/src/StdInvariant.sol","55":"node_modules/forge-std/src/StdJson.sol","56":"node_modules/forge-std/src/StdMath.sol","57":"node_modules/forge-std/src/StdStorage.sol","58":"node_modules/forge-std/src/StdStyle.sol","59":"node_modules/forge-std/src/StdUtils.sol","60":"node_modules/forge-std/src/Test.sol","61":"node_modules/forge-std/src/Vm.sol","62":"node_modules/forge-std/src/console.sol","63":"node_modules/forge-std/src/console2.sol","64":"node_modules/forge-std/src/interfaces/IMulticall3.sol","65":"node_modules/forge-std/src/safeconsole.sol","66":"src/AccessControl.sol","67":"src/Create2.sol","68":"src/Create2Factory.sol","69":"src/Delegation.sol","70":"src/DelegationControl.sol","71":"src/ERC165Checker.sol","72":"src/IDelegationControl.sol","73":"src/IERC165.sol","74":"src/IERC1967.sol","75":"src/IModule.sol","76":"src/IModuleErrors.sol","77":"src/ISystemHook.sol","78":"src/IWorldContextConsumer.sol","79":"src/IWorldErrors.sol","80":"src/IWorldEvents.sol","81":"src/IWorldFactory.sol","82":"src/IWorldKernel.sol","83":"src/Module.sol","84":"src/Proxy.sol","85":"src/StorageSlot.sol","86":"src/System.sol","87":"src/SystemCall.sol","88":"src/SystemHook.sol","89":"src/Utils.sol","90":"src/World.sol","91":"src/WorldContext.sol","92":"src/WorldFactory.sol","93":"src/WorldProxy.sol","94":"src/WorldProxyFactory.sol","95":"src/WorldResourceId.sol","96":"src/codegen/index.sol","97":"src/codegen/interfaces/IAccessManagementSystem.sol","98":"src/codegen/interfaces/IBalanceTransferSystem.sol","99":"src/codegen/interfaces/IBaseWorld.sol","100":"src/codegen/interfaces/IBatchCallSystem.sol","101":"src/codegen/interfaces/IModuleInstallationSystem.sol","102":"src/codegen/interfaces/IRegistrationSystem.sol","103":"src/codegen/interfaces/IWorldRegistrationSystem.sol","104":"src/codegen/tables/Balances.sol","105":"src/codegen/tables/FunctionSelectors.sol","106":"src/codegen/tables/FunctionSignatures.sol","107":"src/codegen/tables/InitModuleAddress.sol","108":"src/codegen/tables/InstalledModules.sol","109":"src/codegen/tables/NamespaceDelegationControl.sol","110":"src/codegen/tables/NamespaceOwner.sol","111":"src/codegen/tables/ResourceAccess.sol","112":"src/codegen/tables/SystemHooks.sol","113":"src/codegen/tables/SystemRegistry.sol","114":"src/codegen/tables/Systems.sol","115":"src/codegen/tables/UserDelegationControl.sol","116":"src/constants.sol","117":"src/modules/init/InitModule.sol","118":"src/modules/init/LimitedCallContext.sol","119":"src/modules/init/RegistrationSystem.sol","120":"src/modules/init/constants.sol","121":"src/modules/init/functionSignatures.sol","122":"src/modules/init/implementations/AccessManagementSystem.sol","123":"src/modules/init/implementations/BalanceTransferSystem.sol","124":"src/modules/init/implementations/BatchCallSystem.sol","125":"src/modules/init/implementations/ModuleInstallationSystem.sol","126":"src/modules/init/implementations/StoreRegistrationSystem.sol","127":"src/modules/init/implementations/WorldRegistrationSystem.sol","128":"src/modules/init/implementations/createDelegation.sol","129":"src/modules/init/types.sol","130":"src/requireInterface.sol","131":"src/requireNamespace.sol","132":"src/requireValidNamespace.sol","133":"src/revertWithBytes.sol","134":"src/systemHookTypes.sol","135":"src/version.sol","136":"src/worldResourceTypes.sol","137":"test/AccessControl.t.sol","138":"test/BatchCall.t.sol","139":"test/DelegationControlMock.sol","140":"test/Factories.t.sol","141":"test/InitModule.t.sol","142":"test/InitSystems.t.sol","143":"test/MudTest.t.sol","144":"test/RevertWithBytes.t.sol","145":"test/System.t.sol","146":"test/SystemHook.t.sol","147":"test/Utils.t.sol","148":"test/World.t.sol","149":"test/WorldBalance.t.sol","150":"test/WorldContext.t.sol","151":"test/WorldDynamicUpdate.t.sol","152":"test/WorldProxy.t.sol","153":"test/WorldProxyFactory.t.sol","154":"test/WorldResourceId.t.sol","155":"test/codegen/index.sol","156":"test/codegen/tables/AddressArray.sol","157":"test/codegen/tables/Bool.sol","158":"test/codegen/tables/TwoFields.sol","159":"test/createInitModule.sol","160":"test/createWorld.sol","161":"test/createWorldProxy.sol"},"language":"Solidity"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@latticexyz/world",
|
3
|
-
"version": "3.0.0-main-
|
3
|
+
"version": "3.0.0-main-570086e7b",
|
4
4
|
"description": "World framework",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -47,11 +47,11 @@
|
|
47
47
|
"abitype": "1.0.0",
|
48
48
|
"arktype": "1.0.29-alpha",
|
49
49
|
"viem": "2.9.20",
|
50
|
-
"@latticexyz/common": "3.0.0-main-
|
51
|
-
"@latticexyz/config": "3.0.0-main-
|
52
|
-
"@latticexyz/protocol-parser": "3.0.0-main-
|
53
|
-
"@latticexyz/
|
54
|
-
"@latticexyz/
|
50
|
+
"@latticexyz/common": "3.0.0-main-570086e7b",
|
51
|
+
"@latticexyz/config": "3.0.0-main-570086e7b",
|
52
|
+
"@latticexyz/protocol-parser": "3.0.0-main-570086e7b",
|
53
|
+
"@latticexyz/schema-type": "3.0.0-main-570086e7b",
|
54
|
+
"@latticexyz/store": "3.0.0-main-570086e7b"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
57
|
"@arktype/attest": "0.7.5",
|
@@ -66,8 +66,8 @@
|
|
66
66
|
"tsup": "^6.7.0",
|
67
67
|
"tsx": "^3.12.6",
|
68
68
|
"vitest": "0.34.6",
|
69
|
-
"@latticexyz/abi-ts": "3.0.0-main-
|
70
|
-
"@latticexyz/gas-report": "3.0.0-main-
|
69
|
+
"@latticexyz/abi-ts": "3.0.0-main-570086e7b",
|
70
|
+
"@latticexyz/gas-report": "3.0.0-main-570086e7b"
|
71
71
|
},
|
72
72
|
"scripts": {
|
73
73
|
"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts && pnpm run build:js",
|
@@ -5,7 +5,6 @@ pragma solidity >=0.8.24;
|
|
5
5
|
|
6
6
|
import { IStore } from "@latticexyz/store/src/IStore.sol";
|
7
7
|
import { IWorldKernel } from "../../IWorldKernel.sol";
|
8
|
-
|
9
8
|
import { IRegistrationSystem } from "./IRegistrationSystem.sol";
|
10
9
|
import { IAccessManagementSystem } from "./IAccessManagementSystem.sol";
|
11
10
|
import { IBalanceTransferSystem } from "./IBalanceTransferSystem.sol";
|
@@ -3,7 +3,7 @@ pragma solidity >=0.8.24;
|
|
3
3
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
|
-
import { SystemCallData, SystemCallFromData } from "
|
6
|
+
import { SystemCallData, SystemCallFromData } from "../../modules/init/types.sol";
|
7
7
|
|
8
8
|
/**
|
9
9
|
* @title IBatchCallSystem
|
@@ -4,8 +4,8 @@ pragma solidity >=0.8.24;
|
|
4
4
|
/* Autogenerated file. Do not edit manually. */
|
5
5
|
|
6
6
|
import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
|
7
|
-
import { ISystemHook } from "
|
8
|
-
import { System } from "
|
7
|
+
import { ISystemHook } from "../../ISystemHook.sol";
|
8
|
+
import { System } from "../../System.sol";
|
9
9
|
|
10
10
|
/**
|
11
11
|
* @title IWorldRegistrationSystem
|
package/dist/chunk-2DPDMM6H.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{c as e}from"./chunk-3EELS6P3.js";var a=e({codegen:{worldImportPath:"../../",worldgenDirectory:"interfaces",worldInterfaceName:"IBaseWorld"},namespace:"world",userTypes:{ResourceId:{filePath:"@latticexyz/store/src/ResourceId.sol",type:"bytes32"}},tables:{NamespaceOwner:{schema:{namespaceId:"ResourceId",owner:"address"},key:["namespaceId"]},ResourceAccess:{schema:{resourceId:"ResourceId",caller:"address",access:"bool"},key:["resourceId","caller"]},InstalledModules:{schema:{moduleAddress:"address",argumentsHash:"bytes32",isInstalled:"bool"},key:["moduleAddress","argumentsHash"]},UserDelegationControl:{schema:{delegator:"address",delegatee:"address",delegationControlId:"ResourceId"},key:["delegator","delegatee"]},NamespaceDelegationControl:{schema:{namespaceId:"ResourceId",delegationControlId:"ResourceId"},key:["namespaceId"]},Balances:{schema:{namespaceId:"ResourceId",balance:"uint256"},key:["namespaceId"]},Systems:{schema:{systemId:"ResourceId",system:"address",publicAccess:"bool"},key:["systemId"],codegen:{dataStruct:!1}},SystemRegistry:{schema:{system:"address",systemId:"ResourceId"},key:["system"]},SystemHooks:{schema:{systemId:"ResourceId",value:"bytes21[]"},key:["systemId"]},FunctionSelectors:{schema:{worldFunctionSelector:"bytes4",systemId:"ResourceId",systemFunctionSelector:"bytes4"},key:["worldFunctionSelector"],codegen:{dataStruct:!1}},FunctionSignatures:{type:"offchainTable",schema:{functionSelector:"bytes4",functionSignature:"string"},key:["functionSelector"]},InitModuleAddress:{schema:{value:"address"},key:[]}},excludeSystems:["StoreRegistrationSystem"]});export{a};
|
2
|
-
//# sourceMappingURL=chunk-2DPDMM6H.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../mud.config.ts"],"sourcesContent":["import { defineWorld } from \"./ts/config/v2/world\";\n\nexport default defineWorld({\n codegen: {\n worldImportPath: \"../../\",\n worldgenDirectory: \"interfaces\",\n worldInterfaceName: \"IBaseWorld\",\n },\n namespace: \"world\", // NOTE: this namespace is only used for tables, the core system is deployed in the root namespace.\n userTypes: {\n ResourceId: { filePath: \"@latticexyz/store/src/ResourceId.sol\", type: \"bytes32\" },\n },\n tables: {\n NamespaceOwner: {\n schema: {\n namespaceId: \"ResourceId\",\n owner: \"address\",\n },\n key: [\"namespaceId\"],\n },\n ResourceAccess: {\n schema: {\n resourceId: \"ResourceId\",\n caller: \"address\",\n access: \"bool\",\n },\n key: [\"resourceId\", \"caller\"],\n },\n InstalledModules: {\n schema: {\n moduleAddress: \"address\",\n argumentsHash: \"bytes32\", // Hash of the params passed to the `install` function\n isInstalled: \"bool\",\n },\n key: [\"moduleAddress\", \"argumentsHash\"],\n },\n UserDelegationControl: {\n schema: {\n delegator: \"address\",\n delegatee: \"address\",\n delegationControlId: \"ResourceId\",\n },\n key: [\"delegator\", \"delegatee\"],\n },\n NamespaceDelegationControl: {\n schema: {\n namespaceId: \"ResourceId\",\n delegationControlId: \"ResourceId\",\n },\n key: [\"namespaceId\"],\n },\n Balances: {\n schema: {\n namespaceId: \"ResourceId\",\n balance: \"uint256\",\n },\n key: [\"namespaceId\"],\n },\n Systems: {\n schema: {\n systemId: \"ResourceId\",\n system: \"address\",\n publicAccess: \"bool\",\n },\n key: [\"systemId\"],\n codegen: {\n dataStruct: false,\n },\n },\n SystemRegistry: {\n schema: {\n system: \"address\",\n systemId: \"ResourceId\",\n },\n key: [\"system\"],\n },\n SystemHooks: {\n schema: {\n systemId: \"ResourceId\",\n value: \"bytes21[]\",\n },\n key: [\"systemId\"],\n },\n FunctionSelectors: {\n schema: {\n worldFunctionSelector: \"bytes4\",\n systemId: \"ResourceId\",\n systemFunctionSelector: \"bytes4\",\n },\n key: [\"worldFunctionSelector\"],\n codegen: {\n dataStruct: false,\n },\n },\n FunctionSignatures: {\n type: \"offchainTable\",\n schema: {\n functionSelector: \"bytes4\",\n functionSignature: \"string\",\n },\n key: [\"functionSelector\"],\n },\n InitModuleAddress: {\n schema: {\n value: \"address\",\n },\n key: [],\n },\n },\n excludeSystems: [\n // Worldgen currently does not support systems inheriting logic\n // from other contracts, so all parts of RegistrationSystem are named\n // System too to be included in the IBaseWorld interface.\n // However, IStoreRegistrationSystem overlaps with IStore if\n // included in IBaseWorld, so it needs to be excluded from worldgen.\n // TODO: add support for inheritance to worldgen\n // (see: https://github.com/latticexyz/mud/issues/631)\n \"StoreRegistrationSystem\",\n ],\n});\n"],"mappings":"wCAEA,IAAOA,EAAQC,EAAY,CACzB,QAAS,CACP,gBAAiB,SACjB,kBAAmB,aACnB,mBAAoB,YACtB,EACA,UAAW,QACX,UAAW,CACT,WAAY,CAAE,SAAU,uCAAwC,KAAM,SAAU,CAClF,EACA,OAAQ,CACN,eAAgB,CACd,OAAQ,CACN,YAAa,aACb,MAAO,SACT,EACA,IAAK,CAAC,aAAa,CACrB,EACA,eAAgB,CACd,OAAQ,CACN,WAAY,aACZ,OAAQ,UACR,OAAQ,MACV,EACA,IAAK,CAAC,aAAc,QAAQ,CAC9B,EACA,iBAAkB,CAChB,OAAQ,CACN,cAAe,UACf,cAAe,UACf,YAAa,MACf,EACA,IAAK,CAAC,gBAAiB,eAAe,CACxC,EACA,sBAAuB,CACrB,OAAQ,CACN,UAAW,UACX,UAAW,UACX,oBAAqB,YACvB,EACA,IAAK,CAAC,YAAa,WAAW,CAChC,EACA,2BAA4B,CAC1B,OAAQ,CACN,YAAa,aACb,oBAAqB,YACvB,EACA,IAAK,CAAC,aAAa,CACrB,EACA,SAAU,CACR,OAAQ,CACN,YAAa,aACb,QAAS,SACX,EACA,IAAK,CAAC,aAAa,CACrB,EACA,QAAS,CACP,OAAQ,CACN,SAAU,aACV,OAAQ,UACR,aAAc,MAChB,EACA,IAAK,CAAC,UAAU,EAChB,QAAS,CACP,WAAY,EACd,CACF,EACA,eAAgB,CACd,OAAQ,CACN,OAAQ,UACR,SAAU,YACZ,EACA,IAAK,CAAC,QAAQ,CAChB,EACA,YAAa,CACX,OAAQ,CACN,SAAU,aACV,MAAO,WACT,EACA,IAAK,CAAC,UAAU,CAClB,EACA,kBAAmB,CACjB,OAAQ,CACN,sBAAuB,SACvB,SAAU,aACV,uBAAwB,QAC1B,EACA,IAAK,CAAC,uBAAuB,EAC7B,QAAS,CACP,WAAY,EACd,CACF,EACA,mBAAoB,CAClB,KAAM,gBACN,OAAQ,CACN,iBAAkB,SAClB,kBAAmB,QACrB,EACA,IAAK,CAAC,kBAAkB,CAC1B,EACA,kBAAmB,CACjB,OAAQ,CACN,MAAO,SACT,EACA,IAAK,CAAC,CACR,CACF,EACA,eAAgB,CAQd,yBACF,CACF,CAAC","names":["mud_config_default","defineWorld"]}
|
package/dist/chunk-DK3XOTC2.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
var c=Object.create;var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var u=(e,t,s)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var S=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of y(t))!d.call(e,o)&&o!==s&&a(e,o,{get:()=>t[o],enumerable:!(n=m(t,o))||n.enumerable});return e};var F=(e,t,s)=>(s=e!=null?c(l(e)):{},S(t||!e||!e.__esModule?a(s,"default",{value:e,enumerable:!0}):s,e));var T=(e,t,s)=>(u(e,typeof t!="symbol"?t+"":t,s),s),p=(e,t,s)=>{if(!t.has(e))throw TypeError("Cannot "+s)};var I=(e,t,s)=>(p(e,t,"read from private field"),s?s.call(e):t.get(e)),g=(e,t,s)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,s)},A=(e,t,s,n)=>(p(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s);var U=(e,t,s)=>(p(e,t,"access private method"),s);var i={namespace:"",registerFunctionSelectors:!0,openAccess:!0,accessList:[]},w={root:!1,args:[],artifactPath:void 0},f={worldInterfaceName:"IWorld",worldgenDirectory:"world",worldImportPath:"@latticexyz/world/src/"},E={customWorldContract:void 0,postDeployScript:"PostDeploy",deploysDirectory:"./deploys",worldsFile:"./worlds.json",upgradeableWorldImplementation:!1},_={systems:{},tables:{},excludeSystems:[],modules:[],codegen:f,deploy:E};import{hasOwnKey as r,mergeIfUndefined as x}from"@latticexyz/store/config/v2";import{resourceToHex as D}from"@latticexyz/common";function h(e,t={}){if(typeof e!="object"||e==null)throw new Error(`Expected full system config, got \`${JSON.stringify(e)}\``);if(t.inNamespace&&(r(e,"label")||r(e,"namespace")))throw new Error("Overrides of `label` and `namespace` are not allowed for systems in this context.");if(r(e,"namespace")&&typeof e.namespace=="string"&&e.namespace.length>14)throw new Error(`System \`namespace\` must fit into a \`bytes14\`, but "${e.namespace}" is too long.`);if(r(e,"name")&&typeof e.name=="string"&&e.name.length>16)throw new Error(`System \`name\` must fit into a \`bytes16\`, but "${e.name}" is too long.`)}function k(e){let t=e.label,s=e.namespace??i.namespace,n=e.name??t.slice(0,16),o=D({type:"system",namespace:s,name:n});return x({...e,label:t,namespace:s,name:n,systemId:o},i)}export{L as a,F as b,T as c,I as d,g as e,A as f,U as g,w as h,f as i,E as j,_ as k,h as l,k as m};
|
2
|
-
//# sourceMappingURL=chunk-DK3XOTC2.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../ts/config/v2/defaults.ts","../ts/config/v2/system.ts"],"sourcesContent":["import { CodegenInput, DeployInput, ModuleInput, SystemInput, WorldInput } from \"./input\";\n\nexport const SYSTEM_DEFAULTS = {\n namespace: \"\",\n registerFunctionSelectors: true,\n openAccess: true,\n accessList: [],\n} as const satisfies Omit<Required<SystemInput>, \"label\" | \"name\">;\n\nexport type SYSTEM_DEFAULTS = typeof SYSTEM_DEFAULTS;\n\nexport const MODULE_DEFAULTS = {\n root: false,\n args: [],\n artifactPath: undefined,\n} as const satisfies Pick<ModuleInput, \"root\" | \"args\" | \"artifactPath\">;\n\nexport type MODULE_DEFAULTS = typeof MODULE_DEFAULTS;\n\nexport const CODEGEN_DEFAULTS = {\n worldInterfaceName: \"IWorld\",\n worldgenDirectory: \"world\",\n worldImportPath: \"@latticexyz/world/src/\",\n} as const satisfies CodegenInput;\n\nexport type CODEGEN_DEFAULTS = typeof CODEGEN_DEFAULTS;\n\nexport const DEPLOY_DEFAULTS = {\n customWorldContract: undefined,\n postDeployScript: \"PostDeploy\",\n deploysDirectory: \"./deploys\",\n worldsFile: \"./worlds.json\",\n upgradeableWorldImplementation: false,\n} as const satisfies DeployInput;\n\nexport type DEPLOY_DEFAULTS = typeof DEPLOY_DEFAULTS;\n\nexport const CONFIG_DEFAULTS = {\n systems: {},\n tables: {},\n excludeSystems: [],\n modules: [],\n codegen: CODEGEN_DEFAULTS,\n deploy: DEPLOY_DEFAULTS,\n} as const satisfies WorldInput;\n\nexport type CONFIG_DEFAULTS = typeof CONFIG_DEFAULTS;\n","import { SYSTEM_DEFAULTS } from \"./defaults\";\nimport { SystemInput } from \"./input\";\nimport { hasOwnKey, mergeIfUndefined } from \"@latticexyz/store/config/v2\";\nimport { ErrorMessage, narrow, requiredKeyOf } from \"@arktype/util\";\nimport { Hex } from \"viem\";\nimport { resourceToHex } from \"@latticexyz/common\";\n\nexport type ValidateSystemOptions = { readonly inNamespace?: true };\n\nexport type requiredSystemKey<inNamespace extends true | undefined> = Exclude<\n requiredKeyOf<SystemInput>,\n inNamespace extends true ? \"label\" | \"namespace\" : never\n>;\n\nexport type validateSystem<input, options extends ValidateSystemOptions = {}> = {\n [key in keyof input | requiredSystemKey<options[\"inNamespace\"]>]: key extends keyof SystemInput\n ? key extends \"label\" | \"namespace\"\n ? options[\"inNamespace\"] extends true\n ? ErrorMessage<\"Overrides of `label` and `namespace` are not allowed for systems in this context.\">\n : key extends keyof input\n ? narrow<input[key]>\n : never\n : SystemInput[key]\n : ErrorMessage<`Key \\`${key & string}\\` does not exist in SystemInput`>;\n};\n\nexport function validateSystem<input>(\n input: input,\n options: ValidateSystemOptions = {},\n): asserts input is SystemInput & input {\n if (typeof input !== \"object\" || input == null) {\n throw new Error(`Expected full system config, got \\`${JSON.stringify(input)}\\``);\n }\n\n if (options.inNamespace && (hasOwnKey(input, \"label\") || hasOwnKey(input, \"namespace\"))) {\n throw new Error(\"Overrides of `label` and `namespace` are not allowed for systems in this context.\");\n }\n\n if (hasOwnKey(input, \"namespace\") && typeof input.namespace === \"string\" && input.namespace.length > 14) {\n throw new Error(`System \\`namespace\\` must fit into a \\`bytes14\\`, but \"${input.namespace}\" is too long.`);\n }\n if (hasOwnKey(input, \"name\") && typeof input.name === \"string\" && input.name.length > 16) {\n throw new Error(`System \\`name\\` must fit into a \\`bytes16\\`, but \"${input.name}\" is too long.`);\n }\n}\n\nexport type resolveSystem<input> = input extends SystemInput\n ? {\n readonly label: input[\"label\"];\n readonly namespace: undefined extends input[\"namespace\"] ? SYSTEM_DEFAULTS[\"namespace\"] : input[\"namespace\"];\n readonly name: string;\n readonly systemId: Hex;\n readonly registerFunctionSelectors: undefined extends input[\"registerFunctionSelectors\"]\n ? SYSTEM_DEFAULTS[\"registerFunctionSelectors\"]\n : input[\"registerFunctionSelectors\"];\n readonly openAccess: undefined extends input[\"openAccess\"] ? SYSTEM_DEFAULTS[\"openAccess\"] : input[\"openAccess\"];\n readonly accessList: undefined extends input[\"accessList\"] ? SYSTEM_DEFAULTS[\"accessList\"] : input[\"accessList\"];\n }\n : never;\n\nexport function resolveSystem<input extends SystemInput>(input: input): resolveSystem<input> {\n const label = input.label;\n const namespace = input.namespace ?? SYSTEM_DEFAULTS.namespace;\n const name = input.name ?? label.slice(0, 16);\n const systemId = resourceToHex({ type: \"system\", namespace, name });\n\n return mergeIfUndefined(\n {\n ...input,\n label,\n namespace,\n name,\n systemId,\n },\n SYSTEM_DEFAULTS,\n ) as never;\n}\n\nexport function defineSystem<input>(input: validateSystem<input>): resolveSystem<input> {\n validateSystem(input);\n return resolveSystem(input) as never;\n}\n"],"mappings":"shCAEO,IAAMA,EAAkB,CAC7B,UAAW,GACX,0BAA2B,GAC3B,WAAY,GACZ,WAAY,CAAC,CACf,EAIaC,EAAkB,CAC7B,KAAM,GACN,KAAM,CAAC,EACP,aAAc,MAChB,EAIaC,EAAmB,CAC9B,mBAAoB,SACpB,kBAAmB,QACnB,gBAAiB,wBACnB,EAIaC,EAAkB,CAC7B,oBAAqB,OACrB,iBAAkB,aAClB,iBAAkB,YAClB,WAAY,gBACZ,+BAAgC,EAClC,EAIaC,EAAkB,CAC7B,QAAS,CAAC,EACV,OAAQ,CAAC,EACT,eAAgB,CAAC,EACjB,QAAS,CAAC,EACV,QAASF,EACT,OAAQC,CACV,EC1CA,OAAS,aAAAE,EAAW,oBAAAC,MAAwB,8BAG5C,OAAS,iBAAAC,MAAqB,qBAqBvB,SAASC,EACdC,EACAC,EAAiC,CAAC,EACI,CACtC,GAAI,OAAOD,GAAU,UAAYA,GAAS,KACxC,MAAM,IAAI,MAAM,sCAAsC,KAAK,UAAUA,CAAK,KAAK,EAGjF,GAAIC,EAAQ,cAAgBL,EAAUI,EAAO,OAAO,GAAKJ,EAAUI,EAAO,WAAW,GACnF,MAAM,IAAI,MAAM,mFAAmF,EAGrG,GAAIJ,EAAUI,EAAO,WAAW,GAAK,OAAOA,EAAM,WAAc,UAAYA,EAAM,UAAU,OAAS,GACnG,MAAM,IAAI,MAAM,0DAA0DA,EAAM,yBAAyB,EAE3G,GAAIJ,EAAUI,EAAO,MAAM,GAAK,OAAOA,EAAM,MAAS,UAAYA,EAAM,KAAK,OAAS,GACpF,MAAM,IAAI,MAAM,qDAAqDA,EAAM,oBAAoB,CAEnG,CAgBO,SAASE,EAAyCF,EAAoC,CAC3F,IAAMG,EAAQH,EAAM,MACdI,EAAYJ,EAAM,WAAaK,EAAgB,UAC/CC,EAAON,EAAM,MAAQG,EAAM,MAAM,EAAG,EAAE,EACtCI,EAAWT,EAAc,CAAE,KAAM,SAAU,UAAAM,EAAW,KAAAE,CAAK,CAAC,EAElE,OAAOT,EACL,CACE,GAAGG,EACH,MAAAG,EACA,UAAAC,EACA,KAAAE,EACA,SAAAC,CACF,EACAF,CACF,CACF","names":["SYSTEM_DEFAULTS","MODULE_DEFAULTS","CODEGEN_DEFAULTS","DEPLOY_DEFAULTS","CONFIG_DEFAULTS","hasOwnKey","mergeIfUndefined","resourceToHex","validateSystem","input","options","resolveSystem","label","namespace","SYSTEM_DEFAULTS","name","systemId"]}
|
File without changes
|