Skip to content

Commit

Permalink
change verify scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
danoctavian committed Oct 8, 2024
1 parent 807db4d commit b71a230
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion script/VerifyL1OFTAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
8 changes: 5 additions & 3 deletions script/VerifyL2OFTAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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");
}

Expand All @@ -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");
}

Expand Down

0 comments on commit b71a230

Please sign in to comment.