diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69ac7dac52..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,27 +0,0 @@ -# We shall favor using specific git tags or commit hashes to ensure code stability; -# Try to avoid depending on branches whose code may change unexpectedly. - -[submodule "packages/protocol/lib/openzeppelin-contracts-upgradeable"] - path = packages/protocol/lib/openzeppelin-contracts-upgradeable - url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable - tag = v4.8.2 - -[submodule "packages/protocol/lib/openzeppelin-contracts"] - path = packages/protocol/lib/openzeppelin-contracts - url = https://github.com/OpenZeppelin/openzeppelin-contracts - tag = v4.8.2 - -[submodule "packages/protocol/lib/forge-std"] - path = packages/protocol/lib/forge-std - url = https://github.com/foundry-rs/forge-std - tag = v1.5.1 - -[submodule "packages/protocol/lib/solady"] - path = packages/protocol/lib/solady - url = https://github.com/Vectorized/solady - tag = v0.0.167 - -[submodule "packages/protocol/lib/p256-verifier"] - path = packages/protocol/lib/p256-verifier - url = https://github.com/taikoxyz/p256-verifier - branch = use_at_taiko # a protected branch maintained by Taiko. \ No newline at end of file diff --git a/packages/protocol/contracts/L1/TaikoToken.sol b/packages/protocol/contracts/L1/TaikoToken.sol index 94dfe211dc2..dea66907837 100644 --- a/packages/protocol/contracts/L1/TaikoToken.sol +++ b/packages/protocol/contracts/L1/TaikoToken.sol @@ -14,11 +14,9 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol"; -import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol"; -import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; +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 "../common/EssentialContract.sol"; /// @title TaikoToken diff --git a/packages/protocol/contracts/L1/gov/TaikoGovernor.sol b/packages/protocol/contracts/L1/gov/TaikoGovernor.sol index 8ff0db5c792..c146bb42c6f 100644 --- a/packages/protocol/contracts/L1/gov/TaikoGovernor.sol +++ b/packages/protocol/contracts/L1/gov/TaikoGovernor.sol @@ -14,15 +14,14 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts-upgradeable/contracts/governance/GovernorUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol"; import - "lib/openzeppelin-contracts-upgradeable/contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol"; + "@openzeppelin/contracts-upgradeable/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol"; import - "lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorVotesUpgradeable.sol"; + "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol"; import - "lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol"; -import - "lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol"; + "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol"; import "../../common/OwnerUUPSUpgradable.sol"; contract TaikoGovernor is diff --git a/packages/protocol/contracts/L1/gov/TaikoTimelockController.sol b/packages/protocol/contracts/L1/gov/TaikoTimelockController.sol index 73a6592df1c..0e592293d37 100644 --- a/packages/protocol/contracts/L1/gov/TaikoTimelockController.sol +++ b/packages/protocol/contracts/L1/gov/TaikoTimelockController.sol @@ -14,8 +14,7 @@ pragma solidity 0.8.24; -import - "lib/openzeppelin-contracts-upgradeable/contracts/governance/TimelockControllerUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/governance/TimelockControllerUpgradeable.sol"; import "../../common/OwnerUUPSUpgradable.sol"; contract TaikoTimelockController is OwnerUUPSUpgradable, TimelockControllerUpgradeable { diff --git a/packages/protocol/contracts/L1/hooks/AssignmentHook.sol b/packages/protocol/contracts/L1/hooks/AssignmentHook.sol index bfb86a5559c..e2ca35ca132 100644 --- a/packages/protocol/contracts/L1/hooks/AssignmentHook.sol +++ b/packages/protocol/contracts/L1/hooks/AssignmentHook.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../../common/EssentialContract.sol"; import "../../libs/LibAddress.sol"; import "../ITaikoL1.sol"; diff --git a/packages/protocol/contracts/L1/libs/LibProposing.sol b/packages/protocol/contracts/L1/libs/LibProposing.sol index 40b1b8851a7..a4ae28e4859 100644 --- a/packages/protocol/contracts/L1/libs/LibProposing.sol +++ b/packages/protocol/contracts/L1/libs/LibProposing.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../../common/AddressResolver.sol"; import "../../libs/LibAddress.sol"; import "../hooks/IHook.sol"; diff --git a/packages/protocol/contracts/L1/libs/LibProving.sol b/packages/protocol/contracts/L1/libs/LibProving.sol index 733781325a3..a7f31a9ddb1 100644 --- a/packages/protocol/contracts/L1/libs/LibProving.sol +++ b/packages/protocol/contracts/L1/libs/LibProving.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../../common/AddressResolver.sol"; import "../../libs/LibMath.sol"; import "../../verifiers/IVerifier.sol"; diff --git a/packages/protocol/contracts/L1/libs/LibVerifying.sol b/packages/protocol/contracts/L1/libs/LibVerifying.sol index e32d0cb9b66..740f3c606b4 100644 --- a/packages/protocol/contracts/L1/libs/LibVerifying.sol +++ b/packages/protocol/contracts/L1/libs/LibVerifying.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../../common/AddressResolver.sol"; import "../../libs/LibMath.sol"; import "../../signal/ISignalService.sol"; diff --git a/packages/protocol/contracts/L2/CrossChainOwned.sol b/packages/protocol/contracts/L2/CrossChainOwned.sol index af943249c31..132cf651fd3 100644 --- a/packages/protocol/contracts/L2/CrossChainOwned.sol +++ b/packages/protocol/contracts/L2/CrossChainOwned.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../common/EssentialContract.sol"; import "../bridge/IBridge.sol"; diff --git a/packages/protocol/contracts/L2/TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol index 918e900a789..8a9bbf7a833 100644 --- a/packages/protocol/contracts/L2/TaikoL2.sol +++ b/packages/protocol/contracts/L2/TaikoL2.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../common/ICrossChainSync.sol"; import "../signal/ISignalService.sol"; diff --git a/packages/protocol/contracts/automata-attestation/AutomataDcapV3Attestation.sol b/packages/protocol/contracts/automata-attestation/AutomataDcapV3Attestation.sol index 10373ca8cad..34d062597aa 100644 --- a/packages/protocol/contracts/automata-attestation/AutomataDcapV3Attestation.sol +++ b/packages/protocol/contracts/automata-attestation/AutomataDcapV3Attestation.sol @@ -10,15 +10,15 @@ import { EnclaveIdStruct } from "./lib/EnclaveIdStruct.sol"; import { IAttestation } from "./interfaces/IAttestation.sol"; // Internal Libraries -import { Base64 } from "../../lib/solady/src/utils/Base64.sol"; -import { LibString } from "../../lib/solady/src/utils/LibString.sol"; +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 "hardhat/console.sol"; -// import "forge-std/console.sol"; +// import "forge-std/src/console.sol"; contract AutomataDcapV3Attestation is IAttestation { using BytesUtils for bytes; diff --git a/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol b/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol index 56fc61e647c..167cc5903e2 100644 --- a/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol +++ b/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import { LibString } from "../../../lib/solady/src/utils/LibString.sol"; +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"; diff --git a/packages/protocol/contracts/common/OwnerUUPSUpgradable.sol b/packages/protocol/contracts/common/OwnerUUPSUpgradable.sol index b6a9065b8f5..e9762138408 100644 --- a/packages/protocol/contracts/common/OwnerUUPSUpgradable.sol +++ b/packages/protocol/contracts/common/OwnerUUPSUpgradable.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/proxy/utils/UUPSUpgradeable.sol"; -import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; /// @title OwnerUUPSUpgradable /// @notice This contract serves as the base contract for many core components. diff --git a/packages/protocol/contracts/libs/LibAddress.sol b/packages/protocol/contracts/libs/LibAddress.sol index aea82ba773c..5f5ab1ce81b 100644 --- a/packages/protocol/contracts/libs/LibAddress.sol +++ b/packages/protocol/contracts/libs/LibAddress.sol @@ -14,10 +14,10 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/Address.sol"; -import "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; -import "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol"; -import "lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol"; +import "@openzeppelin/contracts/utils/Address.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import "@openzeppelin/contracts/interfaces/IERC1271.sol"; /// @title LibAddress /// @dev Provides utilities for address-related operations. diff --git a/packages/protocol/contracts/libs/LibDeploy.sol b/packages/protocol/contracts/libs/LibDeploy.sol index 81a80f3e97e..1965bc3ef70 100644 --- a/packages/protocol/contracts/libs/LibDeploy.sol +++ b/packages/protocol/contracts/libs/LibDeploy.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol"; -import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; /// @title LibDeploy /// @dev Provides utilities for deploying contracts diff --git a/packages/protocol/contracts/signal/SignalService.sol b/packages/protocol/contracts/signal/SignalService.sol index 40787a60c0a..808bc94b5d2 100644 --- a/packages/protocol/contracts/signal/SignalService.sol +++ b/packages/protocol/contracts/signal/SignalService.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol"; +import "@openzeppelin/contracts/utils/math/SafeCast.sol"; import "../common/EssentialContract.sol"; import "../common/ICrossChainSync.sol"; import "../libs/LibTrieProof.sol"; diff --git a/packages/protocol/contracts/team/TimelockTokenPool.sol b/packages/protocol/contracts/team/TimelockTokenPool.sol index 2786e4bd4d8..21351de07d4 100644 --- a/packages/protocol/contracts/team/TimelockTokenPool.sol +++ b/packages/protocol/contracts/team/TimelockTokenPool.sol @@ -14,9 +14,9 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../common/EssentialContract.sol"; /// @title TimelockTokenPool diff --git a/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol b/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol index 5e0e655402f..35b986be297 100644 --- a/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol +++ b/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import "lib/openzeppelin-contracts/contracts/governance/utils/IVotes.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/governance/utils/IVotes.sol"; import "./MerkleClaimable.sol"; /// @title ERC20Airdrop diff --git a/packages/protocol/contracts/team/airdrop/ERC20Airdrop2.sol b/packages/protocol/contracts/team/airdrop/ERC20Airdrop2.sol index ff1139765a8..3a64aaf46d5 100644 --- a/packages/protocol/contracts/team/airdrop/ERC20Airdrop2.sol +++ b/packages/protocol/contracts/team/airdrop/ERC20Airdrop2.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../../libs/LibMath.sol"; import "./MerkleClaimable.sol"; diff --git a/packages/protocol/contracts/team/airdrop/ERC721Airdrop.sol b/packages/protocol/contracts/team/airdrop/ERC721Airdrop.sol index a20515f184c..709b27e2f6d 100644 --- a/packages/protocol/contracts/team/airdrop/ERC721Airdrop.sol +++ b/packages/protocol/contracts/team/airdrop/ERC721Airdrop.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/ERC721Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "./MerkleClaimable.sol"; /// @title ERC721Airdrop diff --git a/packages/protocol/contracts/team/airdrop/MerkleClaimable.sol b/packages/protocol/contracts/team/airdrop/MerkleClaimable.sol index 1019023c965..0aff7dc335a 100644 --- a/packages/protocol/contracts/team/airdrop/MerkleClaimable.sol +++ b/packages/protocol/contracts/team/airdrop/MerkleClaimable.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; +import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "../../common/EssentialContract.sol"; /// @title MerkleClaimable diff --git a/packages/protocol/contracts/tokenvault/BaseVault.sol b/packages/protocol/contracts/tokenvault/BaseVault.sol index d66c8850c63..38dba2c7c99 100644 --- a/packages/protocol/contracts/tokenvault/BaseVault.sol +++ b/packages/protocol/contracts/tokenvault/BaseVault.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC165Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; import "../bridge/IBridge.sol"; import "../common/EssentialContract.sol"; import "../libs/LibAddress.sol"; diff --git a/packages/protocol/contracts/tokenvault/BridgedERC1155.sol b/packages/protocol/contracts/tokenvault/BridgedERC1155.sol index f5f5ddf9c3a..a555fb388e6 100644 --- a/packages/protocol/contracts/tokenvault/BridgedERC1155.sol +++ b/packages/protocol/contracts/tokenvault/BridgedERC1155.sol @@ -14,11 +14,11 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; -import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/ERC1155Upgradeable.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol"; -import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155Upgradeable.sol"; + "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "../common/EssentialContract.sol"; import "./LibBridgedToken.sol"; diff --git a/packages/protocol/contracts/tokenvault/BridgedERC20.sol b/packages/protocol/contracts/tokenvault/BridgedERC20.sol index 97ac3642df4..8c1b91efa6b 100644 --- a/packages/protocol/contracts/tokenvault/BridgedERC20.sol +++ b/packages/protocol/contracts/tokenvault/BridgedERC20.sol @@ -14,13 +14,10 @@ pragma solidity 0.8.24; -import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; -import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; -import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol"; -import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; import "./LibBridgedToken.sol"; import "./BridgedERC20Base.sol"; diff --git a/packages/protocol/contracts/tokenvault/BridgedERC20Base.sol b/packages/protocol/contracts/tokenvault/BridgedERC20Base.sol index 059388fe74f..8f944a11ec5 100644 --- a/packages/protocol/contracts/tokenvault/BridgedERC20Base.sol +++ b/packages/protocol/contracts/tokenvault/BridgedERC20Base.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "../common/EssentialContract.sol"; import "./IBridgedERC20.sol"; diff --git a/packages/protocol/contracts/tokenvault/BridgedERC721.sol b/packages/protocol/contracts/tokenvault/BridgedERC721.sol index cf13c7660c4..b64d2e4eefa 100644 --- a/packages/protocol/contracts/tokenvault/BridgedERC721.sol +++ b/packages/protocol/contracts/tokenvault/BridgedERC721.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/ERC721Upgradeable.sol"; -import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; import "../common/EssentialContract.sol"; import "./LibBridgedToken.sol"; diff --git a/packages/protocol/contracts/tokenvault/ERC1155Vault.sol b/packages/protocol/contracts/tokenvault/ERC1155Vault.sol index 2f9b5bbcd5d..68972d3dc45 100644 --- a/packages/protocol/contracts/tokenvault/ERC1155Vault.sol +++ b/packages/protocol/contracts/tokenvault/ERC1155Vault.sol @@ -14,9 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol"; -import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol"; +import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol"; import "../bridge/IBridge.sol"; import "./BaseNFTVault.sol"; import "./BridgedERC1155.sol"; diff --git a/packages/protocol/contracts/tokenvault/ERC20Vault.sol b/packages/protocol/contracts/tokenvault/ERC20Vault.sol index 6e4895a5b0d..983f091495d 100644 --- a/packages/protocol/contracts/tokenvault/ERC20Vault.sol +++ b/packages/protocol/contracts/tokenvault/ERC20Vault.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; -import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../bridge/IBridge.sol"; import "./BridgedERC20.sol"; import "./BaseVault.sol"; diff --git a/packages/protocol/contracts/tokenvault/ERC721Vault.sol b/packages/protocol/contracts/tokenvault/ERC721Vault.sol index 554e2e34ee6..f4c774c9a4f 100644 --- a/packages/protocol/contracts/tokenvault/ERC721Vault.sol +++ b/packages/protocol/contracts/tokenvault/ERC721Vault.sol @@ -14,9 +14,8 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol"; -import - "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/IERC721ReceiverUpgradeable.sol"; +import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol"; import "../bridge/IBridge.sol"; import "./BaseNFTVault.sol"; import "./BridgedERC721.sol"; diff --git a/packages/protocol/contracts/tokenvault/LibBridgedToken.sol b/packages/protocol/contracts/tokenvault/LibBridgedToken.sol index f665de21f44..b6d212ce7ce 100644 --- a/packages/protocol/contracts/tokenvault/LibBridgedToken.sol +++ b/packages/protocol/contracts/tokenvault/LibBridgedToken.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; /// @title LibBridgedToken library LibBridgedToken { diff --git a/packages/protocol/contracts/verifiers/SgxVerifier.sol b/packages/protocol/contracts/verifiers/SgxVerifier.sol index 6b59de3d5a5..c5add5a1b68 100644 --- a/packages/protocol/contracts/verifiers/SgxVerifier.sol +++ b/packages/protocol/contracts/verifiers/SgxVerifier.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "../L1/ITaikoL1.sol"; import "../common/EssentialContract.sol"; import "../thirdparty/optimism/Bytes.sol"; diff --git a/packages/protocol/genesis/GenerateGenesis.g.sol b/packages/protocol/genesis/GenerateGenesis.g.sol index ae2bcb07210..31d15f65065 100644 --- a/packages/protocol/genesis/GenerateGenesis.g.sol +++ b/packages/protocol/genesis/GenerateGenesis.g.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "forge-std/console2.sol"; -import "forge-std/StdJson.sol"; -import "forge-std/Test.sol"; +import "forge-std/src/console2.sol"; +import "forge-std/src/StdJson.sol"; +import "forge-std/src/Test.sol"; import "../contracts/common/EssentialContract.sol"; import "../contracts/bridge/Bridge.sol"; import "../contracts/tokenvault/ERC1155Vault.sol"; diff --git a/packages/protocol/lib/forge-std b/packages/protocol/lib/forge-std deleted file mode 160000 index 73a504d2cf6..00000000000 --- a/packages/protocol/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 73a504d2cf6f37b7ce285b479f4c681f76e95f1b diff --git a/packages/protocol/lib/openzeppelin-contracts b/packages/protocol/lib/openzeppelin-contracts deleted file mode 160000 index d00acef4059..00000000000 --- a/packages/protocol/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d00acef4059807535af0bd0dd0ddf619747a044b diff --git a/packages/protocol/lib/openzeppelin-contracts-upgradeable b/packages/protocol/lib/openzeppelin-contracts-upgradeable deleted file mode 160000 index f6c4c9c4ec6..00000000000 --- a/packages/protocol/lib/openzeppelin-contracts-upgradeable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f6c4c9c4ec601665ca74d2c9dddf547fc425658c diff --git a/packages/protocol/lib/p256-verifier b/packages/protocol/lib/p256-verifier deleted file mode 160000 index 6ef45b11764..00000000000 --- a/packages/protocol/lib/p256-verifier +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6ef45b117642786b08a37b4c37c6a6ce151166da diff --git a/packages/protocol/lib/solady b/packages/protocol/lib/solady deleted file mode 160000 index 9de1fe26af4..00000000000 --- a/packages/protocol/lib/solady +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9de1fe26af4f4b1bbb4b5efcedc503342fc55ee8 diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 0aad6804162..552d105e431 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -62,6 +62,12 @@ "typescript": "^5.2.2" }, "dependencies": { + "@openzeppelin/contracts-upgradeable": "4.8.2", + "@openzeppelin/contracts": "4.8.2", + "forge-std": "github:foundry-rs/forge-std#v1.7.5", + "ds-test": "github:dapphub/ds-test#e282159d5170298eb2455a6c05280ab5a73a4ef0", + "solady": "github:Vectorized/solady#v0.0.167", + "p256-verifier": "github:taikoxyz/p256-verifier#v0.1.0", "merkletreejs": "^0.3.11" } } diff --git a/packages/protocol/remappings.txt b/packages/protocol/remappings.txt new file mode 100644 index 00000000000..f99d72faca0 --- /dev/null +++ b/packages/protocol/remappings.txt @@ -0,0 +1,6 @@ +@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ +@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/ +solady/=node_modules/solady/ +forge-std/=node_modules/forge-std/ +ds-test/=node_modules/ds-test/src/ +p256-verifier/=node_modules/p256-verifier/ diff --git a/packages/protocol/script/DeployERC20Airdrop.s.sol b/packages/protocol/script/DeployERC20Airdrop.s.sol index a355b0d0f2b..99d5552d73d 100644 --- a/packages/protocol/script/DeployERC20Airdrop.s.sol +++ b/packages/protocol/script/DeployERC20Airdrop.s.sol @@ -15,7 +15,7 @@ pragma solidity 0.8.24; import "../test/DeployCapability.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/console2.sol"; import "../contracts/team/airdrop/ERC20Airdrop.sol"; diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol index 7c9a4c427cc..38d78a1f9b2 100644 --- a/packages/protocol/script/DeployOnL1.s.sol +++ b/packages/protocol/script/DeployOnL1.s.sol @@ -14,7 +14,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; import "../contracts/L1/TaikoToken.sol"; import "../contracts/L1/TaikoL1.sol"; @@ -44,7 +44,7 @@ import "../test/DeployCapability.sol"; // version. For mainnet, it is easier to go with either this: // https://github.com/daimo-eth/p256-verifier or this: // https://github.com/rdubois-crypto/FreshCryptoLib -import { P256Verifier } from "../lib/p256-verifier/src/P256Verifier.sol"; +import { P256Verifier } from "p256-verifier/src/P256Verifier.sol"; /// @title DeployOnL1 /// @notice This script deploys the core Taiko protocol smart contract on L1, diff --git a/packages/protocol/script/SetAddress.s.sol b/packages/protocol/script/SetAddress.s.sol index 12fb96263f3..31f3b96a9df 100644 --- a/packages/protocol/script/SetAddress.s.sol +++ b/packages/protocol/script/SetAddress.s.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../contracts/common/AddressManager.sol"; diff --git a/packages/protocol/script/SetDcapParams.s.sol b/packages/protocol/script/SetDcapParams.s.sol index 02d79f6e861..4b6e13ef948 100644 --- a/packages/protocol/script/SetDcapParams.s.sol +++ b/packages/protocol/script/SetDcapParams.s.sol @@ -14,8 +14,8 @@ pragma solidity 0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../test/automata-attestation/common/AttestationBase.t.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeAddressManager.s.sol b/packages/protocol/script/upgrade/UpgradeAddressManager.s.sol index 1141d26e408..ff795128b2d 100644 --- a/packages/protocol/script/upgrade/UpgradeAddressManager.s.sol +++ b/packages/protocol/script/upgrade/UpgradeAddressManager.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/common/AddressManager.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeAssignmentHook.s.sol b/packages/protocol/script/upgrade/UpgradeAssignmentHook.s.sol index b6b168cfa63..fcf11015edc 100644 --- a/packages/protocol/script/upgrade/UpgradeAssignmentHook.s.sol +++ b/packages/protocol/script/upgrade/UpgradeAssignmentHook.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/L1/hooks/AssignmentHook.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeBridge.s.sol b/packages/protocol/script/upgrade/UpgradeBridge.s.sol index 17a9f9dd583..978b706bafb 100644 --- a/packages/protocol/script/upgrade/UpgradeBridge.s.sol +++ b/packages/protocol/script/upgrade/UpgradeBridge.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/bridge/Bridge.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeERC1155Vault.s.sol b/packages/protocol/script/upgrade/UpgradeERC1155Vault.s.sol index 59ed0d7c989..6a6b4f9a952 100644 --- a/packages/protocol/script/upgrade/UpgradeERC1155Vault.s.sol +++ b/packages/protocol/script/upgrade/UpgradeERC1155Vault.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/tokenvault/ERC1155Vault.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeERC20Vault.s.sol b/packages/protocol/script/upgrade/UpgradeERC20Vault.s.sol index 24526ecbcb7..da11b43c180 100644 --- a/packages/protocol/script/upgrade/UpgradeERC20Vault.s.sol +++ b/packages/protocol/script/upgrade/UpgradeERC20Vault.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/tokenvault/ERC20Vault.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeERC721Vault.s.sol b/packages/protocol/script/upgrade/UpgradeERC721Vault.s.sol index 814709dadba..62889fef728 100644 --- a/packages/protocol/script/upgrade/UpgradeERC721Vault.s.sol +++ b/packages/protocol/script/upgrade/UpgradeERC721Vault.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/tokenvault/ERC721Vault.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeGuardianProver.s.sol b/packages/protocol/script/upgrade/UpgradeGuardianProver.s.sol index 9e74c8ae8cd..448b9e0bbd8 100644 --- a/packages/protocol/script/upgrade/UpgradeGuardianProver.s.sol +++ b/packages/protocol/script/upgrade/UpgradeGuardianProver.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/L1/provers/GuardianProver.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeScript.s.sol b/packages/protocol/script/upgrade/UpgradeScript.s.sol index 62da90ca5f0..3e116ede7a1 100644 --- a/packages/protocol/script/upgrade/UpgradeScript.s.sol +++ b/packages/protocol/script/upgrade/UpgradeScript.s.sol @@ -15,10 +15,10 @@ pragma solidity 0.8.24; import "../../contracts/L1/gov/TaikoTimelockController.sol"; -import "lib/openzeppelin-contracts/contracts/proxy/utils/UUPSUpgradeable.sol"; +import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; -import "forge-std/console2.sol"; -import "forge-std/Script.sol"; +import "forge-std/src/console2.sol"; +import "forge-std/src/Script.sol"; contract UpgradeScript is Script { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); diff --git a/packages/protocol/script/upgrade/UpgradeSignalService.s.sol b/packages/protocol/script/upgrade/UpgradeSignalService.s.sol index e11a8c3ed41..2461b94e064 100644 --- a/packages/protocol/script/upgrade/UpgradeSignalService.s.sol +++ b/packages/protocol/script/upgrade/UpgradeSignalService.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/signal/SignalService.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeTaikoGovernor.s.sol b/packages/protocol/script/upgrade/UpgradeTaikoGovernor.s.sol index c956e8df53c..87bb815ddb4 100644 --- a/packages/protocol/script/upgrade/UpgradeTaikoGovernor.s.sol +++ b/packages/protocol/script/upgrade/UpgradeTaikoGovernor.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/L1/gov/TaikoGovernor.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeTaikoL1.s.sol b/packages/protocol/script/upgrade/UpgradeTaikoL1.s.sol index 8573e5d1f83..44fcad7b5d5 100644 --- a/packages/protocol/script/upgrade/UpgradeTaikoL1.s.sol +++ b/packages/protocol/script/upgrade/UpgradeTaikoL1.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/L1/TaikoL1.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/script/upgrade/UpgradeTimelockController.s.sol b/packages/protocol/script/upgrade/UpgradeTimelockController.s.sol index edab3f8141b..3b8c3d34ad1 100644 --- a/packages/protocol/script/upgrade/UpgradeTimelockController.s.sol +++ b/packages/protocol/script/upgrade/UpgradeTimelockController.s.sol @@ -14,8 +14,8 @@ pragma solidity ^0.8.24; -import "forge-std/Script.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Script.sol"; +import "forge-std/src/console2.sol"; import "../../contracts/L1/gov/TaikoTimelockController.sol"; import "./UpgradeScript.s.sol"; diff --git a/packages/protocol/test/DeployCapability.sol b/packages/protocol/test/DeployCapability.sol index 6c7ed706c0e..368112f62aa 100644 --- a/packages/protocol/test/DeployCapability.sol +++ b/packages/protocol/test/DeployCapability.sol @@ -2,11 +2,11 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol"; -import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -import "forge-std/console2.sol"; -import "forge-std/Script.sol"; +import "forge-std/src/console2.sol"; +import "forge-std/src/Script.sol"; import "../contracts/common/AddressManager.sol"; import "../contracts/libs/LibDeploy.sol"; diff --git a/packages/protocol/test/L1/gov/TaikoGovernor.t.sol b/packages/protocol/test/L1/gov/TaikoGovernor.t.sol index 729f893d6d8..1839017ad4a 100644 --- a/packages/protocol/test/L1/gov/TaikoGovernor.t.sol +++ b/packages/protocol/test/L1/gov/TaikoGovernor.t.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.24; import "../TaikoL1TestBase.sol"; import "../../../contracts/L1/gov/TaikoGovernor.sol"; import "../../../contracts/L1/gov/TaikoTimelockController.sol"; -import "lib/openzeppelin-contracts/contracts/governance/IGovernor.sol"; -import "lib/openzeppelin-contracts/contracts/governance/TimelockController.sol"; +import "@openzeppelin/contracts/governance/IGovernor.sol"; +import "@openzeppelin/contracts/governance/TimelockController.sol"; /// @author Kirk Baird contract TestTaikoGovernor is TaikoL1TestBase { diff --git a/packages/protocol/test/TaikoTest.sol b/packages/protocol/test/TaikoTest.sol index 12b1eda9b75..fd87bb1c3c2 100644 --- a/packages/protocol/test/TaikoTest.sol +++ b/packages/protocol/test/TaikoTest.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "forge-std/Test.sol"; -import "forge-std/console2.sol"; +import "forge-std/src/Test.sol"; +import "forge-std/src/console2.sol"; -import "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import "../contracts/thirdparty/LibFixedPointMath.sol"; diff --git a/packages/protocol/test/automata-attestation/AutomataDcapV3AttestationTest.t.sol b/packages/protocol/test/automata-attestation/AutomataDcapV3AttestationTest.t.sol index 8cd18b8c8ca..9f744b92def 100644 --- a/packages/protocol/test/automata-attestation/AutomataDcapV3AttestationTest.t.sol +++ b/packages/protocol/test/automata-attestation/AutomataDcapV3AttestationTest.t.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "forge-std/Test.sol"; -import "forge-std/console.sol"; -import "forge-std/StdJson.sol"; +import "forge-std/src/Test.sol"; +import "forge-std/src/console.sol"; +import "forge-std/src/StdJson.sol"; import "./common/AttestationBase.t.sol"; contract AutomataDcapV3AttestationTest is Test, AttestationBase { diff --git a/packages/protocol/test/automata-attestation/common/AttestationBase.t.sol b/packages/protocol/test/automata-attestation/common/AttestationBase.t.sol index daa1d886254..cdf5901129e 100644 --- a/packages/protocol/test/automata-attestation/common/AttestationBase.t.sol +++ b/packages/protocol/test/automata-attestation/common/AttestationBase.t.sol @@ -1,18 +1,18 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "forge-std/Test.sol"; -import "forge-std/console.sol"; -import "forge-std/StdJson.sol"; +import "forge-std/src/Test.sol"; +import "forge-std/src/console.sol"; +import "forge-std/src/StdJson.sol"; import "../../../contracts/verifiers/SgxVerifier.sol"; import { AutomataDcapV3Attestation } from "../../../contracts/automata-attestation/AutomataDcapV3Attestation.sol"; -import { P256Verifier } from "../../../lib/p256-verifier/src/P256Verifier.sol"; +import { P256Verifier } from "p256-verifier/src/P256Verifier.sol"; import { SigVerifyLib } from "../../../contracts/automata-attestation/utils/SigVerifyLib.sol"; import { PEMCertChainLib } from "../../../contracts/automata-attestation/lib/PEMCertChainLib.sol"; import { V3Struct } from "../../../contracts/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; import { BytesUtils } from "../../../contracts/automata-attestation/utils/BytesUtils.sol"; -import { Base64 } from "../../../lib/solady/src/utils/Base64.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/automata-attestation/utils/DcapTestUtils.t.sol b/packages/protocol/test/automata-attestation/utils/DcapTestUtils.t.sol index a7045ec0360..fd53b999d65 100644 --- a/packages/protocol/test/automata-attestation/utils/DcapTestUtils.t.sol +++ b/packages/protocol/test/automata-attestation/utils/DcapTestUtils.t.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.13; import { TCBInfoStruct } from "../../../contracts/automata-attestation/lib/TCBInfoStruct.sol"; import { EnclaveIdStruct } from "../../../contracts/automata-attestation/lib/EnclaveIdStruct.sol"; import { V3Struct } from "../../../contracts/automata-attestation/lib/QuoteV3Auth/V3Struct.sol"; -import { JSONParserLib } from "../../../lib/solady/src/utils/JSONParserLib.sol"; -import { LibString } from "../../../lib/solady/src/utils/LibString.sol"; +import { JSONParserLib } from "solady/src/utils/JSONParserLib.sol"; +import { LibString } from "solady/src/utils/LibString.sol"; contract DcapTestUtils { using JSONParserLib for JSONParserLib.Item; diff --git a/packages/protocol/test/automata-attestation/utils/V3QuoteParseUtils.t.sol b/packages/protocol/test/automata-attestation/utils/V3QuoteParseUtils.t.sol index 6c3414125a1..1e01cda5c6c 100644 --- a/packages/protocol/test/automata-attestation/utils/V3QuoteParseUtils.t.sol +++ b/packages/protocol/test/automata-attestation/utils/V3QuoteParseUtils.t.sol @@ -6,9 +6,9 @@ import { V3Parser } from "../../../contracts/automata-attestation/lib/QuoteV3Aut import { IPEMCertChainLib } from "../../../contracts/automata-attestation/lib/interfaces/IPEMCertChainLib.sol"; import { PEMCertChainLib } from "../../../contracts/automata-attestation/lib/PEMCertChainLib.sol"; -import { Base64 } from "../../../lib/solady/src/utils/Base64.sol"; -import { JSONParserLib } from "../../../lib/solady/src/utils/JSONParserLib.sol"; -import { LibString } from "../../../lib/solady/src/utils/LibString.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"; contract V3QuoteParseUtils { using JSONParserLib for JSONParserLib.Item; diff --git a/packages/protocol/test/common/erc20/FreeMintERC20.sol b/packages/protocol/test/common/erc20/FreeMintERC20.sol index 7a099c1d270..a928dd80cc8 100644 --- a/packages/protocol/test/common/erc20/FreeMintERC20.sol +++ b/packages/protocol/test/common/erc20/FreeMintERC20.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; // An ERC20 Token with a mint function anyone can call, for free, to receive // 5 tokens. diff --git a/packages/protocol/test/common/erc20/MayFailFreeMintERC20.sol b/packages/protocol/test/common/erc20/MayFailFreeMintERC20.sol index 4f7f813ecf7..58044944f1c 100644 --- a/packages/protocol/test/common/erc20/MayFailFreeMintERC20.sol +++ b/packages/protocol/test/common/erc20/MayFailFreeMintERC20.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; // An ERC20 token for testing the Taiko Bridge on testnets. // This token has 50% of failure on transfers so we can diff --git a/packages/protocol/test/common/erc20/RegularERC20.sol b/packages/protocol/test/common/erc20/RegularERC20.sol index 623babc9b08..4985d937d36 100644 --- a/packages/protocol/test/common/erc20/RegularERC20.sol +++ b/packages/protocol/test/common/erc20/RegularERC20.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract RegularERC20 is ERC20 { constructor(uint256 initialSupply) ERC20("RegularERC20", "RGL") { diff --git a/packages/protocol/test/team/airdrop/ERC20Airdrop.t.sol b/packages/protocol/test/team/airdrop/ERC20Airdrop.t.sol index 24349eff307..4d712ef18fd 100644 --- a/packages/protocol/test/team/airdrop/ERC20Airdrop.t.sol +++ b/packages/protocol/test/team/airdrop/ERC20Airdrop.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import "../../TaikoTest.sol"; import "./LibDelegationSigUtil.sol"; -import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract MockERC20Airdrop is ERC20Airdrop { function _verifyMerkleProof( diff --git a/packages/protocol/test/tokenvault/ERC1155Vault.t.sol b/packages/protocol/test/tokenvault/ERC1155Vault.t.sol index b0c136f2cdc..779877714a4 100644 --- a/packages/protocol/test/tokenvault/ERC1155Vault.t.sol +++ b/packages/protocol/test/tokenvault/ERC1155Vault.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol"; +import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "../TaikoTest.sol"; contract TestTokenERC1155 is ERC1155 { diff --git a/packages/protocol/test/tokenvault/ERC721Vault.t.sol b/packages/protocol/test/tokenvault/ERC721Vault.t.sol index 17724d17a02..754370575b9 100644 --- a/packages/protocol/test/tokenvault/ERC721Vault.t.sol +++ b/packages/protocol/test/tokenvault/ERC721Vault.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol"; +import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "../TaikoTest.sol"; contract TestTokenERC721 is ERC721 { diff --git a/packages/protocol/test/verifiers/PseZkVerifier.t.sol b/packages/protocol/test/verifiers/PseZkVerifier.t.sol index ede71044301..3cf64da601d 100644 --- a/packages/protocol/test/verifiers/PseZkVerifier.t.sol +++ b/packages/protocol/test/verifiers/PseZkVerifier.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.24; import "../L1/TaikoL1TestBase.sol"; -import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; import { IVerifier } from "../../contracts/verifiers/IVerifier.sol"; import { TaikoData } from "../../contracts/L1/TaikoData.sol"; import { MockPlonkVerifier } from "../mocks/MockPlonkVerifier.sol"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7702fc07095..f5981b06cdc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -255,9 +255,27 @@ importers: packages/protocol: dependencies: + '@openzeppelin/contracts': + specifier: 4.8.2 + version: 4.8.2 + '@openzeppelin/contracts-upgradeable': + specifier: 4.8.2 + version: 4.8.2 + ds-test: + specifier: github:dapphub/ds-test#e282159d5170298eb2455a6c05280ab5a73a4ef0 + version: github.com/dapphub/ds-test/e282159d5170298eb2455a6c05280ab5a73a4ef0 + forge-std: + specifier: github:foundry-rs/forge-std#v1.7.5 + version: github.com/foundry-rs/forge-std/36c303b7ffdd842d06b1ec2744c9b9b5fb3083f3 merkletreejs: specifier: ^0.3.11 version: 0.3.11 + p256-verifier: + specifier: github:taikoxyz/p256-verifier#v0.1.0 + version: github.com/taikoxyz/p256-verifier/6ef45b117642786b08a37b4c37c6a6ce151166da + solady: + specifier: github:Vectorized/solady#v0.0.167 + version: github.com/Vectorized/solady/de0f336d2033d04e0f77c923d639c7fbffd48b6d devDependencies: '@typechain/ethers-v5': specifier: ^11.1.2 @@ -3702,6 +3720,14 @@ packages: rimraf: 3.0.2 dev: true + /@openzeppelin/contracts-upgradeable@4.8.2: + resolution: {integrity: sha512-zIggnBwemUmmt9IS73qxi+tumALxCY4QEs3zLCII78k0Gfse2hAOdAkuAeLUzvWUpneMUfFE5sGHzEUSTvn4Ag==} + dev: false + + /@openzeppelin/contracts@4.8.2: + resolution: {integrity: sha512-kEUOgPQszC0fSYWpbh2kT94ltOJwj1qfT2DWo+zVttmGmf97JZ99LspePNaeeaLhCImaHVeBbjaQFZQn7+Zc5g==} + dev: false + /@parcel/watcher-android-arm64@2.3.0: resolution: {integrity: sha512-f4o9eA3dgk0XRT3XhB0UWpWpLnKgrh1IwNJKJ7UJek7eTYccQ8LR7XUWFKqw6aEq5KUNlCcGvSzKqSX/vtWVVA==} engines: {node: '>= 10.0.0'} @@ -18093,6 +18119,30 @@ packages: react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) + github.com/Vectorized/solady/de0f336d2033d04e0f77c923d639c7fbffd48b6d: + resolution: {tarball: https://codeload.github.com/Vectorized/solady/tar.gz/de0f336d2033d04e0f77c923d639c7fbffd48b6d} + name: solady + version: 0.0.167 + dev: false + + github.com/dapphub/ds-test/e282159d5170298eb2455a6c05280ab5a73a4ef0: + resolution: {tarball: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0} + name: ds-test + version: 1.0.0 + dev: false + + github.com/foundry-rs/forge-std/36c303b7ffdd842d06b1ec2744c9b9b5fb3083f3: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/36c303b7ffdd842d06b1ec2744c9b9b5fb3083f3} + name: forge-std + version: 1.7.5 + dev: false + + github.com/taikoxyz/p256-verifier/6ef45b117642786b08a37b4c37c6a6ce151166da: + resolution: {tarball: https://codeload.github.com/taikoxyz/p256-verifier/tar.gz/6ef45b117642786b08a37b4c37c6a6ce151166da} + name: p256-verifier#v0.1.0 + version: 0.0.0 + dev: false + github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5(hardhat@2.19.2): resolution: {tarball: https://codeload.github.com/taikoxyz/solidity-coverage/tar.gz/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5} id: github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5