From 04bb51f327eda880b1a1c60f3fdf5e7329721966 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Wed, 9 Oct 2024 12:52:09 +0800 Subject: [PATCH] shorten imports --- .../AutomataDcapV3Attestation.sol | 29 +++++----- .../interfaces/IAttestation.sol | 2 +- .../lib/PEMCertChainLib.sol | 10 ++-- .../lib/QuoteV3Auth/V3Parser.sol | 8 +-- .../contracts/layer1/based/LibBonds.sol | 4 +- .../contracts/layer1/based/LibProposing.sol | 4 +- .../contracts/layer1/based/LibUtils.sol | 6 +-- .../contracts/layer1/based/LibVerifying.sol | 2 +- .../contracts/layer1/based/TaikoData.sol | 2 +- .../contracts/layer1/based/TaikoL1.sol | 2 +- .../layer1/hekla/HeklaTaikoToken.sol | 2 +- .../mainnet/addrcache/RollupAddressCache.sol | 4 +- .../mainnet/addrcache/SharedAddressCache.sol | 4 +- .../mainnet/multirollup/MainnetBridge.sol | 2 +- .../multirollup/MainnetERC1155Vault.sol | 2 +- .../mainnet/multirollup/MainnetERC20Vault.sol | 2 +- .../multirollup/MainnetERC721Vault.sol | 2 +- .../MainnetSharedAddressManager.sol | 4 +- .../multirollup/MainnetSignalService.sol | 2 +- .../mainnet/rollup/MainnetGuardianProver.sol | 2 +- .../mainnet/rollup/MainnetProverSet.sol | 2 +- .../rollup/MainnetRollupAddressManager.sol | 4 +- .../layer1/mainnet/rollup/MainnetTaikoL1.sol | 2 +- .../mainnet/rollup/MainnetTierRouter.sol | 2 +- .../rollup/verifiers/MainnetRisc0Verifier.sol | 6 +-- .../rollup/verifiers/MainnetSP1Verifier.sol | 6 +-- .../rollup/verifiers/MainnetSgxVerifier.sol | 6 +-- .../verifiers/MainnetTeeAnyVerifier.sol | 6 +-- .../verifiers/MainnetZkAndTeeVerifier.sol | 6 +-- .../rollup/verifiers/MainnetZkAnyVerifier.sol | 6 +-- .../layer1/provers/GuardianProver.sol | 4 +- .../contracts/layer1/provers/ProverSet.sol | 6 +-- .../layer1/team/airdrop/MerkleClaimable.sol | 2 +- .../layer1/team/tokenunlock/TokenUnlock.sol | 6 +-- .../layer1/tiers/TierProviderBase.sol | 2 +- .../contracts/layer1/token/TaikoToken.sol | 2 +- .../layer1/verifiers/Risc0Verifier.sol | 4 +- .../layer1/verifiers/SP1Verifier.sol | 4 +- .../layer1/verifiers/SgxVerifier.sol | 4 +- .../verifiers/compose/ComposeVerifier.sol | 4 +- .../verifiers/compose/TeeAnyVerifier.sol | 2 +- .../verifiers/compose/ZkAndTeeVerifier.sol | 2 +- .../verifiers/compose/ZkAnyVerifier.sol | 2 +- .../contracts/layer2/based/Lib1559Math.sol | 2 +- .../contracts/layer2/based/TaikoL2.sol | 10 ++-- .../layer2/token/BridgedTaikoToken.sol | 4 +- packages/protocol/foundry.toml | 3 ++ .../layer1/AddSGXVerifierInstances.s.sol | 4 +- .../script/layer1/DeployERC20Airdrop.s.sol | 4 +- .../script/layer1/DeployLabsProverPool.s.sol | 4 +- .../script/layer1/DeployProtocolOnL1.s.sol | 54 +++++++++---------- .../script/layer1/DeployProverSet.s.sol | 4 +- .../script/layer1/DeployQuotaManager.s.sol | 4 +- .../script/layer1/DeployRisc0Verifier.s.sol | 4 +- .../script/layer1/DeploySP1Verifier.s.sol | 4 +- .../script/layer1/DeployTaikoToken.s.sol | 4 +- .../layer1/SendMessageToDelegateOwner.s.sol | 6 +-- .../script/layer1/SetDcapParams.s.sol | 2 +- .../script/layer1/UpgradeHeklaOntakeL1.s.sol | 12 ++--- .../script/layer1/UpgradeHeklaOntakeL2.s.sol | 12 ++--- .../script/layer1/tokenunlock/Deploy.s.sol | 4 +- .../script/layer1/tokenunlock/Vest.s.sol | 2 +- .../script/layer2/DeployDelegateOwner.s.sol | 4 +- .../script/layer2/PostGenesisConfig.s.sol | 6 +-- .../script/layer2/PostGenesisQuery.s.sol | 6 +-- .../shared/AuthorizeTaikoForMultihop.s.sol | 4 +- .../protocol/script/shared/SetAddress.s.sol | 2 +- .../script/shared/SetRemoteBridgeSuites.s.sol | 2 +- .../test/genesis/GenerateGenesis.g.sol | 14 ++--- packages/protocol/test/layer1/TaikoL1Test.sol | 16 +++--- .../common/AttestationBase.t.sol | 15 +++--- .../utils/DcapTestUtils.t.sol | 9 ++-- .../utils/V3QuoteParseUtils.t.sol | 11 ++-- .../test/layer1/based/GuardianProver1.t.sol | 4 +- .../test/layer1/based/GuardianProver2.t.sol | 2 +- .../test/layer1/based/TestTierProvider.sol | 8 +-- .../layer1/team/tokenunlock/TokenUnlock.t.sol | 4 +- .../verifiers/compose/ComposeVerifeir.t.sol | 4 +- .../layer2/TaikoL2EIP1559Configurable.sol | 2 +- packages/protocol/test/layer2/TaikoL2Test.sol | 2 +- .../protocol/test/shared/DeployCapability.sol | 2 +- .../protocol/test/shared/HelperContracts.sol | 4 +- packages/protocol/test/shared/TaikoTest.sol | 12 ++--- .../test/shared/common/LibAddress.t.sol | 2 +- .../test/shared/common/LibTrieProof.t.sol | 2 +- 85 files changed, 227 insertions(+), 238 deletions(-) diff --git a/packages/protocol/contracts/layer1/automata-attestation/AutomataDcapV3Attestation.sol b/packages/protocol/contracts/layer1/automata-attestation/AutomataDcapV3Attestation.sol index aec2b13ccc3..4b019c4723c 100644 --- a/packages/protocol/contracts/layer1/automata-attestation/AutomataDcapV3Attestation.sol +++ b/packages/protocol/contracts/layer1/automata-attestation/AutomataDcapV3Attestation.sol @@ -1,23 +1,18 @@ //SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { V3Struct } from "./lib/QuoteV3Auth/V3Struct.sol"; -import { V3Parser } from "./lib/QuoteV3Auth/V3Parser.sol"; -import { IPEMCertChainLib } from "./lib/interfaces/IPEMCertChainLib.sol"; -import { PEMCertChainLib } from "./lib/PEMCertChainLib.sol"; -import { TCBInfoStruct } from "./lib/TCBInfoStruct.sol"; -import { EnclaveIdStruct } from "./lib/EnclaveIdStruct.sol"; -import { IAttestation } from "./interfaces/IAttestation.sol"; - -// Internal Libraries -import { Base64 } from "solady/src/utils/Base64.sol"; -import { LibString } from "solady/src/utils/LibString.sol"; -import { BytesUtils } from "./utils/BytesUtils.sol"; - -// External Libraries -import { ISigVerifyLib } from "./interfaces/ISigVerifyLib.sol"; - -import { EssentialContract } from "../../shared/common/EssentialContract.sol"; +import "solady/src/utils/Base64.sol"; +import "solady/src/utils/LibString.sol"; +import "src/shared/common/EssentialContract.sol"; +import "./lib/QuoteV3Auth/V3Struct.sol"; +import "./lib/QuoteV3Auth/V3Parser.sol"; +import "./lib/interfaces/IPEMCertChainLib.sol"; +import "./lib/PEMCertChainLib.sol"; +import "./lib/TCBInfoStruct.sol"; +import "./lib/EnclaveIdStruct.sol"; +import "./interfaces/IAttestation.sol"; +import "./utils/BytesUtils.sol"; +import "./interfaces/ISigVerifyLib.sol"; /// @title AutomataDcapV3Attestation /// @custom:security-contact security@taiko.xyz diff --git a/packages/protocol/contracts/layer1/automata-attestation/interfaces/IAttestation.sol b/packages/protocol/contracts/layer1/automata-attestation/interfaces/IAttestation.sol index e5a960a4af8..8059b9216b3 100644 --- a/packages/protocol/contracts/layer1/automata-attestation/interfaces/IAttestation.sol +++ b/packages/protocol/contracts/layer1/automata-attestation/interfaces/IAttestation.sol @@ -1,7 +1,7 @@ //SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { V3Struct } from "../lib/QuoteV3Auth/V3Struct.sol"; +import "../lib/QuoteV3Auth/V3Struct.sol"; /// @title IAttestation /// @custom:security-contact security@taiko.xyz diff --git a/packages/protocol/contracts/layer1/automata-attestation/lib/PEMCertChainLib.sol b/packages/protocol/contracts/layer1/automata-attestation/lib/PEMCertChainLib.sol index 0fcc99f0a39..768861942e0 100644 --- a/packages/protocol/contracts/layer1/automata-attestation/lib/PEMCertChainLib.sol +++ b/packages/protocol/contracts/layer1/automata-attestation/lib/PEMCertChainLib.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { LibString } from "solady/src/utils/LibString.sol"; -import { Asn1Decode, NodePtr } from "../utils/Asn1Decode.sol"; -import { BytesUtils } from "../utils/BytesUtils.sol"; -import { X509DateUtils } from "../utils/X509DateUtils.sol"; -import { IPEMCertChainLib } from "./interfaces/IPEMCertChainLib.sol"; +import "solady/src/utils/LibString.sol"; +import "../utils/Asn1Decode.sol"; +import "../utils/BytesUtils.sol"; +import "../utils/X509DateUtils.sol"; +import "./interfaces/IPEMCertChainLib.sol"; /// @title PEMCertChainLib /// @custom:security-contact security@taiko.xyz diff --git a/packages/protocol/contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Parser.sol b/packages/protocol/contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Parser.sol index 59e95ef1f40..773c07d551c 100644 --- a/packages/protocol/contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Parser.sol +++ b/packages/protocol/contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Parser.sol @@ -1,10 +1,10 @@ //SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { Base64 } from "solady/src/utils/Base64.sol"; -import { BytesUtils } from "../../utils/BytesUtils.sol"; -import { IPEMCertChainLib, PEMCertChainLib } from "../../lib/PEMCertChainLib.sol"; -import { V3Struct } from "./V3Struct.sol"; +import "solady/src/utils/Base64.sol"; +import "../../utils/BytesUtils.sol"; +import "../../lib/PEMCertChainLib.sol"; +import "./V3Struct.sol"; /// @title V3Parser /// @custom:security-contact security@taiko.xyz diff --git a/packages/protocol/contracts/layer1/based/LibBonds.sol b/packages/protocol/contracts/layer1/based/LibBonds.sol index e80da12b8e9..f8b321ce442 100644 --- a/packages/protocol/contracts/layer1/based/LibBonds.sol +++ b/packages/protocol/contracts/layer1/based/LibBonds.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "../../shared/common/IAddressResolver.sol"; -import "../../shared/common/LibStrings.sol"; +import "src/shared/common/IAddressResolver.sol"; +import "src/shared/common/LibStrings.sol"; import "./TaikoData.sol"; /// @title LibBonds diff --git a/packages/protocol/contracts/layer1/based/LibProposing.sol b/packages/protocol/contracts/layer1/based/LibProposing.sol index dab7077aba4..b564ac34261 100644 --- a/packages/protocol/contracts/layer1/based/LibProposing.sol +++ b/packages/protocol/contracts/layer1/based/LibProposing.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../shared/common/LibAddress.sol"; -import "../../shared/common/LibNetwork.sol"; +import "src/shared/common/LibAddress.sol"; +import "src/shared/common/LibNetwork.sol"; import "./LibBonds.sol"; import "./LibData.sol"; import "./LibUtils.sol"; diff --git a/packages/protocol/contracts/layer1/based/LibUtils.sol b/packages/protocol/contracts/layer1/based/LibUtils.sol index 81f917f4caa..6f132186381 100644 --- a/packages/protocol/contracts/layer1/based/LibUtils.sol +++ b/packages/protocol/contracts/layer1/based/LibUtils.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "../../shared/common/IAddressResolver.sol"; -import "../../shared/common/LibStrings.sol"; -import "../../shared/common/LibMath.sol"; +import "src/shared/common/IAddressResolver.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/shared/common/LibMath.sol"; import "../tiers/ITierProvider.sol"; import "../tiers/ITierRouter.sol"; import "./TaikoData.sol"; diff --git a/packages/protocol/contracts/layer1/based/LibVerifying.sol b/packages/protocol/contracts/layer1/based/LibVerifying.sol index 0c744c249d1..0957acb859f 100644 --- a/packages/protocol/contracts/layer1/based/LibVerifying.sol +++ b/packages/protocol/contracts/layer1/based/LibVerifying.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../shared/signal/ISignalService.sol"; +import "src/shared/signal/ISignalService.sol"; import "./LibBonds.sol"; import "./LibUtils.sol"; diff --git a/packages/protocol/contracts/layer1/based/TaikoData.sol b/packages/protocol/contracts/layer1/based/TaikoData.sol index 895a8d841cf..e0ed8918ed0 100644 --- a/packages/protocol/contracts/layer1/based/TaikoData.sol +++ b/packages/protocol/contracts/layer1/based/TaikoData.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../shared/data/LibSharedData.sol"; +import "src/shared/data/LibSharedData.sol"; /// @title TaikoData /// @notice This library defines various data structures used in the Taiko diff --git a/packages/protocol/contracts/layer1/based/TaikoL1.sol b/packages/protocol/contracts/layer1/based/TaikoL1.sol index a12e8b19e6a..225a698ca6c 100644 --- a/packages/protocol/contracts/layer1/based/TaikoL1.sol +++ b/packages/protocol/contracts/layer1/based/TaikoL1.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../shared/common/EssentialContract.sol"; +import "src/shared/common/EssentialContract.sol"; import "./LibData.sol"; import "./LibProposing.sol"; import "./LibProving.sol"; diff --git a/packages/protocol/contracts/layer1/hekla/HeklaTaikoToken.sol b/packages/protocol/contracts/layer1/hekla/HeklaTaikoToken.sol index 0b175f2d493..b7eb6590bb7 100644 --- a/packages/protocol/contracts/layer1/hekla/HeklaTaikoToken.sol +++ b/packages/protocol/contracts/layer1/hekla/HeklaTaikoToken.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; -import "../../shared/common/EssentialContract.sol"; +import "src/shared/common/EssentialContract.sol"; /// @title HeklaTaikoToken /// @notice Taiko token for Taiko Hekla testnet. diff --git a/packages/protocol/contracts/layer1/mainnet/addrcache/RollupAddressCache.sol b/packages/protocol/contracts/layer1/mainnet/addrcache/RollupAddressCache.sol index ad0a567f6e6..4936556e01f 100644 --- a/packages/protocol/contracts/layer1/mainnet/addrcache/RollupAddressCache.sol +++ b/packages/protocol/contracts/layer1/mainnet/addrcache/RollupAddressCache.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/LibStrings.sol"; -import "../../../shared/common/LibNetwork.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/shared/common/LibNetwork.sol"; import "./AddressCache.sol"; /// @title RollupAddressCache diff --git a/packages/protocol/contracts/layer1/mainnet/addrcache/SharedAddressCache.sol b/packages/protocol/contracts/layer1/mainnet/addrcache/SharedAddressCache.sol index 57dd9f6e4b8..ee2e6b68676 100644 --- a/packages/protocol/contracts/layer1/mainnet/addrcache/SharedAddressCache.sol +++ b/packages/protocol/contracts/layer1/mainnet/addrcache/SharedAddressCache.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/LibStrings.sol"; -import "../../../shared/common/LibNetwork.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/shared/common/LibNetwork.sol"; import "./AddressCache.sol"; /// @title SharedAddressCache diff --git a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetBridge.sol b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetBridge.sol index f737e2903c8..bc7877c5660 100644 --- a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetBridge.sol +++ b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetBridge.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/bridge/Bridge.sol"; +import "src/shared/bridge/Bridge.sol"; import "../addrcache/SharedAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC1155Vault.sol b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC1155Vault.sol index 2fe0eec1e7b..e44b1efb69c 100644 --- a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC1155Vault.sol +++ b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC1155Vault.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/tokenvault/ERC1155Vault.sol"; +import "src/shared/tokenvault/ERC1155Vault.sol"; import "../addrcache/SharedAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC20Vault.sol b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC20Vault.sol index e9688517710..605b40932b5 100644 --- a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC20Vault.sol +++ b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC20Vault.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/tokenvault/ERC20Vault.sol"; +import "src/shared/tokenvault/ERC20Vault.sol"; import "../addrcache/SharedAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC721Vault.sol b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC721Vault.sol index 416bc813194..f4ab9bec3a3 100644 --- a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC721Vault.sol +++ b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetERC721Vault.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/tokenvault/ERC721Vault.sol"; +import "src/shared/tokenvault/ERC721Vault.sol"; import "../addrcache/SharedAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSharedAddressManager.sol b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSharedAddressManager.sol index a0d26ff9d83..9a2c3cfa3f8 100644 --- a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSharedAddressManager.sol +++ b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSharedAddressManager.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/AddressManager.sol"; -import "../../../shared/common/LibStrings.sol"; +import "src/shared/common/AddressManager.sol"; +import "src/shared/common/LibStrings.sol"; import "../addrcache/SharedAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSignalService.sol b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSignalService.sol index 2d10595702b..b5958753f14 100644 --- a/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSignalService.sol +++ b/packages/protocol/contracts/layer1/mainnet/multirollup/MainnetSignalService.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/signal/SignalService.sol"; +import "src/shared/signal/SignalService.sol"; import "../addrcache/SharedAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetGuardianProver.sol b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetGuardianProver.sol index 0fa50684a8c..baf50487d03 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetGuardianProver.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetGuardianProver.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../layer1/provers/GuardianProver.sol"; +import "src/layer1/provers/GuardianProver.sol"; import "../addrcache/RollupAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; /// @title MainnetGuardianProver diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetProverSet.sol b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetProverSet.sol index b6c06184c02..27c0de89bf2 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetProverSet.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetProverSet.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../provers/ProverSet.sol"; +import "src/layer1/provers/ProverSet.sol"; import "../addrcache/RollupAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetRollupAddressManager.sol b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetRollupAddressManager.sol index 1a09738d144..74728ba20a5 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetRollupAddressManager.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetRollupAddressManager.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/AddressManager.sol"; -import "../../../shared/common/LibStrings.sol"; +import "src/shared/common/AddressManager.sol"; +import "src/shared/common/LibStrings.sol"; import "../addrcache/RollupAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTaikoL1.sol b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTaikoL1.sol index b321592fffc..1ca0b14089a 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTaikoL1.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTaikoL1.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../based/TaikoL1.sol"; +import "src/layer1/based/TaikoL1.sol"; import "../addrcache/RollupAddressCache.sol"; import "../reentrylock/LibFasterReentryLock.sol"; diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTierRouter.sol b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTierRouter.sol index f5ec759520b..2c9a8966106 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTierRouter.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/MainnetTierRouter.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../tiers/ITierRouter.sol"; +import "src/layer1/tiers/ITierRouter.sol"; /// @title MainnetTierRouter /// @dev Labeled in AddressResolver as "tier_router" diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol index 480e6912140..538831547d3 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../verifiers/Risc0Verifier.sol"; -import "../../addrcache/RollupAddressCache.sol"; -import "../../reentrylock/LibFasterReentryLock.sol"; +import "src/layer1/verifiers/Risc0Verifier.sol"; +import "src/layer1/mainnet/addrcache/RollupAddressCache.sol"; +import "src/layer1/mainnet/reentrylock/LibFasterReentryLock.sol"; /// @title MainnetRisc0Verifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSP1Verifier.sol b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSP1Verifier.sol index e9cc9230a1b..2954d8dc3b7 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSP1Verifier.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSP1Verifier.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../verifiers/SP1Verifier.sol"; -import "../../addrcache/RollupAddressCache.sol"; -import "../../reentrylock/LibFasterReentryLock.sol"; +import "src/layer1/verifiers/SP1Verifier.sol"; +import "src/layer1/mainnet/addrcache/RollupAddressCache.sol"; +import "src/layer1/mainnet/reentrylock/LibFasterReentryLock.sol"; /// @title MainnetSP1Verifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol index c4583e58c96..4d57e8a596e 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../verifiers/SgxVerifier.sol"; -import "../../addrcache/RollupAddressCache.sol"; -import "../../reentrylock/LibFasterReentryLock.sol"; +import "src/layer1/verifiers/SgxVerifier.sol"; +import "src/layer1/mainnet/addrcache/RollupAddressCache.sol"; +import "src/layer1/mainnet/reentrylock/LibFasterReentryLock.sol"; /// @title MainnetSgxVerifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol index 28599c0a5d3..48e69932402 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../verifiers/compose/TeeAnyVerifier.sol"; -import "../../addrcache/RollupAddressCache.sol"; -import "../../reentrylock/LibFasterReentryLock.sol"; +import "src/layer1/verifiers/compose/TeeAnyVerifier.sol"; +import "src/layer1/mainnet/addrcache/RollupAddressCache.sol"; +import "src/layer1/mainnet/reentrylock/LibFasterReentryLock.sol"; /// @title MainnetTeeAnyVerifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAndTeeVerifier.sol b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAndTeeVerifier.sol index 67e58d8af1e..609789ba250 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAndTeeVerifier.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAndTeeVerifier.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../verifiers/compose/ZkAndTeeVerifier.sol"; -import "../../addrcache/RollupAddressCache.sol"; -import "../../reentrylock/LibFasterReentryLock.sol"; +import "src/layer1/verifiers/compose/ZkAndTeeVerifier.sol"; +import "src/layer1/mainnet/addrcache/RollupAddressCache.sol"; +import "src/layer1/mainnet/reentrylock/LibFasterReentryLock.sol"; /// @title MainnetZkAndTeeVerifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko diff --git a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol index 8ac59cd0378..bbb107268d8 100644 --- a/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol +++ b/packages/protocol/contracts/layer1/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../verifiers/compose/ZkAnyVerifier.sol"; -import "../../addrcache/RollupAddressCache.sol"; -import "../../reentrylock/LibFasterReentryLock.sol"; +import "src/layer1/verifiers/compose/ZkAnyVerifier.sol"; +import "src/layer1/mainnet/addrcache/RollupAddressCache.sol"; +import "src/layer1/mainnet/reentrylock/LibFasterReentryLock.sol"; /// @title MainnetZkAnyVerifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko diff --git a/packages/protocol/contracts/layer1/provers/GuardianProver.sol b/packages/protocol/contracts/layer1/provers/GuardianProver.sol index aa21dd9b294..53bd8960709 100644 --- a/packages/protocol/contracts/layer1/provers/GuardianProver.sol +++ b/packages/protocol/contracts/layer1/provers/GuardianProver.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "../../shared/common/EssentialContract.sol"; -import "../../shared/common/LibStrings.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; import "../verifiers/IVerifier.sol"; import "../based/ITaikoL1.sol"; diff --git a/packages/protocol/contracts/layer1/provers/ProverSet.sol b/packages/protocol/contracts/layer1/provers/ProverSet.sol index dd6e4ea06c1..c0b4d66dec9 100644 --- a/packages/protocol/contracts/layer1/provers/ProverSet.sol +++ b/packages/protocol/contracts/layer1/provers/ProverSet.sol @@ -5,9 +5,9 @@ import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpg import "@openzeppelin/contracts/interfaces/IERC1271.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "../../shared/common/EssentialContract.sol"; -import "../../shared/common/LibStrings.sol"; -import "../../shared/common/LibAddress.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/shared/common/LibAddress.sol"; import "../based/ITaikoL1.sol"; interface IHasRecipient { diff --git a/packages/protocol/contracts/layer1/team/airdrop/MerkleClaimable.sol b/packages/protocol/contracts/layer1/team/airdrop/MerkleClaimable.sol index f3c945446aa..38eba9238f2 100644 --- a/packages/protocol/contracts/layer1/team/airdrop/MerkleClaimable.sol +++ b/packages/protocol/contracts/layer1/team/airdrop/MerkleClaimable.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; -import "../../../shared/common/EssentialContract.sol"; +import "src/shared/common/EssentialContract.sol"; /// @title MerkleClaimable /// @notice Contract for managing Taiko token airdrop for eligible users diff --git a/packages/protocol/contracts/layer1/team/tokenunlock/TokenUnlock.sol b/packages/protocol/contracts/layer1/team/tokenunlock/TokenUnlock.sol index a951d647c1c..7dce22a5b95 100644 --- a/packages/protocol/contracts/layer1/team/tokenunlock/TokenUnlock.sol +++ b/packages/protocol/contracts/layer1/team/tokenunlock/TokenUnlock.sol @@ -6,9 +6,9 @@ import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; -import "../../../shared/common/EssentialContract.sol"; -import "../../../shared/common/LibStrings.sol"; -import "../../../shared/common/LibMath.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/shared/common/LibMath.sol"; import "../../provers/ProverSet.sol"; /// @title TokenUnlock diff --git a/packages/protocol/contracts/layer1/tiers/TierProviderBase.sol b/packages/protocol/contracts/layer1/tiers/TierProviderBase.sol index c6d4f6baa32..9f781db3d49 100644 --- a/packages/protocol/contracts/layer1/tiers/TierProviderBase.sol +++ b/packages/protocol/contracts/layer1/tiers/TierProviderBase.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../shared/common/LibStrings.sol"; +import "src/shared/common/LibStrings.sol"; import "./ITierProvider.sol"; import "./LibTiers.sol"; diff --git a/packages/protocol/contracts/layer1/token/TaikoToken.sol b/packages/protocol/contracts/layer1/token/TaikoToken.sol index 3804f7714d5..94a126138f2 100644 --- a/packages/protocol/contracts/layer1/token/TaikoToken.sol +++ b/packages/protocol/contracts/layer1/token/TaikoToken.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../shared/token/TaikoTokenBase.sol"; +import "src/shared/token/TaikoTokenBase.sol"; /// @title TaikoToken /// @notice The TaikoToken (TKO), in the protocol is used for prover collateral diff --git a/packages/protocol/contracts/layer1/verifiers/Risc0Verifier.sol b/packages/protocol/contracts/layer1/verifiers/Risc0Verifier.sol index b157b6afc6e..68a93df3ecd 100644 --- a/packages/protocol/contracts/layer1/verifiers/Risc0Verifier.sol +++ b/packages/protocol/contracts/layer1/verifiers/Risc0Verifier.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.24; import "@risc0/contracts/IRiscZeroVerifier.sol"; -import "../../shared/common/EssentialContract.sol"; -import "../../shared/common/LibStrings.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; import "../based/ITaikoL1.sol"; import "./LibPublicInput.sol"; import "./IVerifier.sol"; diff --git a/packages/protocol/contracts/layer1/verifiers/SP1Verifier.sol b/packages/protocol/contracts/layer1/verifiers/SP1Verifier.sol index 185f4a9523e..cd3e62af336 100644 --- a/packages/protocol/contracts/layer1/verifiers/SP1Verifier.sol +++ b/packages/protocol/contracts/layer1/verifiers/SP1Verifier.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.24; import "@sp1-contracts/src/ISP1Verifier.sol"; -import "../../shared/common/EssentialContract.sol"; -import "../../shared/common/LibStrings.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; import "../based/ITaikoL1.sol"; import "./LibPublicInput.sol"; import "./IVerifier.sol"; diff --git a/packages/protocol/contracts/layer1/verifiers/SgxVerifier.sol b/packages/protocol/contracts/layer1/verifiers/SgxVerifier.sol index d903abf9757..4583f79cc99 100644 --- a/packages/protocol/contracts/layer1/verifiers/SgxVerifier.sol +++ b/packages/protocol/contracts/layer1/verifiers/SgxVerifier.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; -import "../../shared/common/EssentialContract.sol"; -import "../../shared/common/LibStrings.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; import "../automata-attestation/interfaces/IAttestation.sol"; import "../automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; import "../based/ITaikoL1.sol"; diff --git a/packages/protocol/contracts/layer1/verifiers/compose/ComposeVerifier.sol b/packages/protocol/contracts/layer1/verifiers/compose/ComposeVerifier.sol index d9d59786a50..71fe03d6acc 100644 --- a/packages/protocol/contracts/layer1/verifiers/compose/ComposeVerifier.sol +++ b/packages/protocol/contracts/layer1/verifiers/compose/ComposeVerifier.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/EssentialContract.sol"; -import "../../../shared/common/LibStrings.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; import "../IVerifier.sol"; /// @title ComposeVerifier diff --git a/packages/protocol/contracts/layer1/verifiers/compose/TeeAnyVerifier.sol b/packages/protocol/contracts/layer1/verifiers/compose/TeeAnyVerifier.sol index 97eaac7e29a..5b22fa94c2e 100644 --- a/packages/protocol/contracts/layer1/verifiers/compose/TeeAnyVerifier.sol +++ b/packages/protocol/contracts/layer1/verifiers/compose/TeeAnyVerifier.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/LibStrings.sol"; +import "src/shared/common/LibStrings.sol"; import "./ComposeVerifier.sol"; /// @title TeeAnyVerifier diff --git a/packages/protocol/contracts/layer1/verifiers/compose/ZkAndTeeVerifier.sol b/packages/protocol/contracts/layer1/verifiers/compose/ZkAndTeeVerifier.sol index 51a22785e3c..58293f60c06 100644 --- a/packages/protocol/contracts/layer1/verifiers/compose/ZkAndTeeVerifier.sol +++ b/packages/protocol/contracts/layer1/verifiers/compose/ZkAndTeeVerifier.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/LibStrings.sol"; +import "src/shared/common/LibStrings.sol"; import "./ComposeVerifier.sol"; /// @title ZkAndTeeVerifier diff --git a/packages/protocol/contracts/layer1/verifiers/compose/ZkAnyVerifier.sol b/packages/protocol/contracts/layer1/verifiers/compose/ZkAnyVerifier.sol index 261e4d2c2e0..2dd0e5f6a04 100644 --- a/packages/protocol/contracts/layer1/verifiers/compose/ZkAnyVerifier.sol +++ b/packages/protocol/contracts/layer1/verifiers/compose/ZkAnyVerifier.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/common/LibStrings.sol"; +import "src/shared/common/LibStrings.sol"; import "./ComposeVerifier.sol"; /// @title ZkAnyVerifier diff --git a/packages/protocol/contracts/layer2/based/Lib1559Math.sol b/packages/protocol/contracts/layer2/based/Lib1559Math.sol index c0e0116b1e2..44f91ff2484 100644 --- a/packages/protocol/contracts/layer2/based/Lib1559Math.sol +++ b/packages/protocol/contracts/layer2/based/Lib1559Math.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.24; import "@solady/src/utils/FixedPointMathLib.sol"; -import "../../shared/common/LibMath.sol"; +import "src/shared/common/LibMath.sol"; /// @title Lib1559Math /// @notice Implements e^(x) based bonding curve for EIP-1559 diff --git a/packages/protocol/contracts/layer2/based/TaikoL2.sol b/packages/protocol/contracts/layer2/based/TaikoL2.sol index 8740b50a1b5..ff7ba2c657d 100644 --- a/packages/protocol/contracts/layer2/based/TaikoL2.sol +++ b/packages/protocol/contracts/layer2/based/TaikoL2.sol @@ -4,11 +4,11 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "../../shared/data/LibSharedData.sol"; -import "../../shared/common/EssentialContract.sol"; -import "../../shared/common/LibStrings.sol"; -import "../../shared/common/LibAddress.sol"; -import "../../shared/signal/ISignalService.sol"; +import "src/shared/data/LibSharedData.sol"; +import "src/shared/common/EssentialContract.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/shared/common/LibAddress.sol"; +import "src/shared/signal/ISignalService.sol"; import "./Lib1559Math.sol"; import "./LibL2Config.sol"; import "./IBlockHash.sol"; diff --git a/packages/protocol/contracts/layer2/token/BridgedTaikoToken.sol b/packages/protocol/contracts/layer2/token/BridgedTaikoToken.sol index e900bbdb151..0fa1d8a7d23 100644 --- a/packages/protocol/contracts/layer2/token/BridgedTaikoToken.sol +++ b/packages/protocol/contracts/layer2/token/BridgedTaikoToken.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../shared/tokenvault/IBridgedERC20.sol"; -import "../../shared/token/TaikoTokenBase.sol"; +import "src/shared/tokenvault/IBridgedERC20.sol"; +import "src/shared/token/TaikoTokenBase.sol"; /// @title BridgedTaikoToken /// @notice The TaikoToken on L2 to support checkpoints and voting. For testnets, we do not need to diff --git a/packages/protocol/foundry.toml b/packages/protocol/foundry.toml index 144650ef190..7012fe4b58d 100644 --- a/packages/protocol/foundry.toml +++ b/packages/protocol/foundry.toml @@ -19,6 +19,9 @@ remappings = [ "forge-std/=node_modules/forge-std/", "ds-test/=node_modules/ds-test/src/", "@p256-verifier/contracts/=node_modules/p256-verifier/src/", + "src/=contracts/", + "test/=test/", + "script/=script/" ] # Do not change the block_gas_limit value, TaikoL2.t.sol depends on it. diff --git a/packages/protocol/script/layer1/AddSGXVerifierInstances.s.sol b/packages/protocol/script/layer1/AddSGXVerifierInstances.s.sol index 92800f94f64..13179a4cbd8 100644 --- a/packages/protocol/script/layer1/AddSGXVerifierInstances.s.sol +++ b/packages/protocol/script/layer1/AddSGXVerifierInstances.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer1/verifiers/SgxVerifier.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer1/verifiers/SgxVerifier.sol"; contract AddSGXVerifierInstances is DeployCapability { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/layer1/DeployERC20Airdrop.s.sol b/packages/protocol/script/layer1/DeployERC20Airdrop.s.sol index 939fdfffa38..c726ca9b0dd 100644 --- a/packages/protocol/script/layer1/DeployERC20Airdrop.s.sol +++ b/packages/protocol/script/layer1/DeployERC20Airdrop.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer1/team/airdrop/ERC20Airdrop.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer1/team/airdrop/ERC20Airdrop.sol"; // @KorbinianK , @2manslkh // As written also in the tests the workflow shall be the following (checklist): diff --git a/packages/protocol/script/layer1/DeployLabsProverPool.s.sol b/packages/protocol/script/layer1/DeployLabsProverPool.s.sol index 887bd135b43..a109d51c68d 100644 --- a/packages/protocol/script/layer1/DeployLabsProverPool.s.sol +++ b/packages/protocol/script/layer1/DeployLabsProverPool.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer1/provers/ProverSet.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer1/provers/ProverSet.sol"; contract DeployLabsProverPool is DeployCapability { address public addressManager = 0x579f40D0BE111b823962043702cabe6Aaa290780; diff --git a/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol b/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol index bc67bd99689..c50953405e8 100644 --- a/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol +++ b/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol @@ -11,33 +11,33 @@ import { SP1Verifier as SP1Verifier200rc } from "@sp1-contracts/src/v2.0.0/SP1Ve // - https://github.com/rdubois-crypto/FreshCryptoLib import "@p256-verifier/contracts/P256Verifier.sol"; -import "../../contracts/shared/common/LibStrings.sol"; -import "../../contracts/shared/tokenvault/BridgedERC1155.sol"; -import "../../contracts/shared/tokenvault/BridgedERC20.sol"; -import "../../contracts/shared/tokenvault/BridgedERC721.sol"; -import "../../contracts/layer1/automata-attestation/AutomataDcapV3Attestation.sol"; -import "../../contracts/layer1/automata-attestation/lib/PEMCertChainLib.sol"; -import "../../contracts/layer1/automata-attestation/utils/SigVerifyLib.sol"; -import "../../contracts/layer1/devnet/DevnetTaikoL1.sol"; -import "../../contracts/layer1/devnet/DevnetTierProvider.sol"; -import "../../contracts/layer1/mainnet/rollup/MainnetGuardianProver.sol"; -import "../../contracts/layer1/mainnet/rollup/MainnetTaikoL1.sol"; -import "../../contracts/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol"; -import "../../contracts/layer1/mainnet/multirollup/MainnetBridge.sol"; -import "../../contracts/layer1/mainnet/multirollup/MainnetERC1155Vault.sol"; -import "../../contracts/layer1/mainnet/multirollup/MainnetERC20Vault.sol"; -import "../../contracts/layer1/mainnet/multirollup/MainnetERC721Vault.sol"; -import "../../contracts/layer1/mainnet/multirollup/MainnetSignalService.sol"; -import "../../contracts/layer1/provers/GuardianProver.sol"; -import "../../contracts/layer1/provers/ProverSet.sol"; -import "../../contracts/layer1/tiers/TierProviderV2.sol"; -import "../../contracts/layer1/token/TaikoToken.sol"; -import "../../contracts/layer1/verifiers/Risc0Verifier.sol"; -import "../../contracts/layer1/verifiers/SP1Verifier.sol"; -import "../../test/layer1/based/TestTierProvider.sol"; -import "../../test/shared/token/FreeMintERC20.sol"; -import "../../test/shared/token/MayFailFreeMintERC20.sol"; -import "../../test/shared/DeployCapability.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/shared/tokenvault/BridgedERC1155.sol"; +import "src/shared/tokenvault/BridgedERC20.sol"; +import "src/shared/tokenvault/BridgedERC721.sol"; +import "src/layer1/automata-attestation/AutomataDcapV3Attestation.sol"; +import "src/layer1/automata-attestation/lib/PEMCertChainLib.sol"; +import "src/layer1/automata-attestation/utils/SigVerifyLib.sol"; +import "src/layer1/devnet/DevnetTaikoL1.sol"; +import "src/layer1/devnet/DevnetTierProvider.sol"; +import "src/layer1/mainnet/rollup/MainnetGuardianProver.sol"; +import "src/layer1/mainnet/rollup/MainnetTaikoL1.sol"; +import "src/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol"; +import "src/layer1/mainnet/multirollup/MainnetBridge.sol"; +import "src/layer1/mainnet/multirollup/MainnetERC1155Vault.sol"; +import "src/layer1/mainnet/multirollup/MainnetERC20Vault.sol"; +import "src/layer1/mainnet/multirollup/MainnetERC721Vault.sol"; +import "src/layer1/mainnet/multirollup/MainnetSignalService.sol"; +import "src/layer1/provers/GuardianProver.sol"; +import "src/layer1/provers/ProverSet.sol"; +import "src/layer1/tiers/TierProviderV2.sol"; +import "src/layer1/token/TaikoToken.sol"; +import "src/layer1/verifiers/Risc0Verifier.sol"; +import "src/layer1/verifiers/SP1Verifier.sol"; +import "test/layer1/based/TestTierProvider.sol"; +import "test/shared/token/FreeMintERC20.sol"; +import "test/shared/token/MayFailFreeMintERC20.sol"; +import "test/shared/DeployCapability.sol"; /// @title DeployProtocolOnL1 /// @notice This script deploys the core Taiko protocol smart contract on L1, diff --git a/packages/protocol/script/layer1/DeployProverSet.s.sol b/packages/protocol/script/layer1/DeployProverSet.s.sol index eb874c2ba70..924b1d5e590 100644 --- a/packages/protocol/script/layer1/DeployProverSet.s.sol +++ b/packages/protocol/script/layer1/DeployProverSet.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../contracts/layer1/provers/ProverSet.sol"; -import "../../test/shared/DeployCapability.sol"; +import "src/layer1/provers/ProverSet.sol"; +import "test/shared/DeployCapability.sol"; contract DeployProverSet is DeployCapability { modifier broadcast() { diff --git a/packages/protocol/script/layer1/DeployQuotaManager.s.sol b/packages/protocol/script/layer1/DeployQuotaManager.s.sol index d3d2f8122ae..77d7d1fefcc 100644 --- a/packages/protocol/script/layer1/DeployQuotaManager.s.sol +++ b/packages/protocol/script/layer1/DeployQuotaManager.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/shared/bridge/QuotaManager.sol"; +import "test/shared/DeployCapability.sol"; +import "src/shared/bridge/QuotaManager.sol"; contract DeployQuotaManager is DeployCapability { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/layer1/DeployRisc0Verifier.s.sol b/packages/protocol/script/layer1/DeployRisc0Verifier.s.sol index 76dc325a720..353a5557f33 100644 --- a/packages/protocol/script/layer1/DeployRisc0Verifier.s.sol +++ b/packages/protocol/script/layer1/DeployRisc0Verifier.s.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.24; import "@risc0/contracts/groth16/RiscZeroGroth16Verifier.sol"; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer1/verifiers/Risc0Verifier.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer1/verifiers/Risc0Verifier.sol"; contract DeployRisc0Verifier is DeployCapability { uint256 public deployerPrivKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/layer1/DeploySP1Verifier.s.sol b/packages/protocol/script/layer1/DeploySP1Verifier.s.sol index 9e56421e6f9..bc504254a34 100644 --- a/packages/protocol/script/layer1/DeploySP1Verifier.s.sol +++ b/packages/protocol/script/layer1/DeploySP1Verifier.s.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.24; import { SP1Verifier as SP1Verifier200rc } from "@sp1-contracts/src/v2.0.0/SP1VerifierPlonk.sol"; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer1/verifiers/SP1Verifier.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer1/verifiers/SP1Verifier.sol"; contract DeploySP1Verifier is DeployCapability { uint256 public deployerPrivKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/layer1/DeployTaikoToken.s.sol b/packages/protocol/script/layer1/DeployTaikoToken.s.sol index fafcebd8cc9..9684aea4870 100644 --- a/packages/protocol/script/layer1/DeployTaikoToken.s.sol +++ b/packages/protocol/script/layer1/DeployTaikoToken.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer1/token/TaikoToken.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer1/token/TaikoToken.sol"; contract DeployTaikoToken is DeployCapability { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/layer1/SendMessageToDelegateOwner.s.sol b/packages/protocol/script/layer1/SendMessageToDelegateOwner.s.sol index f202a1bd864..c5989001fee 100644 --- a/packages/protocol/script/layer1/SendMessageToDelegateOwner.s.sol +++ b/packages/protocol/script/layer1/SendMessageToDelegateOwner.s.sol @@ -2,9 +2,9 @@ pragma solidity ^0.8.24; import "forge-std/src/Script.sol"; -import "../../contracts/shared/bridge/IBridge.sol"; -import "../../contracts/layer2/DelegateOwner.sol"; -import "../../test/shared/thirdparty/Multicall3.sol"; +import "src/shared/bridge/IBridge.sol"; +import "src/layer2/DelegateOwner.sol"; +import "test/shared/thirdparty/Multicall3.sol"; contract SendMessageToDelegateOwner is Script { address public delegateOwner = 0x5995941Df88F30Ac140515AA39832db963E2f863; diff --git a/packages/protocol/script/layer1/SetDcapParams.s.sol b/packages/protocol/script/layer1/SetDcapParams.s.sol index 411c322e522..9a38c703ce0 100644 --- a/packages/protocol/script/layer1/SetDcapParams.s.sol +++ b/packages/protocol/script/layer1/SetDcapParams.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.24; import "forge-std/src/Script.sol"; import "forge-std/src/console2.sol"; -import "../../test/layer1/automata-attestation/common/AttestationBase.t.sol"; +import "test/layer1/automata-attestation/common/AttestationBase.t.sol"; contract SetDcapParams is Script, AttestationBase { uint256 public ownerPrivateKey = vm.envUint("PRIVATE_KEY"); // Owner of the attestation contract diff --git a/packages/protocol/script/layer1/UpgradeHeklaOntakeL1.s.sol b/packages/protocol/script/layer1/UpgradeHeklaOntakeL1.s.sol index 657c2a48c42..4dc0498eeda 100644 --- a/packages/protocol/script/layer1/UpgradeHeklaOntakeL1.s.sol +++ b/packages/protocol/script/layer1/UpgradeHeklaOntakeL1.s.sol @@ -2,12 +2,12 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer1/hekla/HeklaTaikoL1.sol"; -import "../../contracts/shared/bridge/Bridge.sol"; -import "../../contracts/shared/common/AddressManager.sol"; -import "../../contracts/layer1/provers/ProverSet.sol"; -import "../../contracts/layer1/provers/GuardianProver.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer1/hekla/HeklaTaikoL1.sol"; +import "src/shared/bridge/Bridge.sol"; +import "src/shared/common/AddressManager.sol"; +import "src/layer1/provers/ProverSet.sol"; +import "src/layer1/provers/GuardianProver.sol"; contract UpgradeHeklaOntakeL1 is DeployCapability { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/layer1/UpgradeHeklaOntakeL2.s.sol b/packages/protocol/script/layer1/UpgradeHeklaOntakeL2.s.sol index 030bf7d8216..0c665b0fb9f 100644 --- a/packages/protocol/script/layer1/UpgradeHeklaOntakeL2.s.sol +++ b/packages/protocol/script/layer1/UpgradeHeklaOntakeL2.s.sol @@ -2,12 +2,12 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer2/hekla/HeklaTaikoL2.sol"; -import "../../contracts/shared/bridge/Bridge.sol"; -import "../../contracts/shared/common/AddressManager.sol"; -import "../../test/shared/thirdparty/Multicall3.sol"; -import "../../contracts/layer2/DelegateOwner.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer2/hekla/HeklaTaikoL2.sol"; +import "src/shared/bridge/Bridge.sol"; +import "src/shared/common/AddressManager.sol"; +import "test/shared/thirdparty/Multicall3.sol"; +import "src/layer2/DelegateOwner.sol"; contract UpgradeHeklaOntakeL2 is DeployCapability { address public delegateOwner = 0x95F6077C7786a58FA070D98043b16DF2B1593D2b; diff --git a/packages/protocol/script/layer1/tokenunlock/Deploy.s.sol b/packages/protocol/script/layer1/tokenunlock/Deploy.s.sol index 2b13bec09dc..c94fc0fe490 100644 --- a/packages/protocol/script/layer1/tokenunlock/Deploy.s.sol +++ b/packages/protocol/script/layer1/tokenunlock/Deploy.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../test/shared/DeployCapability.sol"; -import "../../../contracts/layer1/team/tokenunlock/TokenUnlock.sol"; +import "src/layer1/team/tokenunlock/TokenUnlock.sol"; +import "test/shared/DeployCapability.sol"; contract DeployTokenUnlock is DeployCapability { using stdJson for string; diff --git a/packages/protocol/script/layer1/tokenunlock/Vest.s.sol b/packages/protocol/script/layer1/tokenunlock/Vest.s.sol index 9b7a7285a01..1f421602d33 100644 --- a/packages/protocol/script/layer1/tokenunlock/Vest.s.sol +++ b/packages/protocol/script/layer1/tokenunlock/Vest.s.sol @@ -5,7 +5,7 @@ import "forge-std/src/Script.sol"; import "forge-std/src/console2.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "../../../contracts/layer1/team/tokenunlock/TokenUnlock.sol"; +import "src/layer1/team/tokenunlock/TokenUnlock.sol"; contract VestTokenUnlock is Script { using stdJson for string; diff --git a/packages/protocol/script/layer2/DeployDelegateOwner.s.sol b/packages/protocol/script/layer2/DeployDelegateOwner.s.sol index ad07e0970b4..79da323364c 100644 --- a/packages/protocol/script/layer2/DeployDelegateOwner.s.sol +++ b/packages/protocol/script/layer2/DeployDelegateOwner.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/layer2/DelegateOwner.sol"; +import "test/shared/DeployCapability.sol"; +import "src/layer2/DelegateOwner.sol"; // forge script --rpc-url https://rpc.mainnet.taiko.xyz script/DeployDelegateOwner.s.sol contract DeployDelegateOwner is DeployCapability { diff --git a/packages/protocol/script/layer2/PostGenesisConfig.s.sol b/packages/protocol/script/layer2/PostGenesisConfig.s.sol index 1c59866f9fd..28254de3ef7 100644 --- a/packages/protocol/script/layer2/PostGenesisConfig.s.sol +++ b/packages/protocol/script/layer2/PostGenesisConfig.s.sol @@ -4,9 +4,9 @@ pragma solidity ^0.8.24; import "forge-std/src/Script.sol"; import "forge-std/src/console2.sol"; -import "../../contracts/shared/tokenvault/ERC20Vault.sol"; -import "../../contracts/shared/bridge/Bridge.sol"; -import "../../contracts/shared/common/AddressManager.sol"; +import "src/shared/tokenvault/ERC20Vault.sol"; +import "src/shared/bridge/Bridge.sol"; +import "src/shared/common/AddressManager.sol"; interface USDCProxy { function configureMinter(address minter, uint256 minterAllowedAmount) external; diff --git a/packages/protocol/script/layer2/PostGenesisQuery.s.sol b/packages/protocol/script/layer2/PostGenesisQuery.s.sol index 7c8882f9edc..906e0961dff 100644 --- a/packages/protocol/script/layer2/PostGenesisQuery.s.sol +++ b/packages/protocol/script/layer2/PostGenesisQuery.s.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/shared/common/AddressManager.sol"; -import "../../contracts/shared/bridge/Bridge.sol"; +import "test/shared/DeployCapability.sol"; +import "src/shared/common/AddressManager.sol"; +import "src/shared/bridge/Bridge.sol"; // Run with: // forge script --rpc-url https://rpc.mainnet.taiko.xyz script/PostGenesisQuery.s.sol diff --git a/packages/protocol/script/shared/AuthorizeTaikoForMultihop.s.sol b/packages/protocol/script/shared/AuthorizeTaikoForMultihop.s.sol index db7b01f4274..ffb76b79516 100644 --- a/packages/protocol/script/shared/AuthorizeTaikoForMultihop.s.sol +++ b/packages/protocol/script/shared/AuthorizeTaikoForMultihop.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; -import "../../contracts/shared/signal/SignalService.sol"; +import "test/shared/DeployCapability.sol"; +import "src/shared/signal/SignalService.sol"; contract AuthorizeTaikoForMultihop is DeployCapability { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/shared/SetAddress.s.sol b/packages/protocol/script/shared/SetAddress.s.sol index 422b061f49f..701fc32d9aa 100644 --- a/packages/protocol/script/shared/SetAddress.s.sol +++ b/packages/protocol/script/shared/SetAddress.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.24; import "forge-std/src/Script.sol"; import "forge-std/src/console2.sol"; -import "../../contracts/shared/common/AddressManager.sol"; +import "src/shared/common/AddressManager.sol"; contract SetAddress is Script { uint256 public adminPrivateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/shared/SetRemoteBridgeSuites.s.sol b/packages/protocol/script/shared/SetRemoteBridgeSuites.s.sol index 5240e503602..91734516a9d 100644 --- a/packages/protocol/script/shared/SetRemoteBridgeSuites.s.sol +++ b/packages/protocol/script/shared/SetRemoteBridgeSuites.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../test/shared/DeployCapability.sol"; +import "test/shared/DeployCapability.sol"; contract SetRemoteBridgeSuites is DeployCapability { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/test/genesis/GenerateGenesis.g.sol b/packages/protocol/test/genesis/GenerateGenesis.g.sol index 4140409b79d..78da0cd79fc 100644 --- a/packages/protocol/test/genesis/GenerateGenesis.g.sol +++ b/packages/protocol/test/genesis/GenerateGenesis.g.sol @@ -4,13 +4,13 @@ pragma solidity ^0.8.24; import "forge-std/src/console2.sol"; import "forge-std/src/StdJson.sol"; import "forge-std/src/Test.sol"; -import "../../contracts/shared/common/AddressManager.sol"; -import "../../contracts/shared/bridge/Bridge.sol"; -import "../../contracts/shared/tokenvault/ERC1155Vault.sol"; -import "../../contracts/shared/tokenvault/ERC20Vault.sol"; -import "../../contracts/shared/tokenvault/ERC721Vault.sol"; -import "../../contracts/shared/signal/SignalService.sol"; -import "../../contracts/layer2/based/TaikoL2.sol"; +import "src/shared/common/AddressManager.sol"; +import "src/shared/bridge/Bridge.sol"; +import "src/shared/tokenvault/ERC1155Vault.sol"; +import "src/shared/tokenvault/ERC20Vault.sol"; +import "src/shared/tokenvault/ERC721Vault.sol"; +import "src/shared/signal/SignalService.sol"; +import "src/layer2/based/TaikoL2.sol"; import "../shared/token/RegularERC20.sol"; contract TestGenerateGenesis is Test, AddressResolver { diff --git a/packages/protocol/test/layer1/TaikoL1Test.sol b/packages/protocol/test/layer1/TaikoL1Test.sol index d83f508cf0e..5f660fee478 100644 --- a/packages/protocol/test/layer1/TaikoL1Test.sol +++ b/packages/protocol/test/layer1/TaikoL1Test.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../contracts/layer1/based/TaikoL1.sol"; -import "../../contracts/layer1/token/TaikoToken.sol"; -import "../../contracts/layer1/verifiers/SgxVerifier.sol"; -import "../../contracts/layer1/verifiers/SP1Verifier.sol"; -import "../../contracts/layer1/verifiers/Risc0Verifier.sol"; -import "../../contracts/layer1/provers/GuardianProver.sol"; -import "../../contracts/layer1/team/airdrop/ERC20Airdrop.sol"; -import "../../contracts/shared/bridge/QuotaManager.sol"; +import "src/layer1/based/TaikoL1.sol"; +import "src/layer1/token/TaikoToken.sol"; +import "src/layer1/verifiers/SgxVerifier.sol"; +import "src/layer1/verifiers/SP1Verifier.sol"; +import "src/layer1/verifiers/Risc0Verifier.sol"; +import "src/layer1/provers/GuardianProver.sol"; +import "src/layer1/team/airdrop/ERC20Airdrop.sol"; +import "src/shared/bridge/QuotaManager.sol"; import "../layer1/based/TestTierProvider.sol"; import "../shared/TaikoTest.sol"; diff --git a/packages/protocol/test/layer1/automata-attestation/common/AttestationBase.t.sol b/packages/protocol/test/layer1/automata-attestation/common/AttestationBase.t.sol index f517f7bb06a..cd641b3c919 100644 --- a/packages/protocol/test/layer1/automata-attestation/common/AttestationBase.t.sol +++ b/packages/protocol/test/layer1/automata-attestation/common/AttestationBase.t.sol @@ -9,16 +9,13 @@ import "@optimism/packages/contracts-bedrock/src/libraries/Bytes.sol"; import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import { P256Verifier } from "@p256-verifier/contracts/P256Verifier.sol"; -import "../../../../contracts/layer1/verifiers/SgxVerifier.sol"; +import "src/layer1/verifiers/SgxVerifier.sol"; import { AutomataDcapV3Attestation } from - "../../../../contracts/layer1/automata-attestation/AutomataDcapV3Attestation.sol"; -import { SigVerifyLib } from - "../../../../contracts/layer1/automata-attestation/utils/SigVerifyLib.sol"; -import { PEMCertChainLib } from - "../../../../contracts/layer1/automata-attestation/lib/PEMCertChainLib.sol"; -import { V3Struct } from - "../../../../contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; -import { BytesUtils } from "../../../../contracts/layer1/automata-attestation/utils/BytesUtils.sol"; + "src/layer1/automata-attestation/AutomataDcapV3Attestation.sol"; +import { SigVerifyLib } from "src/layer1/automata-attestation/utils/SigVerifyLib.sol"; +import { PEMCertChainLib } from "src/layer1/automata-attestation/lib/PEMCertChainLib.sol"; +import { V3Struct } from "src/layer1/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; +import { BytesUtils } from "src/layer1/automata-attestation/utils/BytesUtils.sol"; import { Base64 } from "solady/src/utils/Base64.sol"; import "../utils/DcapTestUtils.t.sol"; import "../utils/V3QuoteParseUtils.t.sol"; diff --git a/packages/protocol/test/layer1/automata-attestation/utils/DcapTestUtils.t.sol b/packages/protocol/test/layer1/automata-attestation/utils/DcapTestUtils.t.sol index 7ffcf221617..c4afdd57283 100644 --- a/packages/protocol/test/layer1/automata-attestation/utils/DcapTestUtils.t.sol +++ b/packages/protocol/test/layer1/automata-attestation/utils/DcapTestUtils.t.sol @@ -1,12 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { TCBInfoStruct } from - "../../../../contracts/layer1/automata-attestation/lib/TCBInfoStruct.sol"; -import { EnclaveIdStruct } from - "../../../../contracts/layer1/automata-attestation/lib/EnclaveIdStruct.sol"; -import { V3Struct } from - "../../../../contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; +import { TCBInfoStruct } from "src/layer1/automata-attestation/lib/TCBInfoStruct.sol"; +import { EnclaveIdStruct } from "src/layer1/automata-attestation/lib/EnclaveIdStruct.sol"; +import { V3Struct } from "src/layer1/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; import { JSONParserLib } from "solady/src/utils/JSONParserLib.sol"; import { LibString } from "solady/src/utils/LibString.sol"; diff --git a/packages/protocol/test/layer1/automata-attestation/utils/V3QuoteParseUtils.t.sol b/packages/protocol/test/layer1/automata-attestation/utils/V3QuoteParseUtils.t.sol index f27862eef7b..ed09df809c6 100644 --- a/packages/protocol/test/layer1/automata-attestation/utils/V3QuoteParseUtils.t.sol +++ b/packages/protocol/test/layer1/automata-attestation/utils/V3QuoteParseUtils.t.sol @@ -1,14 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { V3Struct } from - "../../../../contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; -import { V3Parser } from - "../../../../contracts/layer1/automata-attestation/lib/QuoteV3Auth/V3Parser.sol"; +import { V3Struct } from "src/layer1/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; +import { V3Parser } from "src/layer1/automata-attestation/lib/QuoteV3Auth/V3Parser.sol"; import { IPEMCertChainLib } from - "../../../../contracts/layer1/automata-attestation/lib/interfaces/IPEMCertChainLib.sol"; -import { PEMCertChainLib } from - "../../../../contracts/layer1/automata-attestation/lib/PEMCertChainLib.sol"; + "src/layer1/automata-attestation/lib/interfaces/IPEMCertChainLib.sol"; +import { PEMCertChainLib } from "src/layer1/automata-attestation/lib/PEMCertChainLib.sol"; import { Base64 } from "solady/src/utils/Base64.sol"; import { JSONParserLib } from "solady/src/utils/JSONParserLib.sol"; import { LibString } from "solady/src/utils/LibString.sol"; diff --git a/packages/protocol/test/layer1/based/GuardianProver1.t.sol b/packages/protocol/test/layer1/based/GuardianProver1.t.sol index 3f8a7705e22..0400cafd3eb 100644 --- a/packages/protocol/test/layer1/based/GuardianProver1.t.sol +++ b/packages/protocol/test/layer1/based/GuardianProver1.t.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../contracts/layer1/provers/GuardianProver.sol"; -import "../../shared/TaikoTest.sol"; +import "src/layer1/provers/GuardianProver.sol"; +import "test/shared/TaikoTest.sol"; contract DummyGuardianProver is GuardianProver { uint256 public operationId; diff --git a/packages/protocol/test/layer1/based/GuardianProver2.t.sol b/packages/protocol/test/layer1/based/GuardianProver2.t.sol index 3fe8ee23cd3..2cc6df5a115 100644 --- a/packages/protocol/test/layer1/based/GuardianProver2.t.sol +++ b/packages/protocol/test/layer1/based/GuardianProver2.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../contracts/layer1/provers/GuardianProver.sol"; +import "src/layer1/provers/GuardianProver.sol"; import "./TaikoL1TestBase.sol"; /// @author Kirk Baird diff --git a/packages/protocol/test/layer1/based/TestTierProvider.sol b/packages/protocol/test/layer1/based/TestTierProvider.sol index 4832486357e..09beb43d033 100644 --- a/packages/protocol/test/layer1/based/TestTierProvider.sol +++ b/packages/protocol/test/layer1/based/TestTierProvider.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../contracts/shared/common/LibStrings.sol"; -import "../../../contracts/layer1/tiers/ITierProvider.sol"; -import "../../../contracts/layer1/tiers/LibTiers.sol"; -import "../../../contracts/layer1/tiers/ITierRouter.sol"; +import "src/shared/common/LibStrings.sol"; +import "src/layer1/tiers/ITierProvider.sol"; +import "src/layer1/tiers/LibTiers.sol"; +import "src/layer1/tiers/ITierRouter.sol"; /// @title TestTierProvider /// @dev Labeled in AddressResolver as "tier_router" diff --git a/packages/protocol/test/layer1/team/tokenunlock/TokenUnlock.t.sol b/packages/protocol/test/layer1/team/tokenunlock/TokenUnlock.t.sol index d0d22b9a1e0..be96bb0a957 100644 --- a/packages/protocol/test/layer1/team/tokenunlock/TokenUnlock.t.sol +++ b/packages/protocol/test/layer1/team/tokenunlock/TokenUnlock.t.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; -import "../../../shared/TaikoTest.sol"; -import "../../../../contracts/layer1/team/tokenunlock/TokenUnlock.sol"; +import "src/layer1/team/tokenunlock/TokenUnlock.sol"; +import "test/shared/TaikoTest.sol"; contract MyERC20 is ERC20, ERC20Votes { constructor(address owner) ERC20("Taiko Token", "TKO") ERC20Permit("Taiko Token") { diff --git a/packages/protocol/test/layer1/verifiers/compose/ComposeVerifeir.t.sol b/packages/protocol/test/layer1/verifiers/compose/ComposeVerifeir.t.sol index d6e6ff554ba..6a738475495 100644 --- a/packages/protocol/test/layer1/verifiers/compose/ComposeVerifeir.t.sol +++ b/packages/protocol/test/layer1/verifiers/compose/ComposeVerifeir.t.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../shared/TaikoTest.sol"; -import "../../../../contracts/layer1/verifiers/compose/ComposeVerifier.sol"; +import "src/layer1/verifiers/compose/ComposeVerifier.sol"; +import "test/shared/TaikoTest.sol"; contract ComposeVerifierForTest is ComposeVerifier { uint256 private threshold; diff --git a/packages/protocol/test/layer2/TaikoL2EIP1559Configurable.sol b/packages/protocol/test/layer2/TaikoL2EIP1559Configurable.sol index 85c3c8450cd..3e6ce9fb20a 100644 --- a/packages/protocol/test/layer2/TaikoL2EIP1559Configurable.sol +++ b/packages/protocol/test/layer2/TaikoL2EIP1559Configurable.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../contracts/layer2/based/TaikoL2.sol"; +import "src/layer2/based/TaikoL2.sol"; /// @title TaikoL2EIP1559Configurable /// @notice TaikoL2 with a setter to change EIP-1559 configurations and states. diff --git a/packages/protocol/test/layer2/TaikoL2Test.sol b/packages/protocol/test/layer2/TaikoL2Test.sol index ad9eeb0e61a..21602e5f721 100644 --- a/packages/protocol/test/layer2/TaikoL2Test.sol +++ b/packages/protocol/test/layer2/TaikoL2Test.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../contracts/layer2/DelegateOwner.sol"; +import "src/layer2/DelegateOwner.sol"; import "../layer2/TaikoL2EIP1559Configurable.sol"; import "../layer2/LibL2Signer.sol"; import "../shared/TaikoTest.sol"; diff --git a/packages/protocol/test/shared/DeployCapability.sol b/packages/protocol/test/shared/DeployCapability.sol index aa54d9e0774..fd2a8681bcd 100644 --- a/packages/protocol/test/shared/DeployCapability.sol +++ b/packages/protocol/test/shared/DeployCapability.sol @@ -8,7 +8,7 @@ import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "forge-std/src/console2.sol"; import "forge-std/src/Script.sol"; -import "../../contracts/shared/common/AddressManager.sol"; +import "src/shared/common/AddressManager.sol"; /// @title DeployCapability abstract contract DeployCapability is Script { diff --git a/packages/protocol/test/shared/HelperContracts.sol b/packages/protocol/test/shared/HelperContracts.sol index 15b4444dffb..769b7a5fed0 100644 --- a/packages/protocol/test/shared/HelperContracts.sol +++ b/packages/protocol/test/shared/HelperContracts.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../contracts/shared/bridge/Bridge.sol"; -import "../../contracts/shared/signal/SignalService.sol"; +import "src/shared/bridge/Bridge.sol"; +import "src/shared/signal/SignalService.sol"; contract BadReceiver { receive() external payable { diff --git a/packages/protocol/test/shared/TaikoTest.sol b/packages/protocol/test/shared/TaikoTest.sol index ce24659cd01..a71bb75ae8f 100644 --- a/packages/protocol/test/shared/TaikoTest.sol +++ b/packages/protocol/test/shared/TaikoTest.sol @@ -6,12 +6,12 @@ import "forge-std/src/Test.sol"; import "@openzeppelin/contracts/utils/math/SafeCast.sol"; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import "../../contracts/shared/tokenvault/BridgedERC20V2.sol"; -import "../../contracts/shared/tokenvault/BridgedERC721.sol"; -import "../../contracts/shared/tokenvault/BridgedERC1155.sol"; -import "../../contracts/shared/tokenvault/ERC20Vault.sol"; -import "../../contracts/shared/tokenvault/ERC721Vault.sol"; -import "../../contracts/shared/tokenvault/ERC1155Vault.sol"; +import "src/shared/tokenvault/BridgedERC20V2.sol"; +import "src/shared/tokenvault/BridgedERC721.sol"; +import "src/shared/tokenvault/BridgedERC1155.sol"; +import "src/shared/tokenvault/ERC20Vault.sol"; +import "src/shared/tokenvault/ERC721Vault.sol"; +import "src/shared/tokenvault/ERC1155Vault.sol"; import "./token/FreeMintERC20.sol"; import "./token/RegularERC20.sol"; import "./token/MayFailFreeMintERC20.sol"; diff --git a/packages/protocol/test/shared/common/LibAddress.t.sol b/packages/protocol/test/shared/common/LibAddress.t.sol index ce6b29a5eac..b575c56e171 100644 --- a/packages/protocol/test/shared/common/LibAddress.t.sol +++ b/packages/protocol/test/shared/common/LibAddress.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.24; import "../TaikoTest.sol"; -import "../../../contracts/shared/common/LibAddress.sol"; +import "src/shared/common/LibAddress.sol"; contract CalldataReceiver { // Returns success diff --git a/packages/protocol/test/shared/common/LibTrieProof.t.sol b/packages/protocol/test/shared/common/LibTrieProof.t.sol index 42f2820d86f..08f5d59c309 100644 --- a/packages/protocol/test/shared/common/LibTrieProof.t.sol +++ b/packages/protocol/test/shared/common/LibTrieProof.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import "../../../contracts/shared/common/LibTrieProof.sol"; +import "src/shared/common/LibTrieProof.sol"; import "../TaikoTest.sol"; contract TestLibTrieProof is TaikoTest {