Commit 078e0169 authored by Blaine Malone's avatar Blaine Malone Committed by GitHub

OPCM: DepolyOPChain additional testing checks. (#12355)

* OPCM: DepolyOPChain additional testing checks.

* fix: absolute prestate.

* fix: adding to assertions.

* fix: maxClockDuration check added.
parent b4171c30
......@@ -387,6 +387,11 @@ contract DeployOPChainOutput is BaseDeployIO {
require(address(game.weth()) == address(delayedWETHPermissionedGameProxy()), "DPG-40");
require(address(game.anchorStateRegistry()) == address(anchorStateRegistryProxy()), "DPG-50");
require(game.l2ChainId() == _doi.l2ChainId(), "DPG-60");
require(game.l2BlockNumber() == 0, "DPG-70");
require(Duration.unwrap(game.clockExtension()) == 10800, "DPG-80");
require(Duration.unwrap(game.maxClockDuration()) == 302400, "DPG-110");
require(game.splitDepth() == 30, "DPG-90");
require(game.maxGameDepth() == 73, "DPG-100");
}
function assertValidAnchorStateRegistryProxy(DeployOPChainInput) internal {
......@@ -405,6 +410,10 @@ contract DeployOPChainOutput is BaseDeployIO {
require(
address(anchorStateRegistryProxy().disputeGameFactory()) == address(disputeGameFactoryProxy()), "ANCHORP-30"
);
(Hash actualRoot,) = anchorStateRegistryProxy().anchors(GameTypes.PERMISSIONED_CANNON);
bytes32 expectedRoot = 0xdead000000000000000000000000000000000000000000000000000000000000;
require(Hash.unwrap(actualRoot) == expectedRoot, "ANCHORP-40");
}
function assertValidAnchorStateRegistryImpl(DeployOPChainInput) internal view {
......
......@@ -544,6 +544,19 @@ contract DeployOPChain_Test is DeployOPChain_TestBase {
assertEq(doo.disputeGameFactoryProxy().initBonds(GameTypes.CANNON), 0, "2700");
assertEq(doo.disputeGameFactoryProxy().initBonds(GameTypes.PERMISSIONED_CANNON), 0, "2800");
(Hash actualRoot,) = doo.anchorStateRegistryProxy().anchors(GameTypes.PERMISSIONED_CANNON);
assertEq(Hash.unwrap(actualRoot), 0xdead000000000000000000000000000000000000000000000000000000000000, "2900");
assertEq(doo.permissionedDisputeGame().l2BlockNumber(), 0, "3000");
assertEq(
Claim.unwrap(doo.permissionedDisputeGame().absolutePrestate()),
0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c,
"3100"
);
assertEq(Duration.unwrap(doo.permissionedDisputeGame().clockExtension()), 10800, "3200");
assertEq(Duration.unwrap(doo.permissionedDisputeGame().maxClockDuration()), 302400, "3300");
assertEq(doo.permissionedDisputeGame().splitDepth(), 30, "3400");
assertEq(doo.permissionedDisputeGame().maxGameDepth(), 73, "3500");
// Most architecture assertions are handled within the OP Contracts Manager itself and therefore
// we only assert on the things that are not visible onchain.
// TODO add these assertions: AddressManager, Proxy, ProxyAdmin, etc.
......
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