Skip to content

Commit 4c9b710

Browse files
committed
fix updatePrestate call testing
1 parent 16ed9ef commit 4c9b710

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/contracts-bedrock/test/L1/OPContractsManager.t.sol

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,14 +1057,17 @@ contract OPContractsManager_UpdatePrestate_Test is OPContractsManager_TestInit {
10571057
IOPContractsManager.UpdatePrestateInput[] memory inputs = new IOPContractsManager.UpdatePrestateInput[](1);
10581058
inputs[0] = _input;
10591059

1060+
// cache the proxy admin owner before the revert check
1061+
address proxyAdminOwner = chainDeployOutput1.opChainProxyAdmin.owner();
10601062
if (_revertBytes.length > 0) {
10611063
vm.expectRevert(_revertBytes);
10621064
}
10631065

10641066
// Trigger the updatePrestate function.
1065-
address proxyAdminOwner = chainDeployOutput1.opChainProxyAdmin.owner();
10661067
vm.prank(proxyAdminOwner, true);
1067-
prestateUpdater.updatePrestate(inputs);
1068+
(bool success,) =
1069+
address(prestateUpdater).delegatecall(abi.encodeCall(IOPContractsManager.updatePrestate, (inputs)));
1070+
assertTrue(success, "updatePrestate failed");
10681071

10691072
// Return early if a revert was expected. Otherwise we'll get errors below.
10701073
if (_revertBytes.length > 0) {

0 commit comments

Comments
 (0)