@@ -210,17 +210,16 @@ contract OPContractsManager_Upgrade_Harness is CommonTest, DisputeGames {
210210 address superchainPAO = IProxyAdmin (EIP1967Helper.getAdmin (address (superchainConfig))).owner ();
211211
212212 // Execute the SuperchainConfig upgrade.
213- // nosemgrep: sol-safety-trycatch-eip150)
214213 vm.prank (superchainPAO, true );
215- (bool success , bytes memory returndata ) =
214+ (bool success , bytes memory reason ) =
216215 address (_opcm).delegatecall (abi.encodeCall (IOPContractsManager.upgradeSuperchainConfig, (superchainConfig)));
217216 if (success == false ) {
218217 // Only acceptable revert reason is the SuperchainConfig already being up to date. This
219218 // try/catch is better than checking the version via the implementations struct because
220219 // the implementations struct interface can change between OPCM versions which would
221220 // cause the test to break and be a pain to resolve.
222221 assertTrue (
223- bytes4 (returndata )
222+ bytes4 (reason )
224223 == IOPContractsManagerUpgrader.OPContractsManagerUpgrader_SuperchainConfigAlreadyUpToDate.selector ,
225224 "Revert reason other than SuperchainConfigAlreadyUpToDate "
226225 );
@@ -231,6 +230,11 @@ contract OPContractsManager_Upgrade_Harness is CommonTest, DisputeGames {
231230 vm.expectRevert (_revertBytes);
232231 }
233232
233+ // Execute the chain upgrade.
234+ if (_delegateCaller.code.length > 0 ) {
235+ // Foundry fails with "cannot `prank` delegate call from an EOA" if empty
236+ vm.etch (_delegateCaller, hex "00 " );
237+ }
234238 vm.prank (_delegateCaller, true );
235239 (bool upgradeSuccess ,) =
236240 address (_opcm).delegatecall (abi.encodeCall (IOPContractsManager.upgrade, (opChainConfigs)));
@@ -1057,7 +1061,7 @@ contract OPContractsManager_UpdatePrestate_Test is OPContractsManager_TestInit {
10571061 IOPContractsManager.UpdatePrestateInput[] memory inputs = new IOPContractsManager.UpdatePrestateInput [](1 );
10581062 inputs[0 ] = _input;
10591063
1060- // cache the proxy admin owner before the revert check
1064+ // make the call to cache the proxy admin owner before the revert check
10611065 address proxyAdminOwner = chainDeployOutput1.opChainProxyAdmin.owner ();
10621066 if (_revertBytes.length > 0 ) {
10631067 vm.expectRevert (_revertBytes);
0 commit comments