From b71a230fce6d05a52060a14d39df3c0d838478be Mon Sep 17 00:00:00 2001 From: danoctavian Date: Tue, 8 Oct 2024 03:10:49 +0300 Subject: [PATCH] change verify scripts --- script/VerifyL1OFTAdapter.s.sol | 4 +++- script/VerifyL2OFTAdapter.s.sol | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/script/VerifyL1OFTAdapter.s.sol b/script/VerifyL1OFTAdapter.s.sol index 9abee79..8ce376f 100644 --- a/script/VerifyL1OFTAdapter.s.sol +++ b/script/VerifyL1OFTAdapter.s.sol @@ -43,7 +43,9 @@ contract VerifyL1OFTAdapter is BaseScript, BatchScript { } vm.prank(getData(block.chainid).PROXY_ADMIN); - if (ITransparentUpgradeableProxy(address(l1OFTAdapter)).admin() != getData(block.chainid).PROXY_ADMIN) { + if ( + getTransparentUpgradeableProxyAdminAddress(address(l1OFTAdapter)) != getData(block.chainid).PROXY_ADMIN + ) { revert("L1 OFT Adapter proxy admin not set"); } diff --git a/script/VerifyL2OFTAdapter.s.sol b/script/VerifyL2OFTAdapter.s.sol index 9dc1a85..9dd91ec 100644 --- a/script/VerifyL2OFTAdapter.s.sol +++ b/script/VerifyL2OFTAdapter.s.sol @@ -14,7 +14,7 @@ import {RateLimiter} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/utils/Ra import { ITransparentUpgradeableProxy, TransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +} from "@openzeppelin/contracts-5/proxy/transparent/TransparentUpgradeableProxy.sol"; import {console} from "forge-std/console.sol"; // forge script script/VerifyL2OFTAdapter.s.sol:DeployL2Adapter \ @@ -67,7 +67,9 @@ contract VerifyL2OFTAdapter is BaseScript, BatchScript { } vm.prank(getData(block.chainid).PROXY_ADMIN); - if (ITransparentUpgradeableProxy(address(l2OFTAdapter)).admin() != getData(block.chainid).PROXY_ADMIN) { + if ( + getTransparentUpgradeableProxyAdminAddress(address(l2OFTAdapter)) != getData(block.chainid).PROXY_ADMIN + ) { revert("L2 OFT Adapter proxy admin not set"); } @@ -83,7 +85,7 @@ contract VerifyL2OFTAdapter is BaseScript, BatchScript { } vm.prank(getData(block.chainid).PROXY_ADMIN); - if (ITransparentUpgradeableProxy(address(l2ERC20)).admin() != getData(block.chainid).PROXY_ADMIN) { + if (getTransparentUpgradeableProxyAdminAddress(address(l2ERC20)) != getData(block.chainid).PROXY_ADMIN) { revert("L2 ERC20 proxy admin not set"); }