Skip to content

Commit

Permalink
feat: fix non-upgrader test
Browse files Browse the repository at this point in the history
  • Loading branch information
maurelian committed Jan 23, 2025
1 parent 216d427 commit 9e3ebae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/contracts-bedrock/test/L1/OPContractsManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ contract OPContractsManager_Upgrade_Test is OPContractsManager_Upgrade_Harness {
// Predict the address of the new AnchorStateRegistry proxy
bytes32 salt = keccak256(abi.encode(l2ChainId, "v2.0.0", "AnchorStateRegistry"));
bytes memory initCode = bytes.concat(vm.getCode("Proxy"), abi.encode(proxyAdmin));
address newAnchorStateRegistryProxy = vm.computeCreate2Address(salt, keccak256(initCode), upgrader);
address newAnchorStateRegistryProxy = vm.computeCreate2Address(salt, keccak256(initCode), delegateCaller);
vm.label(newAnchorStateRegistryProxy, "NewAnchorStateRegistryProxy");

expectEmitUpgraded(impls.systemConfigImpl, address(systemConfig));
Expand Down Expand Up @@ -336,7 +336,8 @@ contract OPContractsManager_Upgrade_Test is OPContractsManager_Upgrade_Harness {
}

// Set the proxy admin owner to be the non-upgrade controller
vm.store(address(proxyAdmin), bytes32(0), bytes32(uint256(uint160(_nonUpgradeController))));
vm.store(address(proxyAdmin), bytes32(ForgeArtifacts.getSlot("ProxyAdmin", "_owner").slot), bytes32(uint256(uint160(_nonUpgradeController))));
vm.store(address(disputeGameFactory), bytes32(ForgeArtifacts.getSlot("DisputeGameFactory", "_owner").slot), bytes32(uint256(uint160(_nonUpgradeController))));

// Run the upgrade test and checks
runUpgradeTestAndChecks(_nonUpgradeController);
Expand Down

0 comments on commit 9e3ebae

Please sign in to comment.