Commit 8eada51c authored by Maurelian's avatar Maurelian Committed by GitHub

Add error codes to ChainAssertions (#12279)

* feat: Add reasons to checkOptimismPortal2

* feat: log if impl of proxy add more functions

* feat: More ChainAssertions reason strings

* feat: checkDisputeGameFactory for isProxy

* feat: Final checkAssertions error codes
parent 35426c1f
......@@ -757,7 +757,7 @@ contract Deploy is Deployer {
// `DisputeGameFactory` implementation alongside dependent contracts, which are always proxies.
Types.ContractSet memory contracts = _proxiesUnstrict();
contracts.DisputeGameFactory = address(factory);
ChainAssertions.checkDisputeGameFactory({ _contracts: contracts, _expectedOwner: address(0) });
ChainAssertions.checkDisputeGameFactory({ _contracts: contracts, _expectedOwner: address(0), _isProxy: true });
addr_ = address(factory);
}
......@@ -957,7 +957,11 @@ contract Deploy is Deployer {
string memory version = IDisputeGameFactory(disputeGameFactoryProxy).version();
console.log("DisputeGameFactory version: %s", version);
ChainAssertions.checkDisputeGameFactory({ _contracts: _proxiesUnstrict(), _expectedOwner: msg.sender });
ChainAssertions.checkDisputeGameFactory({
_contracts: _proxiesUnstrict(),
_expectedOwner: msg.sender,
_isProxy: true
});
}
function initializeDelayedWETH() public broadcast {
......@@ -1345,7 +1349,11 @@ contract Deploy is Deployer {
disputeGameFactory.transferOwnership(finalSystemOwner);
console.log("DisputeGameFactory ownership transferred to final system owner at: %s", finalSystemOwner);
}
ChainAssertions.checkDisputeGameFactory({ _contracts: _proxiesUnstrict(), _expectedOwner: finalSystemOwner });
ChainAssertions.checkDisputeGameFactory({
_contracts: _proxiesUnstrict(),
_expectedOwner: finalSystemOwner,
_isProxy: true
});
}
/// @notice Transfer ownership of the DelayedWETH contract to the final system owner
......
......@@ -172,7 +172,7 @@ contract FPACOPS is Deploy, StdAssertions {
address dgfProxyAddr = mustGetAddress("DisputeGameFactoryProxy");
IDisputeGameFactory dgfProxy = IDisputeGameFactory(dgfProxyAddr);
assertEq(address(uint160(uint256(vm.load(dgfProxyAddr, Constants.PROXY_OWNER_ADDRESS)))), _proxyAdmin);
ChainAssertions.checkDisputeGameFactory(contracts, _finalSystemOwner);
ChainAssertions.checkDisputeGameFactory(contracts, _finalSystemOwner, true);
address wethProxyAddr = mustGetAddress("DelayedWETHProxy");
assertEq(address(uint160(uint256(vm.load(wethProxyAddr, Constants.PROXY_OWNER_ADDRESS)))), _proxyAdmin);
ChainAssertions.checkDelayedWETH(contracts, cfg, true, _finalSystemOwner);
......
......@@ -224,7 +224,7 @@ contract FPACOPS2 is Deploy, StdAssertions {
assertEq(address(uint160(uint256(vm.load(soyWethProxyAddr, Constants.PROXY_OWNER_ADDRESS)))), _proxyAdmin);
// Run standard assertions for DGF and DelayedWETH.
ChainAssertions.checkDisputeGameFactory(contracts, _finalSystemOwner);
ChainAssertions.checkDisputeGameFactory(contracts, _finalSystemOwner, true);
ChainAssertions.checkDelayedWETH(contracts, cfg, true, _finalSystemOwner);
ChainAssertions.checkPermissionedDelayedWETH(contracts, cfg, true, _finalSystemOwner);
......
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