diff --git a/test/CrossChainBaseTest.t.sol b/test/CrossChainBaseTest.t.sol index 8bb2289..8a603f5 100644 --- a/test/CrossChainBaseTest.t.sol +++ b/test/CrossChainBaseTest.t.sol @@ -11,10 +11,9 @@ import {L2YnOFTAdapterUpgradeable} from "@adapters/L2YnOFTAdapterUpgradeable.sol import {RateLimiter} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/utils/RateLimiter.sol"; import {ERC20Mock} from "@layerzerolabs/lz-evm-oapp-v2/test/mocks/ERC20Mock.sol"; import {EndpointV2} from "@layerzerolabs/lz-evm-protocol-v2/contracts/EndpointV2.sol"; -import {TestHelper} from "@layerzerolabs/lz-evm-oapp-v2/test/TestHelper.sol"; import "forge-std/console.sol"; -contract CrossChainBaseTest is TestHelper { +contract CrossChainBaseTest is Test { ImmutableMultiChainDeployer public mainnetDeployer; ImmutableMultiChainDeployer public optimismDeployer; ImmutableMultiChainDeployer public arbitrumDeployer; @@ -49,7 +48,7 @@ contract CrossChainBaseTest is TestHelper { uint32 optimismEid; uint32 arbitrumEid; - function setUp() public virtual override { + function setUp() public virtual { // create forks optimismFork = vm.createFork(vm.envString("OPTIMISM_RPC_URL"), 124909408); arbitrumFork = vm.createFork(vm.envString("ARBITRUM_RPC_URL"), 249855816); @@ -148,10 +147,6 @@ contract CrossChainBaseTest is TestHelper { } vm.stopPrank(); - endpoints[mainnetEid] = address(mainnetLzEndpoint); - endpoints[optimismEid] = address(optimismLzEndpoint); - endpoints[arbitrumEid] = address(arbitrumLzEndpoint); - vm.startPrank(_owner); vm.selectFork(optimismFork); optimismERC20.grantRole(optimismERC20.MINTER_ROLE(), address(optimismOFTAdapter)); diff --git a/test/L1YnOFTAdapterUpgradeable.t.sol b/test/OFTCrossChain.t.sol similarity index 96% rename from test/L1YnOFTAdapterUpgradeable.t.sol rename to test/OFTCrossChain.t.sol index 16fd916..af2d68f 100644 --- a/test/L1YnOFTAdapterUpgradeable.t.sol +++ b/test/OFTCrossChain.t.sol @@ -18,7 +18,7 @@ import { IOFT, SendParam, OFTReceipt } from "@layerzerolabs/lz-evm-oapp-v2/contracts-upgradeable/oft/interfaces/IOFT.sol"; -contract Test_L1YnOFTAdapterUpgradeable is CrossChainBaseTest { +contract OFTCrossChainTest is CrossChainBaseTest { using OptionsBuilder for bytes; address public userA = address(0x1); @@ -132,4 +132,8 @@ contract Test_L1YnOFTAdapterUpgradeable is CrossChainBaseTest { // vm.selectFork(arbitrumFork); // assertEq(arbitrumERC20.balanceOf(userB), initialBalance + tokensToSend); } + + function addressToBytes32(address _addr) internal pure returns (bytes32) { + return bytes32(uint256(uint160(_addr))); + } }