diff --git a/packages/world/mud.config.ts b/packages/world/mud.config.ts index 1ad535703d..54c78b8baf 100644 --- a/packages/world/mud.config.ts +++ b/packages/world/mud.config.ts @@ -1,10 +1,9 @@ import { mudConfig } from "./ts/register"; export default mudConfig({ - worldImportPath: "../", + worldImportPath: "../../", worldgenDirectory: "interfaces", worldInterfaceName: "IBaseWorld", - codegenDirectory: "", tables: { /************************************************************************ * @@ -172,7 +171,7 @@ export default mudConfig({ * ************************************************************************/ Bool: { - directory: "../test/tables", + directory: "test/tables", keySchema: {}, valueSchema: { value: "bool", @@ -180,7 +179,7 @@ export default mudConfig({ tableIdArgument: true, }, AddressArray: { - directory: "../test/tables", + directory: "test/tables", valueSchema: "address[]", tableIdArgument: true, }, diff --git a/packages/world/src/AccessControl.sol b/packages/world/src/AccessControl.sol index d99fd415ef..85c907e281 100644 --- a/packages/world/src/AccessControl.sol +++ b/packages/world/src/AccessControl.sol @@ -4,8 +4,7 @@ pragma solidity >=0.8.0; import { ResourceSelector } from "./ResourceSelector.sol"; import { IWorldErrors } from "./interfaces/IWorldErrors.sol"; -import { ResourceAccess } from "./tables/ResourceAccess.sol"; -import { NamespaceOwner } from "./tables/NamespaceOwner.sol"; +import { ResourceAccess, NamespaceOwner } from "./codegen/index.sol"; library AccessControl { using ResourceSelector for bytes32; diff --git a/packages/world/src/SystemCall.sol b/packages/world/src/SystemCall.sol index 27241b9a6b..b31e7238c3 100644 --- a/packages/world/src/SystemCall.sol +++ b/packages/world/src/SystemCall.sol @@ -15,10 +15,7 @@ import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "./systemHookTypes.sol"; import { IWorldErrors } from "./interfaces/IWorldErrors.sol"; import { ISystemHook } from "./interfaces/ISystemHook.sol"; -import { FunctionSelectors } from "./modules/core/tables/FunctionSelectors.sol"; -import { Systems } from "./modules/core/tables/Systems.sol"; -import { SystemHooks } from "./modules/core/tables/SystemHooks.sol"; -import { Balances } from "./modules/core/tables/Balances.sol"; +import { FunctionSelectors, Systems, SystemHooks, Balances } from "./codegen/index.sol"; library SystemCall { using ResourceSelector for bytes32; diff --git a/packages/world/src/Tables.sol b/packages/world/src/Tables.sol deleted file mode 100644 index 021a7371bf..0000000000 --- a/packages/world/src/Tables.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.0; - -/* Autogenerated file. Do not edit manually. */ - -import { NamespaceOwner, NamespaceOwnerTableId } from "./tables/NamespaceOwner.sol"; -import { ResourceAccess, ResourceAccessTableId } from "./tables/ResourceAccess.sol"; -import { InstalledModules, InstalledModulesTableId } from "./tables/InstalledModules.sol"; -import { Delegations, DelegationsTableId } from "./tables/Delegations.sol"; -import { Balances, BalancesTableId } from "./modules/core/tables/Balances.sol"; -import { Systems, SystemsTableId } from "./modules/core/tables/Systems.sol"; -import { SystemRegistry, SystemRegistryTableId } from "./modules/core/tables/SystemRegistry.sol"; -import { SystemHooks, SystemHooksTableId } from "./modules/core/tables/SystemHooks.sol"; -import { ResourceType, ResourceTypeTableId } from "./modules/core/tables/ResourceType.sol"; -import { FunctionSelectors, FunctionSelectorsTableId } from "./modules/core/tables/FunctionSelectors.sol"; -import { KeysWithValue } from "./modules/keyswithvalue/tables/KeysWithValue.sol"; -import { KeysInTable, KeysInTableData, KeysInTableTableId } from "./modules/keysintable/tables/KeysInTable.sol"; -import { UsedKeysIndex, UsedKeysIndexTableId } from "./modules/keysintable/tables/UsedKeysIndex.sol"; -import { UniqueEntity } from "./modules/uniqueentity/tables/UniqueEntity.sol"; -import { CallboundDelegations, CallboundDelegationsTableId } from "./modules/std-delegations/tables/CallboundDelegations.sol"; -import { TimeboundDelegations, TimeboundDelegationsTableId } from "./modules/std-delegations/tables/TimeboundDelegations.sol"; -import { Bool } from "./../test/tables/Bool.sol"; -import { AddressArray } from "./../test/tables/AddressArray.sol"; diff --git a/packages/world/src/Types.sol b/packages/world/src/Types.sol deleted file mode 100644 index 6c4b0ff193..0000000000 --- a/packages/world/src/Types.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.0; - -/* Autogenerated file. Do not edit manually. */ -enum Resource { - NONE, - NAMESPACE, - TABLE, - SYSTEM -} diff --git a/packages/world/src/Utils.sol b/packages/world/src/Utils.sol index dd5a4138dc..ec769005af 100644 --- a/packages/world/src/Utils.sol +++ b/packages/world/src/Utils.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; import { ResourceSelector } from "./ResourceSelector.sol"; -import { SystemRegistry } from "./Tables.sol"; +import { SystemRegistry } from "./codegen/index.sol"; library Utils { /** diff --git a/packages/world/src/World.sol b/packages/world/src/World.sol index 7b61f52e0e..2a9c74df72 100644 --- a/packages/world/src/World.sol +++ b/packages/world/src/World.sol @@ -21,18 +21,11 @@ import { revertWithBytes } from "./revertWithBytes.sol"; import { Delegation } from "./Delegation.sol"; import { requireInterface } from "./requireInterface.sol"; -import { NamespaceOwner } from "./tables/NamespaceOwner.sol"; -import { InstalledModules } from "./tables/InstalledModules.sol"; -import { Delegations } from "./tables/Delegations.sol"; - import { IModule, MODULE_INTERFACE_ID } from "./interfaces/IModule.sol"; import { IWorldKernel } from "./interfaces/IWorldKernel.sol"; import { IDelegationControl } from "./interfaces/IDelegationControl.sol"; -import { Systems } from "./modules/core/tables/Systems.sol"; -import { SystemHooks } from "./modules/core/tables/SystemHooks.sol"; -import { FunctionSelectors } from "./modules/core/tables/FunctionSelectors.sol"; -import { Balances } from "./modules/core/tables/Balances.sol"; +import { NamespaceOwner, InstalledModules, Delegations, Systems, SystemHooks, FunctionSelectors, Balances } from "./codegen/index.sol"; import { CORE_MODULE_NAME } from "./modules/core/constants.sol"; contract World is StoreRead, IStoreData, IWorldKernel { diff --git a/packages/world/src/common.sol b/packages/world/src/codegen/common.sol similarity index 100% rename from packages/world/src/common.sol rename to packages/world/src/codegen/common.sol diff --git a/packages/world/src/index.sol b/packages/world/src/codegen/index.sol similarity index 93% rename from packages/world/src/index.sol rename to packages/world/src/codegen/index.sol index 021a7371bf..9a8c539177 100644 --- a/packages/world/src/index.sol +++ b/packages/world/src/codegen/index.sol @@ -19,5 +19,5 @@ import { UsedKeysIndex, UsedKeysIndexTableId } from "./modules/keysintable/table import { UniqueEntity } from "./modules/uniqueentity/tables/UniqueEntity.sol"; import { CallboundDelegations, CallboundDelegationsTableId } from "./modules/std-delegations/tables/CallboundDelegations.sol"; import { TimeboundDelegations, TimeboundDelegationsTableId } from "./modules/std-delegations/tables/TimeboundDelegations.sol"; -import { Bool } from "./../test/tables/Bool.sol"; -import { AddressArray } from "./../test/tables/AddressArray.sol"; +import { Bool } from "./test/tables/Bool.sol"; +import { AddressArray } from "./test/tables/AddressArray.sol"; diff --git a/packages/world/src/interfaces/IAccessManagementSystem.sol b/packages/world/src/codegen/interfaces/IAccessManagementSystem.sol similarity index 100% rename from packages/world/src/interfaces/IAccessManagementSystem.sol rename to packages/world/src/codegen/interfaces/IAccessManagementSystem.sol diff --git a/packages/world/src/interfaces/IBalanceTransferSystem.sol b/packages/world/src/codegen/interfaces/IBalanceTransferSystem.sol similarity index 100% rename from packages/world/src/interfaces/IBalanceTransferSystem.sol rename to packages/world/src/codegen/interfaces/IBalanceTransferSystem.sol diff --git a/packages/world/src/interfaces/IBaseWorld.sol b/packages/world/src/codegen/interfaces/IBaseWorld.sol similarity index 92% rename from packages/world/src/interfaces/IBaseWorld.sol rename to packages/world/src/codegen/interfaces/IBaseWorld.sol index dcc9607777..78e04c5946 100644 --- a/packages/world/src/interfaces/IBaseWorld.sol +++ b/packages/world/src/codegen/interfaces/IBaseWorld.sol @@ -4,7 +4,7 @@ pragma solidity >=0.8.0; /* Autogenerated file. Do not edit manually. */ import { IStore } from "@latticexyz/store/src/IStore.sol"; -import { IWorldKernel } from "../interfaces/IWorldKernel.sol"; +import { IWorldKernel } from "../../interfaces/IWorldKernel.sol"; import { ICoreSystem } from "./ICoreSystem.sol"; import { IAccessManagementSystem } from "./IAccessManagementSystem.sol"; diff --git a/packages/world/src/interfaces/ICoreSystem.sol b/packages/world/src/codegen/interfaces/ICoreSystem.sol similarity index 100% rename from packages/world/src/interfaces/ICoreSystem.sol rename to packages/world/src/codegen/interfaces/ICoreSystem.sol diff --git a/packages/world/src/interfaces/IModuleInstallationSystem.sol b/packages/world/src/codegen/interfaces/IModuleInstallationSystem.sol similarity index 78% rename from packages/world/src/interfaces/IModuleInstallationSystem.sol rename to packages/world/src/codegen/interfaces/IModuleInstallationSystem.sol index e1de9e093f..7ba646a115 100644 --- a/packages/world/src/interfaces/IModuleInstallationSystem.sol +++ b/packages/world/src/codegen/interfaces/IModuleInstallationSystem.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; /* Autogenerated file. Do not edit manually. */ -import { IModule } from "./IModule.sol"; +import { IModule } from "./../../interfaces/IModule.sol"; interface IModuleInstallationSystem { function installModule(IModule module, bytes memory args) external; diff --git a/packages/world/src/interfaces/IWorldRegistrationSystem.sol b/packages/world/src/codegen/interfaces/IWorldRegistrationSystem.sol similarity index 88% rename from packages/world/src/interfaces/IWorldRegistrationSystem.sol rename to packages/world/src/codegen/interfaces/IWorldRegistrationSystem.sol index eda464a074..15205adbe6 100644 --- a/packages/world/src/interfaces/IWorldRegistrationSystem.sol +++ b/packages/world/src/codegen/interfaces/IWorldRegistrationSystem.sol @@ -3,8 +3,8 @@ pragma solidity >=0.8.0; /* Autogenerated file. Do not edit manually. */ -import { ISystemHook } from "./ISystemHook.sol"; -import { WorldContextConsumer } from "./../WorldContext.sol"; +import { ISystemHook } from "./../../interfaces/ISystemHook.sol"; +import { WorldContextConsumer } from "./../../WorldContext.sol"; interface IWorldRegistrationSystem { function registerNamespace(bytes16 namespace) external; diff --git a/packages/world/src/modules/core/tables/Balances.sol b/packages/world/src/codegen/modules/core/tables/Balances.sol similarity index 100% rename from packages/world/src/modules/core/tables/Balances.sol rename to packages/world/src/codegen/modules/core/tables/Balances.sol diff --git a/packages/world/src/modules/core/tables/FunctionSelectors.sol b/packages/world/src/codegen/modules/core/tables/FunctionSelectors.sol similarity index 100% rename from packages/world/src/modules/core/tables/FunctionSelectors.sol rename to packages/world/src/codegen/modules/core/tables/FunctionSelectors.sol diff --git a/packages/world/src/modules/core/tables/ResourceType.sol b/packages/world/src/codegen/modules/core/tables/ResourceType.sol similarity index 100% rename from packages/world/src/modules/core/tables/ResourceType.sol rename to packages/world/src/codegen/modules/core/tables/ResourceType.sol diff --git a/packages/world/src/modules/core/tables/SystemHooks.sol b/packages/world/src/codegen/modules/core/tables/SystemHooks.sol similarity index 100% rename from packages/world/src/modules/core/tables/SystemHooks.sol rename to packages/world/src/codegen/modules/core/tables/SystemHooks.sol diff --git a/packages/world/src/modules/core/tables/SystemRegistry.sol b/packages/world/src/codegen/modules/core/tables/SystemRegistry.sol similarity index 100% rename from packages/world/src/modules/core/tables/SystemRegistry.sol rename to packages/world/src/codegen/modules/core/tables/SystemRegistry.sol diff --git a/packages/world/src/modules/core/tables/Systems.sol b/packages/world/src/codegen/modules/core/tables/Systems.sol similarity index 100% rename from packages/world/src/modules/core/tables/Systems.sol rename to packages/world/src/codegen/modules/core/tables/Systems.sol diff --git a/packages/world/src/modules/keysintable/tables/KeysInTable.sol b/packages/world/src/codegen/modules/keysintable/tables/KeysInTable.sol similarity index 100% rename from packages/world/src/modules/keysintable/tables/KeysInTable.sol rename to packages/world/src/codegen/modules/keysintable/tables/KeysInTable.sol diff --git a/packages/world/src/modules/keysintable/tables/UsedKeysIndex.sol b/packages/world/src/codegen/modules/keysintable/tables/UsedKeysIndex.sol similarity index 100% rename from packages/world/src/modules/keysintable/tables/UsedKeysIndex.sol rename to packages/world/src/codegen/modules/keysintable/tables/UsedKeysIndex.sol diff --git a/packages/world/src/modules/keyswithvalue/tables/KeysWithValue.sol b/packages/world/src/codegen/modules/keyswithvalue/tables/KeysWithValue.sol similarity index 100% rename from packages/world/src/modules/keyswithvalue/tables/KeysWithValue.sol rename to packages/world/src/codegen/modules/keyswithvalue/tables/KeysWithValue.sol diff --git a/packages/world/src/modules/std-delegations/tables/CallboundDelegations.sol b/packages/world/src/codegen/modules/std-delegations/tables/CallboundDelegations.sol similarity index 100% rename from packages/world/src/modules/std-delegations/tables/CallboundDelegations.sol rename to packages/world/src/codegen/modules/std-delegations/tables/CallboundDelegations.sol diff --git a/packages/world/src/modules/std-delegations/tables/TimeboundDelegations.sol b/packages/world/src/codegen/modules/std-delegations/tables/TimeboundDelegations.sol similarity index 100% rename from packages/world/src/modules/std-delegations/tables/TimeboundDelegations.sol rename to packages/world/src/codegen/modules/std-delegations/tables/TimeboundDelegations.sol diff --git a/packages/world/src/modules/uniqueentity/tables/UniqueEntity.sol b/packages/world/src/codegen/modules/uniqueentity/tables/UniqueEntity.sol similarity index 100% rename from packages/world/src/modules/uniqueentity/tables/UniqueEntity.sol rename to packages/world/src/codegen/modules/uniqueentity/tables/UniqueEntity.sol diff --git a/packages/world/src/tables/Delegations.sol b/packages/world/src/codegen/tables/Delegations.sol similarity index 100% rename from packages/world/src/tables/Delegations.sol rename to packages/world/src/codegen/tables/Delegations.sol diff --git a/packages/world/src/tables/InstalledModules.sol b/packages/world/src/codegen/tables/InstalledModules.sol similarity index 100% rename from packages/world/src/tables/InstalledModules.sol rename to packages/world/src/codegen/tables/InstalledModules.sol diff --git a/packages/world/src/tables/NamespaceOwner.sol b/packages/world/src/codegen/tables/NamespaceOwner.sol similarity index 100% rename from packages/world/src/tables/NamespaceOwner.sol rename to packages/world/src/codegen/tables/NamespaceOwner.sol diff --git a/packages/world/src/tables/ResourceAccess.sol b/packages/world/src/codegen/tables/ResourceAccess.sol similarity index 100% rename from packages/world/src/tables/ResourceAccess.sol rename to packages/world/src/codegen/tables/ResourceAccess.sol diff --git a/packages/world/test/tables/AddressArray.sol b/packages/world/src/codegen/test/tables/AddressArray.sol similarity index 100% rename from packages/world/test/tables/AddressArray.sol rename to packages/world/src/codegen/test/tables/AddressArray.sol diff --git a/packages/world/test/tables/Bool.sol b/packages/world/src/codegen/test/tables/Bool.sol similarity index 100% rename from packages/world/test/tables/Bool.sol rename to packages/world/src/codegen/test/tables/Bool.sol diff --git a/packages/world/src/factories/WorldFactory.sol b/packages/world/src/factories/WorldFactory.sol index 752ade4ddb..446c0f225a 100644 --- a/packages/world/src/factories/WorldFactory.sol +++ b/packages/world/src/factories/WorldFactory.sol @@ -4,7 +4,7 @@ pragma solidity >=0.8.0; import { Create2 } from "./Create2.sol"; import { World } from "../World.sol"; import { IWorldFactory } from "./IWorldFactory.sol"; -import { IBaseWorld } from "../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../codegen/interfaces/IBaseWorld.sol"; import { IModule } from "../interfaces/IModule.sol"; import { ROOT_NAMESPACE } from "../constants.sol"; diff --git a/packages/world/src/modules/core/CoreModule.sol b/packages/world/src/modules/core/CoreModule.sol index 9e8698d72a..3141f562dd 100644 --- a/packages/world/src/modules/core/CoreModule.sol +++ b/packages/world/src/modules/core/CoreModule.sol @@ -3,30 +3,20 @@ pragma solidity >=0.8.0; import { WorldContextProvider } from "../../WorldContext.sol"; import { ROOT_NAMESPACE } from "../../constants.sol"; -import { Resource } from "../../common.sol"; +import { Resource } from "../../codegen/common.sol"; import { Module } from "../../Module.sol"; -import { IBaseWorld } from "../../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; import { IStoreEphemeral } from "@latticexyz/store/src/IStore.sol"; import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; import { ResourceSelector } from "../../ResourceSelector.sol"; -import { NamespaceOwner } from "../../tables/NamespaceOwner.sol"; -import { ResourceAccess } from "../../tables/ResourceAccess.sol"; -import { InstalledModules } from "../../tables/InstalledModules.sol"; -import { Delegations } from "../../tables/Delegations.sol"; +import { NamespaceOwner, ResourceAccess, InstalledModules, Delegations, Systems, FunctionSelectors, ResourceType, SystemHooks, SystemRegistry, Balances } from "../../codegen/index.sol"; import { CoreSystem } from "./CoreSystem.sol"; import { CORE_MODULE_NAME, CORE_SYSTEM_NAME } from "./constants.sol"; -import { Systems } from "./tables/Systems.sol"; -import { FunctionSelectors } from "./tables/FunctionSelectors.sol"; -import { ResourceType } from "./tables/ResourceType.sol"; -import { SystemHooks } from "./tables/SystemHooks.sol"; -import { SystemRegistry } from "./tables/SystemRegistry.sol"; -import { Balances } from "./tables/Balances.sol"; - import { AccessManagementSystem } from "./implementations/AccessManagementSystem.sol"; import { BalanceTransferSystem } from "./implementations/BalanceTransferSystem.sol"; import { EphemeralRecordSystem } from "./implementations/EphemeralRecordSystem.sol"; diff --git a/packages/world/src/modules/core/implementations/AccessManagementSystem.sol b/packages/world/src/modules/core/implementations/AccessManagementSystem.sol index cff47dd2db..c062473d98 100644 --- a/packages/world/src/modules/core/implementations/AccessManagementSystem.sol +++ b/packages/world/src/modules/core/implementations/AccessManagementSystem.sol @@ -5,9 +5,7 @@ import { IModule } from "../../../interfaces/IModule.sol"; import { System } from "../../../System.sol"; import { AccessControl } from "../../../AccessControl.sol"; import { ResourceSelector } from "../../../ResourceSelector.sol"; -import { ResourceAccess } from "../../../tables/ResourceAccess.sol"; -import { InstalledModules } from "../../../tables/InstalledModules.sol"; -import { NamespaceOwner } from "../../../tables/NamespaceOwner.sol"; +import { ResourceAccess, InstalledModules, NamespaceOwner } from "../../../codegen/index.sol"; /** * Granting and revoking access from/to resources. diff --git a/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol b/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol index 9f0fdde1cd..1db0417a7f 100644 --- a/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol +++ b/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol @@ -7,7 +7,7 @@ import { ResourceSelector } from "../../../ResourceSelector.sol"; import { AccessControl } from "../../../AccessControl.sol"; import { IWorldErrors } from "../../../interfaces/IWorldErrors.sol"; -import { Balances } from "../tables/Balances.sol"; +import { Balances } from "../../../codegen/index.sol"; contract BalanceTransferSystem is System, IWorldErrors { using ResourceSelector for bytes32; diff --git a/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol b/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol index 527cf62eba..977db0af8d 100644 --- a/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol +++ b/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol @@ -5,8 +5,7 @@ import { IModule, MODULE_INTERFACE_ID } from "../../../interfaces/IModule.sol"; import { System } from "../../../System.sol"; import { AccessControl } from "../../../AccessControl.sol"; import { WorldContextProvider } from "../../../WorldContext.sol"; -import { ResourceAccess } from "../../../tables/ResourceAccess.sol"; -import { InstalledModules } from "../../../tables/InstalledModules.sol"; +import { ResourceAccess, InstalledModules } from "../../../codegen/index.sol"; import { requireInterface } from "../../../requireInterface.sol"; /** diff --git a/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol b/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol index f51e198b4a..a17dd68e9b 100644 --- a/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol +++ b/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol @@ -8,21 +8,14 @@ import { Schema } from "@latticexyz/store/src/Schema.sol"; import { System } from "../../../System.sol"; import { ResourceSelector } from "../../../ResourceSelector.sol"; -import { Resource } from "../../../common.sol"; +import { Resource } from "../../../codegen/common.sol"; import { ROOT_NAMESPACE, ROOT_NAME } from "../../../constants.sol"; import { AccessControl } from "../../../AccessControl.sol"; import { requireInterface } from "../../../requireInterface.sol"; import { WorldContextProvider } from "../../../WorldContext.sol"; -import { NamespaceOwner } from "../../../tables/NamespaceOwner.sol"; -import { ResourceAccess } from "../../../tables/ResourceAccess.sol"; +import { NamespaceOwner, ResourceAccess, ResourceType, SystemHooks, SystemRegistry, Systems, FunctionSelectors } from "../../../codegen/index.sol"; import { IWorldErrors } from "../../../interfaces/IWorldErrors.sol"; -import { ResourceType } from "../tables/ResourceType.sol"; -import { SystemHooks } from "../tables/SystemHooks.sol"; -import { SystemRegistry } from "../tables/SystemRegistry.sol"; -import { Systems } from "../tables/Systems.sol"; -import { FunctionSelectors } from "../tables/FunctionSelectors.sol"; - import { CORE_SYSTEM_NAME } from "../constants.sol"; import { WorldRegistrationSystem } from "./WorldRegistrationSystem.sol"; diff --git a/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol b/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol index 58ecdea46f..6efc6ff4f5 100644 --- a/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol +++ b/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol @@ -6,24 +6,16 @@ import { Hook, HookLib } from "@latticexyz/store/src/Hook.sol"; import { System } from "../../../System.sol"; import { WorldContextConsumer, WORLD_CONTEXT_CONSUMER_INTERFACE_ID } from "../../../WorldContext.sol"; import { ResourceSelector } from "../../../ResourceSelector.sol"; -import { Resource } from "../../../common.sol"; +import { Resource } from "../../../codegen/common.sol"; import { SystemCall } from "../../../SystemCall.sol"; import { ROOT_NAMESPACE, ROOT_NAME, UNLIMITED_DELEGATION } from "../../../constants.sol"; import { AccessControl } from "../../../AccessControl.sol"; import { requireInterface } from "../../../requireInterface.sol"; -import { NamespaceOwner } from "../../../tables/NamespaceOwner.sol"; -import { ResourceAccess } from "../../../tables/ResourceAccess.sol"; -import { Delegations } from "../../../tables/Delegations.sol"; +import { NamespaceOwner, ResourceAccess, Delegations, ResourceType, SystemHooks, SystemHooksTableId, SystemRegistry, Systems, FunctionSelectors } from "../../../codegen/index.sol"; import { ISystemHook, SYSTEM_HOOK_INTERFACE_ID } from "../../../interfaces/ISystemHook.sol"; import { IWorldErrors } from "../../../interfaces/IWorldErrors.sol"; import { IDelegationControl, DELEGATION_CONTROL_INTERFACE_ID } from "../../../interfaces/IDelegationControl.sol"; -import { ResourceType } from "../tables/ResourceType.sol"; -import { SystemHooks, SystemHooksTableId } from "../tables/SystemHooks.sol"; -import { SystemRegistry } from "../tables/SystemRegistry.sol"; -import { Systems } from "../tables/Systems.sol"; -import { FunctionSelectors } from "../tables/FunctionSelectors.sol"; - /** * Functions related to registering resources other than tables in the World. * Registering tables is implemented in StoreRegistrationSystem.sol diff --git a/packages/world/src/modules/keysintable/KeysInTableHook.sol b/packages/world/src/modules/keysintable/KeysInTableHook.sol index 4a9c518988..7034b67a3e 100644 --- a/packages/world/src/modules/keysintable/KeysInTableHook.sol +++ b/packages/world/src/modules/keysintable/KeysInTableHook.sol @@ -5,8 +5,7 @@ import { PackedCounter } from "@latticexyz/store/src/PackedCounter.sol"; import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol"; import { StoreHook } from "@latticexyz/store/src/StoreHook.sol"; -import { KeysInTable } from "./tables/KeysInTable.sol"; -import { UsedKeysIndex } from "./tables/UsedKeysIndex.sol"; +import { KeysInTable, UsedKeysIndex } from "../../codegen/index.sol"; /** * Note: if a table with composite keys is used, only the first five keys of the tuple are indexed diff --git a/packages/world/src/modules/keysintable/KeysInTableModule.sol b/packages/world/src/modules/keysintable/KeysInTableModule.sol index b775ea020a..1119bdcfb1 100644 --- a/packages/world/src/modules/keysintable/KeysInTableModule.sol +++ b/packages/world/src/modules/keysintable/KeysInTableModule.sol @@ -3,18 +3,16 @@ pragma solidity >=0.8.0; import { BEFORE_SET_RECORD, AFTER_SET_FIELD, BEFORE_DELETE_RECORD } from "@latticexyz/store/src/storeHookTypes.sol"; -import { ResourceType } from "../core/tables/ResourceType.sol"; -import { Resource } from "../../common.sol"; +import { ResourceType, KeysInTable, KeysInTableTableId, UsedKeysIndex, UsedKeysIndexTableId } from "../../codegen/index.sol"; +import { Resource } from "../../codegen/common.sol"; import { Module } from "../../Module.sol"; -import { IBaseWorld } from "../../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; import { ResourceSelector } from "../../ResourceSelector.sol"; import { revertWithBytes } from "../../revertWithBytes.sol"; import { KeysInTableHook } from "./KeysInTableHook.sol"; -import { KeysInTable, KeysInTableTableId } from "./tables/KeysInTable.sol"; -import { UsedKeysIndex, UsedKeysIndexTableId } from "./tables/UsedKeysIndex.sol"; /** * This module deploys a hook that is called when a value is set in the `sourceTableId` diff --git a/packages/world/src/modules/keysintable/getKeysInTable.sol b/packages/world/src/modules/keysintable/getKeysInTable.sol index c6b709f5fc..9ef1c1dbda 100644 --- a/packages/world/src/modules/keysintable/getKeysInTable.sol +++ b/packages/world/src/modules/keysintable/getKeysInTable.sol @@ -5,7 +5,7 @@ import { IStore } from "@latticexyz/store/src/IStore.sol"; import { Schema } from "@latticexyz/store/src/Schema.sol"; import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; -import { KeysInTable } from "./tables/KeysInTable.sol"; +import { KeysInTable } from "../../codegen/index.sol"; /** * Get a list of keys in the given table. diff --git a/packages/world/src/modules/keysintable/hasKey.sol b/packages/world/src/modules/keysintable/hasKey.sol index 637439047e..b6c5c49a04 100644 --- a/packages/world/src/modules/keysintable/hasKey.sol +++ b/packages/world/src/modules/keysintable/hasKey.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; import { IStore } from "@latticexyz/store/src/IStore.sol"; -import { UsedKeysIndex } from "./tables/UsedKeysIndex.sol"; +import { UsedKeysIndex } from "../../codegen/index.sol"; /** * Get whether the keyTuple is in the given table. diff --git a/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol b/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol index 3c3c822c0f..38e59fa9d9 100644 --- a/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol +++ b/packages/world/src/modules/keyswithvalue/KeysWithValueHook.sol @@ -6,12 +6,12 @@ import { Bytes } from "@latticexyz/store/src/Bytes.sol"; import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol"; import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; import { PackedCounter } from "@latticexyz/store/src/PackedCounter.sol"; -import { IBaseWorld } from "../../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; import { ResourceSelector } from "../../ResourceSelector.sol"; import { MODULE_NAMESPACE } from "./constants.sol"; -import { KeysWithValue } from "./tables/KeysWithValue.sol"; +import { KeysWithValue } from "../../codegen/index.sol"; import { ArrayLib } from "../utils/ArrayLib.sol"; import { getTargetTableSelector } from "../utils/getTargetTableSelector.sol"; diff --git a/packages/world/src/modules/keyswithvalue/KeysWithValueModule.sol b/packages/world/src/modules/keyswithvalue/KeysWithValueModule.sol index 453450cfaf..c02573e8e2 100644 --- a/packages/world/src/modules/keyswithvalue/KeysWithValueModule.sol +++ b/packages/world/src/modules/keyswithvalue/KeysWithValueModule.sol @@ -5,7 +5,7 @@ import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; import { BEFORE_SET_RECORD, BEFORE_SET_FIELD, AFTER_SET_FIELD, BEFORE_DELETE_RECORD } from "@latticexyz/store/src/storeHookTypes.sol"; import { Module } from "../../Module.sol"; -import { IBaseWorld } from "../../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; import { WorldContextConsumer } from "../../WorldContext.sol"; import { ResourceSelector } from "../../ResourceSelector.sol"; @@ -13,7 +13,7 @@ import { revertWithBytes } from "../../revertWithBytes.sol"; import { MODULE_NAMESPACE } from "./constants.sol"; import { KeysWithValueHook } from "./KeysWithValueHook.sol"; -import { KeysWithValue } from "./tables/KeysWithValue.sol"; +import { KeysWithValue } from "../../codegen/index.sol"; import { getTargetTableSelector } from "../utils/getTargetTableSelector.sol"; /** diff --git a/packages/world/src/modules/keyswithvalue/getKeysWithValue.sol b/packages/world/src/modules/keyswithvalue/getKeysWithValue.sol index e47fba0d10..220e29bade 100644 --- a/packages/world/src/modules/keyswithvalue/getKeysWithValue.sol +++ b/packages/world/src/modules/keyswithvalue/getKeysWithValue.sol @@ -5,7 +5,7 @@ import { IStore } from "@latticexyz/store/src/IStore.sol"; import { PackedCounter } from "@latticexyz/store/src/PackedCounter.sol"; import { MODULE_NAMESPACE } from "./constants.sol"; -import { KeysWithValue } from "./tables/KeysWithValue.sol"; +import { KeysWithValue } from "../../codegen/index.sol"; import { getTargetTableSelector } from "../utils/getTargetTableSelector.sol"; /** diff --git a/packages/world/src/modules/std-delegations/CallboundDelegationControl.sol b/packages/world/src/modules/std-delegations/CallboundDelegationControl.sol index fbb62081ee..863fe5cd65 100644 --- a/packages/world/src/modules/std-delegations/CallboundDelegationControl.sol +++ b/packages/world/src/modules/std-delegations/CallboundDelegationControl.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8.0; import { DelegationControl } from "../../DelegationControl.sol"; -import { CallboundDelegations } from "./tables/CallboundDelegations.sol"; +import { CallboundDelegations } from "../../codegen/index.sol"; contract CallboundDelegationControl is DelegationControl { /** diff --git a/packages/world/src/modules/std-delegations/StandardDelegationsModule.sol b/packages/world/src/modules/std-delegations/StandardDelegationsModule.sol index d1ba02718d..250932ffc5 100644 --- a/packages/world/src/modules/std-delegations/StandardDelegationsModule.sol +++ b/packages/world/src/modules/std-delegations/StandardDelegationsModule.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0; -import { IBaseWorld } from "../../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; import { Module } from "../../Module.sol"; import { WorldContextConsumer } from "../../WorldContext.sol"; @@ -12,8 +12,7 @@ import { CallboundDelegationControl } from "./CallboundDelegationControl.sol"; import { TimeboundDelegationControl } from "./TimeboundDelegationControl.sol"; import { MODULE_NAME, CALLBOUND_DELEGATION, TIMEBOUND_DELEGATION } from "./constants.sol"; -import { CallboundDelegations } from "./tables/CallboundDelegations.sol"; -import { TimeboundDelegations } from "./tables/TimeboundDelegations.sol"; +import { CallboundDelegations, TimeboundDelegations } from "../../codegen/index.sol"; /** * This module registers tables and delegation control systems required for standard delegations diff --git a/packages/world/src/modules/std-delegations/TimeboundDelegationControl.sol b/packages/world/src/modules/std-delegations/TimeboundDelegationControl.sol index efeb00663e..07138eae71 100644 --- a/packages/world/src/modules/std-delegations/TimeboundDelegationControl.sol +++ b/packages/world/src/modules/std-delegations/TimeboundDelegationControl.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8.0; import { DelegationControl } from "../../DelegationControl.sol"; -import { TimeboundDelegations } from "./tables/TimeboundDelegations.sol"; +import { TimeboundDelegations } from "../../codegen/index.sol"; contract TimeboundDelegationControl is DelegationControl { /** diff --git a/packages/world/src/modules/uniqueentity/UniqueEntityModule.sol b/packages/world/src/modules/uniqueentity/UniqueEntityModule.sol index f404c4b50a..192d8cec0a 100644 --- a/packages/world/src/modules/uniqueentity/UniqueEntityModule.sol +++ b/packages/world/src/modules/uniqueentity/UniqueEntityModule.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0; -import { IBaseWorld } from "../../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; import { Module } from "../../Module.sol"; import { WorldContextConsumer } from "../../WorldContext.sol"; import { ResourceSelector } from "../../ResourceSelector.sol"; -import { UniqueEntity } from "./tables/UniqueEntity.sol"; +import { UniqueEntity } from "../../codegen/index.sol"; import { UniqueEntitySystem } from "./UniqueEntitySystem.sol"; import { NAMESPACE, MODULE_NAME, SYSTEM_NAME, TABLE_NAME } from "./constants.sol"; diff --git a/packages/world/src/modules/uniqueentity/UniqueEntitySystem.sol b/packages/world/src/modules/uniqueentity/UniqueEntitySystem.sol index 3ef850f25e..7accac8d8d 100644 --- a/packages/world/src/modules/uniqueentity/UniqueEntitySystem.sol +++ b/packages/world/src/modules/uniqueentity/UniqueEntitySystem.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; import { System } from "../../System.sol"; -import { UniqueEntity } from "./tables/UniqueEntity.sol"; +import { UniqueEntity } from "../../codegen/index.sol"; import { NAMESPACE, TABLE_NAME } from "./constants.sol"; import { ResourceSelector } from "../../ResourceSelector.sol"; diff --git a/packages/world/src/modules/uniqueentity/getUniqueEntity.sol b/packages/world/src/modules/uniqueentity/getUniqueEntity.sol index 6142514a97..62f0d2208a 100644 --- a/packages/world/src/modules/uniqueentity/getUniqueEntity.sol +++ b/packages/world/src/modules/uniqueentity/getUniqueEntity.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; -import { IBaseWorld } from "../../interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; import { IUniqueEntitySystem } from "../../interfaces/IUniqueEntitySystem.sol"; /** diff --git a/packages/world/test/AccessControl.t.sol b/packages/world/test/AccessControl.t.sol index feddf64c67..b48552d564 100644 --- a/packages/world/test/AccessControl.t.sol +++ b/packages/world/test/AccessControl.t.sol @@ -10,8 +10,7 @@ import { World } from "../src/World.sol"; import { AccessControl } from "../src/AccessControl.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; -import { ResourceAccess } from "../src/tables/ResourceAccess.sol"; -import { NamespaceOwner } from "../src/tables/NamespaceOwner.sol"; +import { ResourceAccess, NamespaceOwner } from "../src/codegen/index.sol"; contract AccessControlTest is Test, GasReporter, StoreMock { bytes16 constant namespace = "namespace"; diff --git a/packages/world/test/Factories.t.sol b/packages/world/test/Factories.t.sol index 5887d42ddb..8126d19ffa 100644 --- a/packages/world/test/Factories.t.sol +++ b/packages/world/test/Factories.t.sol @@ -10,8 +10,7 @@ import { CoreModule } from "../src/modules/core/CoreModule.sol"; import { Create2Factory } from "../src/factories/Create2Factory.sol"; import { WorldFactory } from "../src/factories/WorldFactory.sol"; import { IWorldFactory } from "../src/factories/IWorldFactory.sol"; -import { InstalledModules } from "../src/tables/InstalledModules.sol"; -import { NamespaceOwner } from "../src/tables/NamespaceOwner.sol"; +import { InstalledModules, NamespaceOwner } from "../src/codegen/index.sol"; import { ROOT_NAMESPACE } from "../src/constants.sol"; contract FactoriesTest is Test { diff --git a/packages/world/test/KeysInTableModule.t.sol b/packages/world/test/KeysInTableModule.t.sol index 7789e33740..f0f3f1c684 100644 --- a/packages/world/test/KeysInTableModule.t.sol +++ b/packages/world/test/KeysInTableModule.t.sol @@ -12,7 +12,7 @@ import { SchemaEncodeHelper } from "@latticexyz/store/test/SchemaEncodeHelper.so import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol"; import { World } from "../src/World.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; import { ROOT_NAMESPACE } from "../src/constants.sol"; diff --git a/packages/world/test/KeysWithValueModule.t.sol b/packages/world/test/KeysWithValueModule.t.sol index fa8e8e83d5..9eea032d99 100644 --- a/packages/world/test/KeysWithValueModule.t.sol +++ b/packages/world/test/KeysWithValueModule.t.sol @@ -13,14 +13,14 @@ import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol"; import { FieldLayoutEncodeHelper } from "@latticexyz/store/test/FieldLayoutEncodeHelper.sol"; import { World } from "../src/World.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; import { ROOT_NAMESPACE } from "../src/constants.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; import { KeysWithValueModule } from "../src/modules/keyswithvalue/KeysWithValueModule.sol"; import { MODULE_NAMESPACE } from "../src/modules/keyswithvalue/constants.sol"; -import { KeysWithValue } from "../src/modules/keyswithvalue/tables/KeysWithValue.sol"; +import { KeysWithValue } from "../src/codegen/index.sol"; import { getKeysWithValue } from "../src/modules/keyswithvalue/getKeysWithValue.sol"; import { getTargetTableSelector } from "../src/modules/utils/getTargetTableSelector.sol"; diff --git a/packages/world/test/StandardDelegationsModule.t.sol b/packages/world/test/StandardDelegationsModule.t.sol index 72b83642d8..4e155aa0a0 100644 --- a/packages/world/test/StandardDelegationsModule.t.sol +++ b/packages/world/test/StandardDelegationsModule.t.sol @@ -6,12 +6,12 @@ import { GasReporter } from "@latticexyz/gas-report/src/GasReporter.sol"; import { World } from "../src/World.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { System } from "../src/System.sol"; import { IWorldErrors } from "../src/interfaces/IWorldErrors.sol"; import { DELEGATION_CONTROL_INTERFACE_ID } from "../src/interfaces/IDelegationControl.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; -import { Systems } from "../src/modules/core/tables/Systems.sol"; +import { Systems } from "../src/codegen/index.sol"; import { StandardDelegationsModule } from "../src/modules/std-delegations/StandardDelegationsModule.sol"; import { CallboundDelegationControl } from "../src/modules/std-delegations/CallboundDelegationControl.sol"; import { TimeboundDelegationControl } from "../src/modules/std-delegations/TimeboundDelegationControl.sol"; diff --git a/packages/world/test/UniqueEntityModule.t.sol b/packages/world/test/UniqueEntityModule.t.sol index 22db658279..25c66d0b54 100644 --- a/packages/world/test/UniqueEntityModule.t.sol +++ b/packages/world/test/UniqueEntityModule.t.sol @@ -5,12 +5,12 @@ import { Test } from "forge-std/Test.sol"; import { GasReporter } from "@latticexyz/gas-report/src/GasReporter.sol"; import { World } from "../src/World.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { IWorldErrors } from "../src/interfaces/IWorldErrors.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; import { UniqueEntityModule } from "../src/modules/uniqueentity/UniqueEntityModule.sol"; -import { UniqueEntity } from "../src/modules/uniqueentity/tables/UniqueEntity.sol"; +import { UniqueEntity } from "../src/codegen/index.sol"; import { getUniqueEntity } from "../src/modules/uniqueentity/getUniqueEntity.sol"; import { NAMESPACE, TABLE_NAME } from "../src/modules/uniqueentity/constants.sol"; diff --git a/packages/world/test/Utils.t.sol b/packages/world/test/Utils.t.sol index de0acda0d0..ceb1e0a9ec 100644 --- a/packages/world/test/Utils.t.sol +++ b/packages/world/test/Utils.t.sol @@ -6,7 +6,7 @@ import { Test } from "forge-std/Test.sol"; import { Utils } from "../src/Utils.sol"; import { System } from "../src/System.sol"; import { World } from "../src/World.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; diff --git a/packages/world/test/World.t.sol b/packages/world/test/World.t.sol index 4e1038c93c..c1546e71f4 100644 --- a/packages/world/test/World.t.sol +++ b/packages/world/test/World.t.sol @@ -25,27 +25,21 @@ import { World } from "../src/World.sol"; import { System } from "../src/System.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; import { ROOT_NAMESPACE, ROOT_NAME, UNLIMITED_DELEGATION } from "../src/constants.sol"; -import { Resource } from "../src/common.sol"; +import { Resource } from "../src/codegen/common.sol"; import { WorldContextProvider, WORLD_CONTEXT_CONSUMER_INTERFACE_ID } from "../src/WorldContext.sol"; import { SystemHook } from "../src/SystemHook.sol"; import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "../src/systemHookTypes.sol"; import { Module, MODULE_INTERFACE_ID } from "../src/Module.sol"; -import { NamespaceOwner, NamespaceOwnerTableId } from "../src/tables/NamespaceOwner.sol"; -import { ResourceAccess } from "../src/tables/ResourceAccess.sol"; +import { NamespaceOwner, NamespaceOwnerTableId, ResourceAccess, Bool, AddressArray } from "../src/codegen/index.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; -import { Systems } from "../src/modules/core/tables/Systems.sol"; -import { SystemRegistry } from "../src/modules/core/tables/SystemRegistry.sol"; -import { ResourceType } from "../src/modules/core/tables/ResourceType.sol"; +import { Systems, SystemRegistry, ResourceType } from "../src/codegen/index.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { IWorldErrors } from "../src/interfaces/IWorldErrors.sol"; import { ISystemHook, SYSTEM_HOOK_INTERFACE_ID } from "../src/interfaces/ISystemHook.sol"; -import { Bool } from "./tables/Bool.sol"; -import { AddressArray } from "./tables/AddressArray.sol"; - interface IWorldTestSystem { function testNamespace_testSystem_err(string memory input) external pure; } diff --git a/packages/world/test/WorldBalance.t.sol b/packages/world/test/WorldBalance.t.sol index f7225afde6..3c6a78ee41 100644 --- a/packages/world/test/WorldBalance.t.sol +++ b/packages/world/test/WorldBalance.t.sol @@ -5,11 +5,11 @@ import "forge-std/Test.sol"; import { GasReporter } from "@latticexyz/gas-report/src/GasReporter.sol"; import { World } from "../src/World.sol"; import { System } from "../src/System.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; import { ROOT_NAMESPACE } from "../src/constants.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; -import { Balances } from "../src/modules/core/tables/Balances.sol"; +import { Balances } from "../src/codegen/index.sol"; import { IWorldErrors } from "../src/interfaces/IWorldErrors.sol"; using ResourceSelector for bytes32; diff --git a/packages/world/test/WorldDynamicUpdate.t.sol b/packages/world/test/WorldDynamicUpdate.t.sol index e2bea13264..2a99eea5be 100644 --- a/packages/world/test/WorldDynamicUpdate.t.sol +++ b/packages/world/test/WorldDynamicUpdate.t.sol @@ -18,13 +18,11 @@ import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol"; import { World } from "../src/World.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; -import { NamespaceOwner } from "../src/tables/NamespaceOwner.sol"; -import { ResourceAccess } from "../src/tables/ResourceAccess.sol"; -import { AddressArray } from "./tables/AddressArray.sol"; +import { NamespaceOwner, ResourceAccess, AddressArray } from "../src/codegen/index.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { IWorldErrors } from "../src/interfaces/IWorldErrors.sol"; contract UpdateInFieldTest is Test, GasReporter { diff --git a/packages/world/test/query.t.sol b/packages/world/test/query.t.sol index 27f8621b9a..55bcb3f50b 100644 --- a/packages/world/test/query.t.sol +++ b/packages/world/test/query.t.sol @@ -12,7 +12,7 @@ import { PackedCounter } from "@latticexyz/store/src/PackedCounter.sol"; import { SchemaType } from "@latticexyz/schema-type/src/solidity/SchemaType.sol"; import { World } from "../src/World.sol"; -import { IBaseWorld } from "../src/interfaces/IBaseWorld.sol"; +import { IBaseWorld } from "../src/codegen/interfaces/IBaseWorld.sol"; import { ResourceSelector } from "../src/ResourceSelector.sol"; import { ROOT_NAMESPACE } from "../src/constants.sol";