Commit b1dfd743 authored by Matt Solomon's avatar Matt Solomon Committed by GitHub

OPCM: Adds a test, cleans up some TODOs, new justfile command (#12182)

* add missing assertion and remove unneeded todo comments

* chore: semver lock + pre-pr-no-build

* chore: rename function
parent 289cd71b
......@@ -197,7 +197,11 @@ check: gas-snapshot-check-no-build kontrol-deployment-check snapshots-check-no-b
########################################################
# Cleans, builds, lints, and runs all checks.
pre-pr: clean build-go-ffi build lint gas-snapshot-no-build snapshots-no-build semver-lock check
pre-pr: clean pre-pr-no-build
# Builds, lints, and runs all checks. Sometimes a bad cache causes issues, in which case the above
# `pre-pr` is preferred. But in most cases this will be sufficient and much faster then a full build.
pre-pr-no-build: build-go-ffi build lint gas-snapshot-no-build snapshots-no-build semver-lock check
# Fixes linting errors.
lint-fix:
......
......@@ -307,7 +307,7 @@ contract DeployOPChainOutput is BaseDeployIO {
function assertValidDeploy(DeployOPChainInput _doi) internal {
assertValidAnchorStateRegistryImpl(_doi);
assertValidAnchorStateRegistryProxy(_doi);
assertValidDelayedWETHs(_doi);
assertValidDelayedWETH(_doi);
assertValidDisputeGameFactory(_doi);
assertValidL1CrossDomainMessenger(_doi);
assertValidL1ERC721Bridge(_doi);
......@@ -482,8 +482,15 @@ contract DeployOPChainOutput is BaseDeployIO {
require(factory.owner() == address(_doi.opChainProxyAdminOwner()), "DF-20");
}
function assertValidDelayedWETHs(DeployOPChainInput) internal view {
// TODO add in once FP support is added.
function assertValidDelayedWETH(DeployOPChainInput _doi) internal {
DelayedWETH permissioned = delayedWETHPermissionedGameProxy();
require(permissioned.owner() == address(_doi.opChainProxyAdminOwner()), "DWETH-10");
Proxy proxy = Proxy(payable(address(permissioned)));
vm.prank(address(0));
address admin = proxy.admin();
require(admin == address(opChainProxyAdmin()), "DWETH-20");
}
}
......
......@@ -195,7 +195,6 @@ contract DeploySuperchainOutput is BaseDeployIO {
require(actualSuperchainConfigImpl == address(_superchainConfigImpl), "100");
require(actualProtocolVersionsImpl == address(_protocolVersionsImpl), "200");
// TODO Also add the assertions for the implementation contracts from ChainAssertions.sol
assertValidDeploy(_dsi);
}
......
......@@ -32,8 +32,8 @@
"sourceCodeHash": "0xde4df0f9633dc0cdb1c9f634003ea5b0f7c5c1aebc407bc1b2f44c0ecf938649"
},
"src/L1/OPContractsManager.sol": {
"initCodeHash": "0x7c5d90928ce882ed5360939722271e9af36e81c394e4110ba32864b14c3d78be",
"sourceCodeHash": "0x25372ad554eaeb64d7512e19642210bb3736e4047ea97518b2992b3ab67e1a5d"
"initCodeHash": "0xf64b41f5ec9a94ddbac484f2bdcb5792bf71e66ed6197d172cfd4592311f9b85",
"sourceCodeHash": "0x0ac3668c5f1ccbd49713a4e079f0dafb5cc45eca8de33e0faf0f01b1b989da89"
},
"src/L1/OptimismPortal.sol": {
"initCodeHash": "0xbe2c0c81b3459014f287d8c89cdc0d27dde5d1f44e5d024fa1e4773ddc47c190",
......
......@@ -128,8 +128,8 @@ contract OPContractsManager is ISemver, Initializable {
// -------- Constants and Variables --------
/// @custom:semver 1.0.0-beta.15
string public constant version = "1.0.0-beta.15";
/// @custom:semver 1.0.0-beta.16
string public constant version = "1.0.0-beta.16";
/// @notice Represents the interface version so consumers know how to decode the DeployOutput struct
/// that's emitted in the `Deployed` event. Whenever that struct changes, a new version should be used.
......@@ -433,8 +433,6 @@ contract OPContractsManager is ISemver, Initializable {
virtual
returns (bytes memory)
{
_output;
// TODO make GameTypes.CANNON an input once FPs are supported
return abi.encodeWithSelector(
_selector,
_output.disputeGameFactoryProxy,
......@@ -473,7 +471,7 @@ contract OPContractsManager is ISemver, Initializable {
_input.basefeeScalar,
_input.blobBasefeeScalar,
bytes32(uint256(uint160(_input.roles.batcher))), // batcherHash
30_000_000, // gasLimit, TODO should this be an input?
30_000_000,
_input.roles.unsafeBlockSigner,
referenceResourceConfig,
chainIdToBatchInboxAddress(_input.l2ChainId),
......@@ -490,7 +488,7 @@ contract OPContractsManager is ISemver, Initializable {
_input.basefeeScalar,
_input.blobBasefeeScalar,
bytes32(uint256(uint160(_input.roles.batcher))), // batcherHash
30_000_000, // gasLimit, TODO should this be an input?
30_000_000,
_input.roles.unsafeBlockSigner,
referenceResourceConfig,
chainIdToBatchInboxAddress(_input.l2ChainId),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment