Skip to content

Commit a8fe8d1

Browse files
committed
fix delegatecall from eoa
1 parent fd308b4 commit a8fe8d1

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

packages/contracts-bedrock/src/L1/opcm/OPContractsManagerV2.sol

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,13 @@ contract OPContractsManagerV2 is ISemver {
10961096

10971097
// ChugSplashProxy requires setting the proxy type on the ProxyAdmin.
10981098
_args.proxyAdmin.setProxyType(ret, IProxyAdmin.ProxyType.CHUGSPLASH);
1099-
} else if (LibString.eq(_contractName, "L1CrossDomainMessenger")) {
1099+
1100+
// Emit the proxy creation event and return the proxy address.
1101+
emit ProxyCreation(_contractName, ret);
1102+
return payable(ret);
1103+
}
1104+
1105+
if (LibString.eq(_contractName, "L1CrossDomainMessenger")) {
11001106
// L1CrossDomainMessenger is a special case ResolvedDelegateProxy (legacy).
11011107
string memory l1XdmName = "OVM_L1CrossDomainMessenger";
11021108
ret = Blueprint.deployFrom(
@@ -1108,19 +1114,21 @@ contract OPContractsManagerV2 is ISemver {
11081114
// ResolvedDelegateProxy requires setting the proxy type on the ProxyAdmin.
11091115
_args.proxyAdmin.setProxyType(ret, IProxyAdmin.ProxyType.RESOLVED);
11101116
_args.proxyAdmin.setImplementationName(ret, l1XdmName);
1111-
} else {
1112-
// Otherwise this is a normal proxy.
1113-
ret = Blueprint.deployFrom(
1114-
blueprints().proxy,
1115-
_computeSalt(_args.l2ChainId, _args.saltMixer, _contractName),
1116-
abi.encode(_args.proxyAdmin)
1117-
);
1117+
1118+
// Emit the proxy creation event and return the proxy address.
1119+
emit ProxyCreation(_contractName, ret);
1120+
return payable(ret);
11181121
}
11191122

1120-
// Emit the proxy creation event.
1121-
emit ProxyCreation(_contractName, ret);
1123+
// Otherwise this is a normal proxy.
1124+
ret = Blueprint.deployFrom(
1125+
blueprints().proxy,
1126+
_computeSalt(_args.l2ChainId, _args.saltMixer, _contractName),
1127+
abi.encode(_args.proxyAdmin)
1128+
);
11221129

1123-
// Return the final deployment result.
1130+
// Emit the proxy creation event and return the proxy address.
1131+
emit ProxyCreation(_contractName, ret);
11241132
return payable(ret);
11251133
}
11261134

0 commit comments

Comments
 (0)