Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(protocol): shorten imports in solidity files #18221

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/contracts/layer1/based/LibBonds.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/contracts/layer1/based/LibProposing.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
6 changes: 3 additions & 3 deletions packages/protocol/contracts/layer1/based/LibUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/layer1/based/LibVerifying.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/layer1/based/TaikoData.sol
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/layer1/based/TaikoL1.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/contracts/layer1/provers/GuardianProver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
6 changes: 3 additions & 3 deletions packages/protocol/contracts/layer1/provers/ProverSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading