diff --git a/.changeset/smart-fireants-play.md b/.changeset/smart-fireants-play.md new file mode 100644 index 0000000000..17aecdb385 --- /dev/null +++ b/.changeset/smart-fireants-play.md @@ -0,0 +1,6 @@ +--- +"@latticexyz/store": patch +"@latticexyz/world": patch +--- + +Removed unused imports from various files in the `store` and `world` packages. diff --git a/packages/store/src/StoreRead.sol b/packages/store/src/StoreRead.sol index b63bbddf9a..1bbd84d465 100644 --- a/packages/store/src/StoreRead.sol +++ b/packages/store/src/StoreRead.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.21; -import { STORE_VERSION } from "./version.sol"; import { IStoreRead } from "./IStoreRead.sol"; import { StoreCore } from "./StoreCore.sol"; import { FieldLayout } from "./FieldLayout.sol"; diff --git a/packages/store/src/tightcoder/TightCoder.sol b/packages/store/src/tightcoder/TightCoder.sol index 63296bcb9c..7bd5858665 100644 --- a/packages/store/src/tightcoder/TightCoder.sol +++ b/packages/store/src/tightcoder/TightCoder.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.21; -import { Slice, SliceLib } from "../Slice.sol"; +import { Slice } from "../Slice.sol"; /** * @title TightCoder diff --git a/packages/world/src/SystemCall.sol b/packages/world/src/SystemCall.sol index 0b337d6065..e2e0146bf9 100644 --- a/packages/world/src/SystemCall.sol +++ b/packages/world/src/SystemCall.sol @@ -13,7 +13,6 @@ import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "./systemHookTypes.sol"; import { IWorldErrors } from "./IWorldErrors.sol"; import { ISystemHook } from "./ISystemHook.sol"; -import { FunctionSelectors } from "./codegen/tables/FunctionSelectors.sol"; import { Systems } from "./codegen/tables/Systems.sol"; import { SystemHooks } from "./codegen/tables/SystemHooks.sol"; import { Balances } from "./codegen/tables/Balances.sol"; diff --git a/packages/world/src/World.sol b/packages/world/src/World.sol index 5841ce098e..fbd17cc510 100644 --- a/packages/world/src/World.sol +++ b/packages/world/src/World.sol @@ -2,35 +2,27 @@ pragma solidity >=0.8.21; import { StoreData } from "@latticexyz/store/src/StoreData.sol"; -import { IStore } from "@latticexyz/store/src/IStore.sol"; import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; import { Bytes } from "@latticexyz/store/src/Bytes.sol"; -import { Schema } from "@latticexyz/store/src/Schema.sol"; import { PackedCounter } from "@latticexyz/store/src/PackedCounter.sol"; import { FieldLayout } from "@latticexyz/store/src/FieldLayout.sol"; import { WORLD_VERSION } from "./version.sol"; -import { System } from "./System.sol"; import { ResourceId, WorldResourceIdInstance } from "./WorldResourceId.sol"; -import { ROOT_NAMESPACE_ID, ROOT_NAMESPACE, ROOT_NAME } from "./constants.sol"; +import { ROOT_NAMESPACE_ID } from "./constants.sol"; import { AccessControl } from "./AccessControl.sol"; import { SystemCall } from "./SystemCall.sol"; import { WorldContextProviderLib } from "./WorldContext.sol"; -import { revertWithBytes } from "./revertWithBytes.sol"; import { Delegation } from "./Delegation.sol"; import { requireInterface } from "./requireInterface.sol"; -import { NamespaceOwner } from "./codegen/tables/NamespaceOwner.sol"; import { InstalledModules } from "./codegen/tables/InstalledModules.sol"; import { UserDelegationControl } from "./codegen/tables/UserDelegationControl.sol"; import { NamespaceDelegationControl } from "./codegen/tables/NamespaceDelegationControl.sol"; import { IModule, MODULE_INTERFACE_ID } from "./IModule.sol"; import { IWorldKernel } from "./IWorldKernel.sol"; -import { IDelegationControl } from "./IDelegationControl.sol"; -import { Systems } from "./codegen/tables/Systems.sol"; -import { SystemHooks } from "./codegen/tables/SystemHooks.sol"; import { FunctionSelectors } from "./codegen/tables/FunctionSelectors.sol"; import { Balances } from "./codegen/tables/Balances.sol"; import { CORE_MODULE_NAME } from "./modules/core/constants.sol"; diff --git a/packages/world/src/modules/core/CoreModule.sol b/packages/world/src/modules/core/CoreModule.sol index c4ee5eb450..405312f30a 100644 --- a/packages/world/src/modules/core/CoreModule.sol +++ b/packages/world/src/modules/core/CoreModule.sol @@ -2,15 +2,11 @@ pragma solidity >=0.8.21; import { WorldContextProviderLib } from "../../WorldContext.sol"; -import { ROOT_NAMESPACE, ROOT_NAMESPACE_ID, STORE_NAMESPACE_ID, WORLD_NAMESPACE_ID } from "../../constants.sol"; +import { ROOT_NAMESPACE_ID, STORE_NAMESPACE_ID, WORLD_NAMESPACE_ID } from "../../constants.sol"; import { Module } from "../../Module.sol"; -import { IBaseWorld } from "../../codegen/interfaces/IBaseWorld.sol"; - import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.sol"; -import { ResourceId, WorldResourceIdLib, WorldResourceIdInstance } from "../../WorldResourceId.sol"; -import { RESOURCE_SYSTEM } from "../../worldResourceTypes.sol"; import { NamespaceOwner } from "../../codegen/tables/NamespaceOwner.sol"; import { ResourceAccess } from "../../codegen/tables/ResourceAccess.sol"; @@ -28,11 +24,6 @@ import { SystemHooks } from "../../codegen/tables/SystemHooks.sol"; import { SystemRegistry } from "../../codegen/tables/SystemRegistry.sol"; import { Balances } from "../../codegen/tables/Balances.sol"; -import { AccessManagementSystem } from "./implementations/AccessManagementSystem.sol"; -import { BalanceTransferSystem } from "./implementations/BalanceTransferSystem.sol"; -import { BatchCallSystem } from "./implementations/BatchCallSystem.sol"; -import { ModuleInstallationSystem } from "./implementations/ModuleInstallationSystem.sol"; -import { StoreRegistrationSystem } from "./implementations/StoreRegistrationSystem.sol"; import { WorldRegistrationSystem } from "./implementations/WorldRegistrationSystem.sol"; /** diff --git a/packages/world/src/modules/core/implementations/AccessManagementSystem.sol b/packages/world/src/modules/core/implementations/AccessManagementSystem.sol index 4d5503f5e1..564a6a4e33 100644 --- a/packages/world/src/modules/core/implementations/AccessManagementSystem.sol +++ b/packages/world/src/modules/core/implementations/AccessManagementSystem.sol @@ -1,12 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity >=0.8.21; -import { IModule } from "../../../IModule.sol"; import { System } from "../../../System.sol"; import { AccessControl } from "../../../AccessControl.sol"; -import { ResourceId, WorldResourceIdLib } from "../../../WorldResourceId.sol"; +import { ResourceId } from "../../../WorldResourceId.sol"; import { ResourceAccess } from "../../../codegen/tables/ResourceAccess.sol"; -import { InstalledModules } from "../../../codegen/tables/InstalledModules.sol"; import { NamespaceOwner } from "../../../codegen/tables/NamespaceOwner.sol"; /** diff --git a/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol b/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol index 8a5afb2e6a..085e98db7f 100644 --- a/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol +++ b/packages/world/src/modules/core/implementations/BalanceTransferSystem.sol @@ -5,7 +5,7 @@ import { ResourceId, ResourceIdInstance } from "@latticexyz/store/src/ResourceId import { System } from "../../../System.sol"; import { revertWithBytes } from "../../../revertWithBytes.sol"; -import { WorldResourceIdLib, WorldResourceIdInstance } from "../../../WorldResourceId.sol"; +import { WorldResourceIdInstance } from "../../../WorldResourceId.sol"; import { AccessControl } from "../../../AccessControl.sol"; import { RESOURCE_NAMESPACE } from "../../../worldResourceTypes.sol"; import { IWorldErrors } from "../../../IWorldErrors.sol"; diff --git a/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol b/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol index 4fd4a1c182..e5c253f8bd 100644 --- a/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol +++ b/packages/world/src/modules/core/implementations/ModuleInstallationSystem.sol @@ -3,9 +3,7 @@ pragma solidity >=0.8.21; import { IModule, MODULE_INTERFACE_ID } from "../../../IModule.sol"; import { System } from "../../../System.sol"; -import { AccessControl } from "../../../AccessControl.sol"; import { WorldContextProviderLib } from "../../../WorldContext.sol"; -import { ResourceAccess } from "../../../codegen/tables/ResourceAccess.sol"; import { InstalledModules } from "../../../codegen/tables/InstalledModules.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 96baa03cd6..35687225f2 100644 --- a/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol +++ b/packages/world/src/modules/core/implementations/StoreRegistrationSystem.sol @@ -9,18 +9,12 @@ import { ResourceIds } from "@latticexyz/store/src/codegen/tables/ResourceIds.so import { System } from "../../../System.sol"; import { ResourceId, WorldResourceIdInstance } from "../../../WorldResourceId.sol"; -import { ROOT_NAMESPACE, ROOT_NAME } from "../../../constants.sol"; +import { ROOT_NAME } from "../../../constants.sol"; import { AccessControl } from "../../../AccessControl.sol"; import { requireInterface } from "../../../requireInterface.sol"; import { revertWithBytes } from "../../../revertWithBytes.sol"; -import { WorldContextProviderLib } from "../../../WorldContext.sol"; -import { NamespaceOwner } from "../../../codegen/tables/NamespaceOwner.sol"; -import { ResourceAccess } from "../../../codegen/tables/ResourceAccess.sol"; -import { SystemHooks } from "../../../codegen/tables/SystemHooks.sol"; -import { SystemRegistry } from "../../../codegen/tables/SystemRegistry.sol"; import { Systems } from "../../../codegen/tables/Systems.sol"; -import { FunctionSelectors } from "../../../codegen/tables/FunctionSelectors.sol"; import { IWorldErrors } from "../../../IWorldErrors.sol"; diff --git a/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol b/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol index a4ba0bb614..a721841a1f 100644 --- a/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol +++ b/packages/world/src/modules/core/implementations/WorldRegistrationSystem.sol @@ -20,7 +20,7 @@ import { UserDelegationControl } from "../../../codegen/tables/UserDelegationCon import { NamespaceDelegationControl } from "../../../codegen/tables/NamespaceDelegationControl.sol"; import { ISystemHook, SYSTEM_HOOK_INTERFACE_ID } from "../../../ISystemHook.sol"; import { IWorldErrors } from "../../../IWorldErrors.sol"; -import { IDelegationControl, DELEGATION_CONTROL_INTERFACE_ID } from "../../../IDelegationControl.sol"; +import { DELEGATION_CONTROL_INTERFACE_ID } from "../../../IDelegationControl.sol"; import { SystemHooks, SystemHooksTableId } from "../../../codegen/tables/SystemHooks.sol"; import { SystemRegistry } from "../../../codegen/tables/SystemRegistry.sol";