diff --git a/packages/contracts-bedrock/.gas-snapshot b/packages/contracts-bedrock/.gas-snapshot index 1b1a01905ba5f670d74523a885e83db9b2d59eee..2ab3157a714ee31fb17b16f02a84539ddfb7f097 100644 --- a/packages/contracts-bedrock/.gas-snapshot +++ b/packages/contracts-bedrock/.gas-snapshot @@ -5,7 +5,7 @@ GasBenchMark_L1BlockInterop_SetValuesInterop_Warm:test_setL1BlockValuesInterop_b GasBenchMark_L1Block_SetValuesEcotone:test_setL1BlockValuesEcotone_benchmark() (gas: 158531) GasBenchMark_L1Block_SetValuesEcotone_Warm:test_setL1BlockValuesEcotone_benchmark() (gas: 7597) GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 369280) -GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2967420) +GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2967465) GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 564398) GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 4076613) GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 467098) @@ -14,4 +14,4 @@ GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (g GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 92973) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 68422) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 68986) -GasBenchMark_OptimismPortal:test_proveWithdrawalTransaction_benchmark() (gas: 155610) \ No newline at end of file +GasBenchMark_OptimismPortal:test_proveWithdrawalTransaction_benchmark() (gas: 155565) \ No newline at end of file diff --git a/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol b/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol index 9ef537e435b39d86468baed05f8a9276d79d757e..23c1365e9156ea925805e396486b800e87e26283 100644 --- a/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol +++ b/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; import { Reverter } from "test/mocks/Callers.sol"; // Libraries @@ -17,7 +17,7 @@ import { IOptimismPortal } from "src/L1/interfaces/IOptimismPortal.sol"; import { ISuperchainConfig } from "src/L1/interfaces/ISuperchainConfig.sol"; import { ISystemConfig } from "src/L1/interfaces/ISystemConfig.sol"; -contract L1CrossDomainMessenger_Test is Bridge_Initializer { +contract L1CrossDomainMessenger_Test is CommonTest { /// @dev The receiver address address recipient = address(0xabbaacdc); @@ -742,7 +742,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer { /// @dev A regression test against a reentrancy vulnerability in the CrossDomainMessenger contract, which /// was possible by intercepting and sandwhiching a signed Safe Transaction to upgrade it. -contract L1CrossDomainMessenger_ReinitReentryTest is Bridge_Initializer { +contract L1CrossDomainMessenger_ReinitReentryTest is CommonTest { bool attacked; // Common values used across functions diff --git a/packages/contracts-bedrock/test/L1/L1ERC721Bridge.t.sol b/packages/contracts-bedrock/test/L1/L1ERC721Bridge.t.sol index 055ba45d0e1bb0d86b30737199d8bdc96626a74f..3949bf30f4eb0f9cff172ecbcc4882ac68a2982d 100644 --- a/packages/contracts-bedrock/test/L1/L1ERC721Bridge.t.sol +++ b/packages/contracts-bedrock/test/L1/L1ERC721Bridge.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Contracts import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; @@ -25,7 +25,7 @@ contract TestERC721 is ERC721 { } } -contract L1ERC721Bridge_Test is Bridge_Initializer { +contract L1ERC721Bridge_Test is CommonTest { TestERC721 internal localToken; TestERC721 internal remoteToken; uint256 internal constant tokenId = 1; @@ -315,7 +315,7 @@ contract L1ERC721Bridge_Test is Bridge_Initializer { } } -contract L1ERC721Bridge_Pause_Test is Bridge_Initializer { +contract L1ERC721Bridge_Pause_Test is CommonTest { /// @dev Verifies that the `paused` accessor returns the same value as the `paused` function of the /// `superchainConfig`. function test_paused_succeeds() external view { @@ -343,7 +343,7 @@ contract L1ERC721Bridge_Pause_Test is Bridge_Initializer { } } -contract L1ERC721Bridge_Pause_TestFail is Bridge_Initializer { +contract L1ERC721Bridge_Pause_TestFail is CommonTest { /// @dev Sets up the test by pausing the bridge, giving ether to the bridge and mocking /// the calls to the xDomainMessageSender so that it returns the correct value. function setUp() public override { diff --git a/packages/contracts-bedrock/test/L1/L1StandardBridge.t.sol b/packages/contracts-bedrock/test/L1/L1StandardBridge.t.sol index 760f602df21e1315a55f75a87abc1fc11cca19e7..97ef01262ab67ff4c26bbf16f43a1fdb5e935c4f 100644 --- a/packages/contracts-bedrock/test/L1/L1StandardBridge.t.sol +++ b/packages/contracts-bedrock/test/L1/L1StandardBridge.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.15; // Testing import { stdStorage, StdStorage } from "forge-std/Test.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Contracts import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; @@ -19,7 +19,7 @@ import { ISuperchainConfig } from "src/L1/interfaces/ISuperchainConfig.sol"; import { IOptimismPortal } from "src/L1/interfaces/IOptimismPortal.sol"; import { IL1StandardBridge } from "src/L1/interfaces/IL1StandardBridge.sol"; -contract L1StandardBridge_Getter_Test is Bridge_Initializer { +contract L1StandardBridge_Getter_Test is CommonTest { /// @dev Test that the accessors return the correct initialized values. function test_getters_succeeds() external view { assert(l1StandardBridge.l2TokenBridge() == address(l2StandardBridge)); @@ -31,7 +31,7 @@ contract L1StandardBridge_Getter_Test is Bridge_Initializer { } } -contract L1StandardBridge_Initialize_Test is Bridge_Initializer { +contract L1StandardBridge_Initialize_Test is CommonTest { /// @dev Test that the constructor sets the correct values. /// @notice Marked virtual to be overridden in /// test/kontrol/deployment/DeploymentSummary.t.sol @@ -58,7 +58,7 @@ contract L1StandardBridge_Initialize_Test is Bridge_Initializer { } } -contract L1StandardBridge_Pause_Test is Bridge_Initializer { +contract L1StandardBridge_Pause_Test is CommonTest { /// @dev Verifies that the `paused` accessor returns the same value as the `paused` function of the /// `superchainConfig`. function test_paused_succeeds() external view { @@ -86,7 +86,7 @@ contract L1StandardBridge_Pause_Test is Bridge_Initializer { } } -contract L1StandardBridge_Pause_TestFail is Bridge_Initializer { +contract L1StandardBridge_Pause_TestFail is CommonTest { /// @dev Sets up the test by pausing the bridge, giving ether to the bridge and mocking /// the calls to the xDomainMessageSender so that it returns the correct value. function setUp() public override { @@ -157,9 +157,9 @@ contract L1StandardBridge_Pause_TestFail is Bridge_Initializer { } } -contract L1StandardBridge_Initialize_TestFail is Bridge_Initializer { } +contract L1StandardBridge_Initialize_TestFail is CommonTest { } -contract L1StandardBridge_Receive_Test is Bridge_Initializer { +contract L1StandardBridge_Receive_Test is CommonTest { /// @dev Tests receive bridges ETH successfully. function test_receive_succeeds() external { assertEq(address(optimismPortal).balance, 0); @@ -190,7 +190,7 @@ contract L1StandardBridge_Receive_Test is Bridge_Initializer { } } -contract L1StandardBridge_Receive_TestFail is Bridge_Initializer { +contract L1StandardBridge_Receive_TestFail is CommonTest { /// @dev Tests receive function reverts with custom gas token. function testFuzz_receive_customGasToken_reverts(uint256 _value) external { vm.prank(alice, alice); @@ -207,7 +207,7 @@ contract L1StandardBridge_Receive_TestFail is Bridge_Initializer { } } -contract PreBridgeETH is Bridge_Initializer { +contract PreBridgeETH is CommonTest { /// @dev Asserts the expected calls and events for bridging ETH depending /// on whether the bridge call is legacy or not. function _preBridgeETH(bool isLegacy, uint256 value) internal { @@ -285,7 +285,7 @@ contract L1StandardBridge_DepositETH_Test is PreBridgeETH { } } -contract L1StandardBridge_DepositETH_TestFail is Bridge_Initializer { +contract L1StandardBridge_DepositETH_TestFail is CommonTest { /// @dev Tests that depositing ETH reverts if the call is not from an EOA. function test_depositETH_notEoa_reverts() external { vm.etch(alice, address(L1Token).code); @@ -331,7 +331,7 @@ contract L1StandardBridge_BridgeETH_TestFail is PreBridgeETH { } } -contract PreBridgeETHTo is Bridge_Initializer { +contract PreBridgeETHTo is CommonTest { /// @dev Asserts the expected calls and events for bridging ETH to a different /// address depending on whether the bridge call is legacy or not. function _preBridgeETHTo(bool isLegacy, uint256 value) internal { @@ -411,7 +411,7 @@ contract L1StandardBridge_DepositETHTo_Test is PreBridgeETHTo { } } -contract L1StandardBridge_DepositETHTo_TestFail is Bridge_Initializer { +contract L1StandardBridge_DepositETHTo_TestFail is CommonTest { /// @dev Tests that depositETHTo reverts with custom gas token. function testFuzz_depositETHTo_customGasToken_reverts( uint256 _value, @@ -463,7 +463,7 @@ contract L1StandardBridge_BridgeETHTo_TestFail is PreBridgeETHTo { } } -contract L1StandardBridge_DepositERC20_Test is Bridge_Initializer { +contract L1StandardBridge_DepositERC20_Test is CommonTest { using stdStorage for StdStorage; // depositERC20 @@ -540,7 +540,7 @@ contract L1StandardBridge_DepositERC20_Test is Bridge_Initializer { } } -contract L1StandardBridge_DepositERC20_TestFail is Bridge_Initializer { +contract L1StandardBridge_DepositERC20_TestFail is CommonTest { /// @dev Tests that depositing an ERC20 to the bridge reverts /// if the caller is not an EOA. function test_depositERC20_notEoa_reverts() external { @@ -553,7 +553,7 @@ contract L1StandardBridge_DepositERC20_TestFail is Bridge_Initializer { } } -contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer { +contract L1StandardBridge_DepositERC20To_Test is CommonTest { /// @dev Tests that depositing ERC20 to the bridge succeeds when /// sent to a different address. /// Bridge deposits are updated. @@ -622,7 +622,7 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer { } } -contract L1StandardBridge_FinalizeETHWithdrawal_Test is Bridge_Initializer { +contract L1StandardBridge_FinalizeETHWithdrawal_Test is CommonTest { using stdStorage for StdStorage; /// @dev Tests that finalizing an ETH withdrawal succeeds. @@ -654,7 +654,7 @@ contract L1StandardBridge_FinalizeETHWithdrawal_Test is Bridge_Initializer { } } -contract L1StandardBridge_FinalizeETHWithdrawal_TestFail is Bridge_Initializer { +contract L1StandardBridge_FinalizeETHWithdrawal_TestFail is CommonTest { /// @dev Tests that finalizeETHWithdrawal reverts with custom gas token. function testFuzz_finalizeETHWithdrawal_customGasToken_reverts( uint256 _value, @@ -678,7 +678,7 @@ contract L1StandardBridge_FinalizeETHWithdrawal_TestFail is Bridge_Initializer { } } -contract L1StandardBridge_FinalizeERC20Withdrawal_Test is Bridge_Initializer { +contract L1StandardBridge_FinalizeERC20Withdrawal_Test is CommonTest { using stdStorage for StdStorage; /// @dev Tests that finalizing an ERC20 withdrawal succeeds. @@ -717,7 +717,7 @@ contract L1StandardBridge_FinalizeERC20Withdrawal_Test is Bridge_Initializer { } } -contract L1StandardBridge_FinalizeERC20Withdrawal_TestFail is Bridge_Initializer { +contract L1StandardBridge_FinalizeERC20Withdrawal_TestFail is CommonTest { /// @dev Tests that finalizing an ERC20 withdrawal reverts if the caller is not the L2 bridge. function test_finalizeERC20Withdrawal_notMessenger_reverts() external { vm.mockCall( @@ -743,7 +743,7 @@ contract L1StandardBridge_FinalizeERC20Withdrawal_TestFail is Bridge_Initializer } } -contract L1StandardBridge_FinalizeBridgeETH_Test is Bridge_Initializer { +contract L1StandardBridge_FinalizeBridgeETH_Test is CommonTest { /// @dev Tests that finalizing bridged ETH succeeds. function test_finalizeBridgeETH_succeeds() external { address messenger = address(l1StandardBridge.messenger()); @@ -762,7 +762,7 @@ contract L1StandardBridge_FinalizeBridgeETH_Test is Bridge_Initializer { } } -contract L1StandardBridge_FinalizeBridgeETH_TestFail is Bridge_Initializer { +contract L1StandardBridge_FinalizeBridgeETH_TestFail is CommonTest { /// @dev Tests that finalizing bridged reverts with custom gas token. function testFuzz_finalizeBridgeETH_customGasToken_reverts(uint256 _value, bytes calldata _extraData) external { vm.mockCall( diff --git a/packages/contracts-bedrock/test/L2/BaseFeeVault.t.sol b/packages/contracts-bedrock/test/L2/BaseFeeVault.t.sol index bf63a700c098583783af0bd07d982944793bd92b..1864e1d0766405b45e99269c461e48f29f34a702 100644 --- a/packages/contracts-bedrock/test/L2/BaseFeeVault.t.sol +++ b/packages/contracts-bedrock/test/L2/BaseFeeVault.t.sol @@ -2,13 +2,13 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { Types } from "src/libraries/Types.sol"; // Test the implementations of the FeeVault -contract FeeVault_Test is Bridge_Initializer { +contract FeeVault_Test is CommonTest { /// @dev Tests that the constructor sets the correct values. function test_constructor_baseFeeVault_succeeds() external view { assertEq(baseFeeVault.RECIPIENT(), deploy.cfg().baseFeeVaultRecipient()); diff --git a/packages/contracts-bedrock/test/L2/CrossDomainOwnable2.t.sol b/packages/contracts-bedrock/test/L2/CrossDomainOwnable2.t.sol index a80f633fede288542c181c410d642c31e79c681f..7bdbdaa9f708933980a7c8fbb609469639cb3ec0 100644 --- a/packages/contracts-bedrock/test/L2/CrossDomainOwnable2.t.sol +++ b/packages/contracts-bedrock/test/L2/CrossDomainOwnable2.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { Hashing } from "src/libraries/Hashing.sol"; @@ -23,7 +23,7 @@ contract XDomainSetter2 is CrossDomainOwnable2 { } } -contract CrossDomainOwnable2_Test is Bridge_Initializer { +contract CrossDomainOwnable2_Test is CommonTest { XDomainSetter2 setter; /// @dev Sets up the test suite. diff --git a/packages/contracts-bedrock/test/L2/CrossDomainOwnable3.t.sol b/packages/contracts-bedrock/test/L2/CrossDomainOwnable3.t.sol index 9689104781983208668dd78fd73e258367ea7496..e1bac7c784bb95dea9bd4933b4434403748e4536 100644 --- a/packages/contracts-bedrock/test/L2/CrossDomainOwnable3.t.sol +++ b/packages/contracts-bedrock/test/L2/CrossDomainOwnable3.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { Hashing } from "src/libraries/Hashing.sol"; @@ -23,7 +23,7 @@ contract XDomainSetter3 is CrossDomainOwnable3 { } } -contract CrossDomainOwnable3_Test is Bridge_Initializer { +contract CrossDomainOwnable3_Test is CommonTest { XDomainSetter3 setter; /// @dev CrossDomainOwnable3.sol transferOwnership event diff --git a/packages/contracts-bedrock/test/L2/L1FeeVault.t.sol b/packages/contracts-bedrock/test/L2/L1FeeVault.t.sol index 03a3e7e5ad9bea102dbfe3fe02e0b9e06c99b16a..5284054056d1bc97f95c51458a2ff882ef591e61 100644 --- a/packages/contracts-bedrock/test/L2/L1FeeVault.t.sol +++ b/packages/contracts-bedrock/test/L2/L1FeeVault.t.sol @@ -2,13 +2,13 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { Types } from "src/libraries/Types.sol"; // Test the implementations of the FeeVault -contract FeeVault_Test is Bridge_Initializer { +contract FeeVault_Test is CommonTest { /// @dev Tests that the constructor sets the correct values. function test_constructor_l1FeeVault_succeeds() external view { assertEq(l1FeeVault.RECIPIENT(), deploy.cfg().l1FeeVaultRecipient()); diff --git a/packages/contracts-bedrock/test/L2/L2CrossDomainMessenger.t.sol b/packages/contracts-bedrock/test/L2/L2CrossDomainMessenger.t.sol index a2cd9382ca8428f5580c04ae7dc123f7acd765e1..131851783c79a6a6d4edef2d3d507cc365b3aed0 100644 --- a/packages/contracts-bedrock/test/L2/L2CrossDomainMessenger.t.sol +++ b/packages/contracts-bedrock/test/L2/L2CrossDomainMessenger.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; import { Reverter } from "test/mocks/Callers.sol"; import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; @@ -16,7 +16,7 @@ import { AddressAliasHelper } from "src/vendor/AddressAliasHelper.sol"; import { IL2CrossDomainMessenger } from "src/L2/interfaces/IL2CrossDomainMessenger.sol"; import { IL2ToL1MessagePasser } from "src/L2/interfaces/IL2ToL1MessagePasser.sol"; -contract L2CrossDomainMessenger_Test is Bridge_Initializer { +contract L2CrossDomainMessenger_Test is CommonTest { /// @dev Receiver address for testing address recipient = address(0xabbaacdc); diff --git a/packages/contracts-bedrock/test/L2/L2ERC721Bridge.t.sol b/packages/contracts-bedrock/test/L2/L2ERC721Bridge.t.sol index 58179cb93207ee10820f48cf3b0d3c2d75b99874..5e7798824c8d01390a52c37dba1631d4c902eecb 100644 --- a/packages/contracts-bedrock/test/L2/L2ERC721Bridge.t.sol +++ b/packages/contracts-bedrock/test/L2/L2ERC721Bridge.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Contracts import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; @@ -33,7 +33,7 @@ contract TestMintableERC721 is OptimismMintableERC721 { } } -contract L2ERC721Bridge_Test is Bridge_Initializer { +contract L2ERC721Bridge_Test is CommonTest { TestMintableERC721 internal localToken; TestERC721 internal remoteToken; uint256 internal constant tokenId = 1; diff --git a/packages/contracts-bedrock/test/L2/L2StandardBridge.t.sol b/packages/contracts-bedrock/test/L2/L2StandardBridge.t.sol index d703ec95f64eedd4258dd8170af846a0fe852c82..86100b6e4d40a90bf10570f8bfef6b8d45a05380 100644 --- a/packages/contracts-bedrock/test/L2/L2StandardBridge.t.sol +++ b/packages/contracts-bedrock/test/L2/L2StandardBridge.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.15; // Testing import { stdStorage, StdStorage } from "forge-std/Test.sol"; import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Contracts import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; @@ -21,7 +21,7 @@ import { IStandardBridge } from "src/universal/interfaces/IStandardBridge.sol"; import { IL2ToL1MessagePasser } from "src/L2/interfaces/IL2ToL1MessagePasser.sol"; import { IL2StandardBridge } from "src/L2/interfaces/IL2StandardBridge.sol"; -contract L2StandardBridge_Test is Bridge_Initializer { +contract L2StandardBridge_Test is CommonTest { using stdStorage for StdStorage; /// @dev Test that the bridge's constructor sets the correct values. @@ -275,7 +275,7 @@ contract L2StandardBridge_Test is Bridge_Initializer { } } -contract PreBridgeERC20 is Bridge_Initializer { +contract PreBridgeERC20 is CommonTest { /// @dev Sets up expected calls and emits for a successful ERC20 withdrawal. function _preBridgeERC20(bool _isLegacy, address _l2Token) internal { // Alice has 100 L2Token @@ -401,7 +401,7 @@ contract L2StandardBridge_BridgeERC20_Test is PreBridgeERC20 { } } -contract PreBridgeERC20To is Bridge_Initializer { +contract PreBridgeERC20To is CommonTest { // withdrawTo and BridgeERC20To should behave the same when transferring ERC20 tokens // so they should share the same setup and expectEmit calls function _preBridgeERC20To(bool _isLegacy, address _l2Token) internal { @@ -501,7 +501,7 @@ contract L2StandardBridge_BridgeERC20To_Test is PreBridgeERC20To { } } -contract L2StandardBridge_Bridge_Test is Bridge_Initializer { +contract L2StandardBridge_Bridge_Test is CommonTest { /// @dev Tests that `finalizeBridgeETH` reverts if the recipient is the other bridge. function test_finalizeBridgeETH_sendToSelf_reverts() external { vm.mockCall( @@ -622,7 +622,7 @@ contract L2StandardBridge_Bridge_Test is Bridge_Initializer { } } -contract L2StandardBridge_FinalizeBridgeETH_Test is Bridge_Initializer { +contract L2StandardBridge_FinalizeBridgeETH_Test is CommonTest { /// @dev Tests that `finalizeBridgeETH` succeeds. function test_finalizeBridgeETH_succeeds() external { address messenger = address(l2StandardBridge.messenger()); diff --git a/packages/contracts-bedrock/test/L2/L2StandardBridgeInterop.t.sol b/packages/contracts-bedrock/test/L2/L2StandardBridgeInterop.t.sol index fdfd1b0ec6d3907af235247f04aebecef87327d9..30212d7ad622ce5b7a97f279f0280538b3401dd1 100644 --- a/packages/contracts-bedrock/test/L2/L2StandardBridgeInterop.t.sol +++ b/packages/contracts-bedrock/test/L2/L2StandardBridgeInterop.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Interfaces import { IMintableAndBurnableERC20 } from "src/L2/interfaces/IMintableAndBurnableERC20.sol"; @@ -13,7 +13,7 @@ import { IOptimismMintableERC20 } from "src/universal/interfaces/IOptimismMintab import { ILegacyMintableERC20 } from "src/universal/OptimismMintableERC20.sol"; import { IOptimismERC20Factory } from "src/L2/interfaces/IOptimismERC20Factory.sol"; -contract L2StandardBridgeInterop_Test is Bridge_Initializer { +contract L2StandardBridgeInterop_Test is CommonTest { /// @notice Emitted when a conversion is made. event Converted(address indexed from, address indexed to, address indexed caller, uint256 amount); diff --git a/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Beacon.t.sol b/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Beacon.t.sol index 4de8b06b8ee0d3035faecba87feae73be6999cc3..8a6a7701469826e9ff73e63ff076c254755ca543 100644 --- a/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Beacon.t.sol +++ b/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Beacon.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { Predeploys } from "src/libraries/Predeploys.sol"; @@ -10,7 +10,7 @@ import { IBeacon } from "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; /// @title OptimismSuperchainERC20BeaconTest /// @notice Contract for testing the OptimismSuperchainERC20Beacon contract. -contract OptimismSuperchainERC20BeaconTest is Bridge_Initializer { +contract OptimismSuperchainERC20BeaconTest is CommonTest { /// @notice Sets up the test suite. function setUp() public override { super.enableInterop(); diff --git a/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Factory.t.sol b/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Factory.t.sol index 15630a15d8ebb39ede303fdf94379f69e6eaada8..d8d7f86f26a294c498555e6dacc54856af2da73e 100644 --- a/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Factory.t.sol +++ b/packages/contracts-bedrock/test/L2/OptimismSuperchainERC20Factory.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { CREATE3, Bytes32AddressLib } from "@rari-capital/solmate/src/utils/CREATE3.sol"; @@ -13,7 +13,7 @@ import { IERC20Metadata } from "@openzeppelin/contracts/interfaces/IERC20Metadat /// @title OptimismSuperchainERC20FactoryTest /// @notice Contract for testing the OptimismSuperchainERC20Factory contract. -contract OptimismSuperchainERC20FactoryTest is Bridge_Initializer { +contract OptimismSuperchainERC20FactoryTest is CommonTest { using Bytes32AddressLib for bytes32; event OptimismSuperchainERC20Created( diff --git a/packages/contracts-bedrock/test/L2/SuperchainTokenBridge.t.sol b/packages/contracts-bedrock/test/L2/SuperchainTokenBridge.t.sol index 1dc01ba0008e3c6e8cc4c92aeb1fe6c52951cf47..3c39e8b1792cc596abbef7092106be8c359cca0a 100644 --- a/packages/contracts-bedrock/test/L2/SuperchainTokenBridge.t.sol +++ b/packages/contracts-bedrock/test/L2/SuperchainTokenBridge.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing utilities -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { Predeploys } from "src/libraries/Predeploys.sol"; @@ -17,7 +17,7 @@ import { IERC7802 } from "src/L2/interfaces/IERC7802.sol"; /// @title SuperchainTokenBridgeTest /// @notice Contract for testing the SuperchainTokenBridge contract. -contract SuperchainTokenBridgeTest is Bridge_Initializer { +contract SuperchainTokenBridgeTest is CommonTest { address internal constant ZERO_ADDRESS = address(0); string internal constant NAME = "SuperchainERC20"; string internal constant SYMBOL = "OSE"; diff --git a/packages/contracts-bedrock/test/invariants/CrossDomainMessenger.t.sol b/packages/contracts-bedrock/test/invariants/CrossDomainMessenger.t.sol index 08a0c0027763ea5cf63fe98184fc4b91445d177a..3bf4ad3f7b3ae64f5e7bfdb6825e9329e5bddd73 100644 --- a/packages/contracts-bedrock/test/invariants/CrossDomainMessenger.t.sol +++ b/packages/contracts-bedrock/test/invariants/CrossDomainMessenger.t.sol @@ -5,12 +5,11 @@ import { StdUtils } from "forge-std/StdUtils.sol"; import { Vm } from "forge-std/Vm.sol"; import { IOptimismPortal } from "src/L1/interfaces/IOptimismPortal.sol"; import { IL1CrossDomainMessenger } from "src/L1/interfaces/IL1CrossDomainMessenger.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; import { Predeploys } from "src/libraries/Predeploys.sol"; import { Constants } from "src/libraries/Constants.sol"; import { Encoding } from "src/libraries/Encoding.sol"; import { Hashing } from "src/libraries/Hashing.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; contract RelayActor is StdUtils { // Storage slot of the l2Sender @@ -88,7 +87,7 @@ contract RelayActor is StdUtils { } } -contract XDM_MinGasLimits is Bridge_Initializer { +contract XDM_MinGasLimits is CommonTest { RelayActor actor; function init(bool doFail) public virtual { diff --git a/packages/contracts-bedrock/test/setup/Bridge_Initializer.sol b/packages/contracts-bedrock/test/setup/Bridge_Initializer.sol deleted file mode 100644 index 6b931712935eaea920b062012c8f4cdcf25648a3..0000000000000000000000000000000000000000 --- a/packages/contracts-bedrock/test/setup/Bridge_Initializer.sol +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.15; - -import { CommonTest } from "test/setup/CommonTest.sol"; -import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import { OptimismMintableERC20 } from "src/universal/OptimismMintableERC20.sol"; -import { LegacyMintableERC20 } from "src/legacy/LegacyMintableERC20.sol"; - -/// @title Bridge_Initializer -/// @dev This contract extends the CommonTest contract with token deployments -/// meant to be used with the bridge contracts. -contract Bridge_Initializer is CommonTest { - ERC20 L1Token; - ERC20 BadL1Token; - OptimismMintableERC20 L2Token; - LegacyMintableERC20 LegacyL2Token; - ERC20 NativeL2Token; - ERC20 BadL2Token; - OptimismMintableERC20 RemoteL1Token; - - function setUp() public virtual override { - super.setUp(); - - L1Token = new ERC20("Native L1 Token", "L1T"); - - LegacyL2Token = new LegacyMintableERC20({ - _l2Bridge: address(l2StandardBridge), - _l1Token: address(L1Token), - _name: string.concat("LegacyL2-", L1Token.name()), - _symbol: string.concat("LegacyL2-", L1Token.symbol()) - }); - vm.label(address(LegacyL2Token), "LegacyMintableERC20"); - - // Deploy the L2 ERC20 now - L2Token = OptimismMintableERC20( - l2OptimismMintableERC20Factory.createStandardL2Token( - address(L1Token), - string(abi.encodePacked("L2-", L1Token.name())), - string(abi.encodePacked("L2-", L1Token.symbol())) - ) - ); - - BadL2Token = OptimismMintableERC20( - l2OptimismMintableERC20Factory.createStandardL2Token( - address(1), - string(abi.encodePacked("L2-", L1Token.name())), - string(abi.encodePacked("L2-", L1Token.symbol())) - ) - ); - - NativeL2Token = new ERC20("Native L2 Token", "L2T"); - - RemoteL1Token = OptimismMintableERC20( - l1OptimismMintableERC20Factory.createStandardL2Token( - address(NativeL2Token), - string(abi.encodePacked("L1-", NativeL2Token.name())), - string(abi.encodePacked("L1-", NativeL2Token.symbol())) - ) - ); - - BadL1Token = OptimismMintableERC20( - l1OptimismMintableERC20Factory.createStandardL2Token( - address(1), - string(abi.encodePacked("L1-", NativeL2Token.name())), - string(abi.encodePacked("L1-", NativeL2Token.symbol())) - ) - ); - } -} diff --git a/packages/contracts-bedrock/test/setup/CommonTest.sol b/packages/contracts-bedrock/test/setup/CommonTest.sol index 679ce200559c99fbb38ead065369b978adda81c4..93ede20b629efdbd7964549a5ec15bea81bfced0 100644 --- a/packages/contracts-bedrock/test/setup/CommonTest.sol +++ b/packages/contracts-bedrock/test/setup/CommonTest.sol @@ -6,7 +6,9 @@ import { Setup } from "test/setup/Setup.sol"; import { Events } from "test/setup/Events.sol"; import { FFIInterface } from "test/setup/FFIInterface.sol"; import { Constants } from "src/libraries/Constants.sol"; -import "scripts/deploy/DeployConfig.s.sol"; +import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import { OptimismMintableERC20 } from "src/universal/OptimismMintableERC20.sol"; +import { LegacyMintableERC20 } from "src/legacy/LegacyMintableERC20.sol"; /// @title CommonTest /// @dev An extenstion to `Test` that sets up the optimism smart contracts. @@ -23,6 +25,14 @@ contract CommonTest is Test, Setup, Events { address customGasToken; bool useInteropOverride; + ERC20 L1Token; + ERC20 BadL1Token; + OptimismMintableERC20 L2Token; + LegacyMintableERC20 LegacyL2Token; + ERC20 NativeL2Token; + ERC20 BadL2Token; + OptimismMintableERC20 RemoteL1Token; + function setUp() public virtual override { alice = makeAddr("alice"); bob = makeAddr("bob"); @@ -65,6 +75,56 @@ contract CommonTest is Test, Setup, Events { Setup.L1(); // Deploy L2 Setup.L2(); + + // Call bridge initializer setup function + bridgeInitializerSetUp(); + } + + function bridgeInitializerSetUp() public { + L1Token = new ERC20("Native L1 Token", "L1T"); + + LegacyL2Token = new LegacyMintableERC20({ + _l2Bridge: address(l2StandardBridge), + _l1Token: address(L1Token), + _name: string.concat("LegacyL2-", L1Token.name()), + _symbol: string.concat("LegacyL2-", L1Token.symbol()) + }); + vm.label(address(LegacyL2Token), "LegacyMintableERC20"); + + // Deploy the L2 ERC20 now + L2Token = OptimismMintableERC20( + l2OptimismMintableERC20Factory.createStandardL2Token( + address(L1Token), + string(abi.encodePacked("L2-", L1Token.name())), + string(abi.encodePacked("L2-", L1Token.symbol())) + ) + ); + + BadL2Token = OptimismMintableERC20( + l2OptimismMintableERC20Factory.createStandardL2Token( + address(1), + string(abi.encodePacked("L2-", L1Token.name())), + string(abi.encodePacked("L2-", L1Token.symbol())) + ) + ); + + NativeL2Token = new ERC20("Native L2 Token", "L2T"); + + RemoteL1Token = OptimismMintableERC20( + l1OptimismMintableERC20Factory.createStandardL2Token( + address(NativeL2Token), + string(abi.encodePacked("L1-", NativeL2Token.name())), + string(abi.encodePacked("L1-", NativeL2Token.symbol())) + ) + ); + + BadL1Token = OptimismMintableERC20( + l1OptimismMintableERC20Factory.createStandardL2Token( + address(1), + string(abi.encodePacked("L1-", NativeL2Token.name())), + string(abi.encodePacked("L1-", NativeL2Token.symbol())) + ) + ); } /// @dev Helper function that wraps `TransactionDeposited` event. diff --git a/packages/contracts-bedrock/test/universal/BenchmarkTest.t.sol b/packages/contracts-bedrock/test/universal/BenchmarkTest.t.sol index a68cccf6862fc24171920c5243211861bf7231da..fd0a9bfc7847f4cf74d404ef621ae175420ff4ea 100644 --- a/packages/contracts-bedrock/test/universal/BenchmarkTest.t.sol +++ b/packages/contracts-bedrock/test/universal/BenchmarkTest.t.sol @@ -5,7 +5,6 @@ pragma solidity 0.8.15; import { Test } from "forge-std/Test.sol"; import { Vm } from "forge-std/Vm.sol"; import { CommonTest } from "test/setup/CommonTest.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; // Libraries import { Types } from "src/libraries/Types.sol"; @@ -110,7 +109,7 @@ contract GasBenchMark_OptimismPortal is CommonTest { } } -contract GasBenchMark_L1CrossDomainMessenger is Bridge_Initializer { +contract GasBenchMark_L1CrossDomainMessenger is CommonTest { function test_sendMessage_benchmark_0() external { vm.pauseGasMetering(); setPrevBaseFee(vm, address(optimismPortal), 1 gwei); @@ -132,7 +131,7 @@ contract GasBenchMark_L1CrossDomainMessenger is Bridge_Initializer { } } -contract GasBenchMark_L1StandardBridge_Deposit is Bridge_Initializer { +contract GasBenchMark_L1StandardBridge_Deposit is CommonTest { function setUp() public virtual override { super.setUp(); deal(address(L1Token), alice, 100000, true); @@ -181,7 +180,7 @@ contract GasBenchMark_L1StandardBridge_Deposit is Bridge_Initializer { } } -contract GasBenchMark_L1StandardBridge_Finalize is Bridge_Initializer { +contract GasBenchMark_L1StandardBridge_Finalize is CommonTest { function setUp() public virtual override { super.setUp(); deal(address(L1Token), address(l1StandardBridge), 100, true); diff --git a/packages/contracts-bedrock/test/universal/CrossDomainMessenger.t.sol b/packages/contracts-bedrock/test/universal/CrossDomainMessenger.t.sol index 065c3e1bc3fcd2fdd6c6cf24e42db2c727e825d0..50398e4a89200c171f0fa049df54af9dc3ac2a90 100644 --- a/packages/contracts-bedrock/test/universal/CrossDomainMessenger.t.sol +++ b/packages/contracts-bedrock/test/universal/CrossDomainMessenger.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.15; // Testing utilities import { Test } from "forge-std/Test.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Libraries import { Predeploys } from "src/libraries/Predeploys.sol"; @@ -14,7 +14,7 @@ import { IL1CrossDomainMessenger } from "src/L1/interfaces/IL1CrossDomainMesseng // CrossDomainMessenger_Test is for testing functionality which is common to both the L1 and L2 // CrossDomainMessenger contracts. For simplicity, we use the L1 Messenger as the test contract. -contract CrossDomainMessenger_BaseGas_Test is Bridge_Initializer { +contract CrossDomainMessenger_BaseGas_Test is CommonTest { /// @dev Ensure that baseGas passes for the max value of _minGasLimit, /// this is about 4 Billion. function test_baseGas_succeeds() external view { @@ -110,7 +110,7 @@ contract ExternalRelay is Test { /// @title CrossDomainMessenger_RelayMessage_Test /// @notice Fuzz tests re-entrancy into the CrossDomainMessenger relayMessage function. -contract CrossDomainMessenger_RelayMessage_Test is Bridge_Initializer { +contract CrossDomainMessenger_RelayMessage_Test is CommonTest { // Storage slot of the l2Sender uint256 constant senderSlotIndex = 50; diff --git a/packages/contracts-bedrock/test/universal/OptimismMintableERC20.t.sol b/packages/contracts-bedrock/test/universal/OptimismMintableERC20.t.sol index 18e0803727453f749c28ea622924b5da7ae09bd8..d56a97b19db34241b5f309f07281fa5ac02dbc05 100644 --- a/packages/contracts-bedrock/test/universal/OptimismMintableERC20.t.sol +++ b/packages/contracts-bedrock/test/universal/OptimismMintableERC20.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.15; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; import { IOptimismMintableERC20 } from "src/universal/interfaces/IOptimismMintableERC20.sol"; import { ILegacyMintableERC20 } from "src/universal/interfaces/ILegacyMintableERC20.sol"; import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; -contract OptimismMintableERC20_Test is Bridge_Initializer { +contract OptimismMintableERC20_Test is CommonTest { event Mint(address indexed account, uint256 amount); event Burn(address indexed account, uint256 amount); diff --git a/packages/contracts-bedrock/test/universal/OptimismMintableERC20Factory.t.sol b/packages/contracts-bedrock/test/universal/OptimismMintableERC20Factory.t.sol index d146b050f387795ba47ba93f1ec5bc976651570b..74df9e729e83b094924c702b137b5e00f603996f 100644 --- a/packages/contracts-bedrock/test/universal/OptimismMintableERC20Factory.t.sol +++ b/packages/contracts-bedrock/test/universal/OptimismMintableERC20Factory.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; import { NextImpl } from "test/mocks/NextImpl.sol"; import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; @@ -14,7 +14,7 @@ import { OptimismMintableERC20Factory } from "src/universal/OptimismMintableERC2 import { IProxy } from "src/universal/interfaces/IProxy.sol"; import { IOptimismMintableERC20Factory } from "src/universal/interfaces/IOptimismMintableERC20Factory.sol"; -contract OptimismMintableTokenFactory_Test is Bridge_Initializer { +contract OptimismMintableTokenFactory_Test is CommonTest { event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken); event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer); diff --git a/packages/contracts-bedrock/test/universal/OptimismMintableERC721.t.sol b/packages/contracts-bedrock/test/universal/OptimismMintableERC721.t.sol index daea00064cf444797b75cdaf78854f6467a846d7..d22e0957a7dfaa201d064597c8d6919ac1a70320 100644 --- a/packages/contracts-bedrock/test/universal/OptimismMintableERC721.t.sol +++ b/packages/contracts-bedrock/test/universal/OptimismMintableERC721.t.sol @@ -5,10 +5,10 @@ import { ERC721, IERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol import { IERC721Enumerable } from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; import { OptimismMintableERC721, IOptimismMintableERC721 } from "src/universal/OptimismMintableERC721.sol"; -contract OptimismMintableERC721_Test is Bridge_Initializer { +contract OptimismMintableERC721_Test is CommonTest { ERC721 internal L1NFT; OptimismMintableERC721 internal L2NFT; diff --git a/packages/contracts-bedrock/test/universal/OptimismMintableERC721Factory.t.sol b/packages/contracts-bedrock/test/universal/OptimismMintableERC721Factory.t.sol index ef9019eafa04f1cdf29aeca5ca7509c38d05efa5..91340001c5e9556a34012dab9305cb04af5dc0ba 100644 --- a/packages/contracts-bedrock/test/universal/OptimismMintableERC721Factory.t.sol +++ b/packages/contracts-bedrock/test/universal/OptimismMintableERC721Factory.t.sol @@ -1,12 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.15; -import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; import { OptimismMintableERC721 } from "src/universal/OptimismMintableERC721.sol"; import { OptimismMintableERC721Factory } from "src/universal/OptimismMintableERC721Factory.sol"; -contract OptimismMintableERC721Factory_Test is Bridge_Initializer { +contract OptimismMintableERC721Factory_Test is CommonTest { event OptimismMintableERC721Created(address indexed localToken, address indexed remoteToken, address deployer); function test_constructor_succeeds() external view { diff --git a/packages/contracts-bedrock/test/vendor/Initializable.t.sol b/packages/contracts-bedrock/test/vendor/Initializable.t.sol index 9d60ab71e7c852a727ca5021d2975da4a28d4a5f..eb43ae187599624fb3518bc369e5986f243b2644 100644 --- a/packages/contracts-bedrock/test/vendor/Initializable.t.sol +++ b/packages/contracts-bedrock/test/vendor/Initializable.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; // Testing -import { Bridge_Initializer } from "test/setup/Bridge_Initializer.sol"; +import { CommonTest } from "test/setup/CommonTest.sol"; // Scripts import { ForgeArtifacts } from "scripts/libraries/ForgeArtifacts.sol"; @@ -11,8 +11,7 @@ import { Process } from "scripts/libraries/Process.sol"; // Libraries import { LibString } from "@solady/utils/LibString.sol"; import { Constants } from "src/libraries/Constants.sol"; -import "src/dispute/lib/Types.sol"; -import "scripts/deploy/Deployer.sol"; +import { GameType } from "src/dispute/lib/Types.sol"; // Interfaces import { ISystemConfig } from "src/L1/interfaces/ISystemConfig.sol"; @@ -26,7 +25,7 @@ import { IAnchorStateRegistry } from "src/dispute/interfaces/IAnchorStateRegistr /// once. This contract inherits from `ERC721Bridge_Initializer` because it is the /// deepest contract in the inheritance chain for setting up the system contracts. /// For each L1 contract both the implementation and the proxy are tested. -contract Initializer_Test is Bridge_Initializer { +contract Initializer_Test is CommonTest { /// @notice Contains the address of an `Initializable` contract and the calldata /// used to initialize it. struct InitializeableContract {