Commit e965769f authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: cleanup

parent 89ce9178
......@@ -100,12 +100,12 @@ contract SystemConfig is OwnableUpgradeable, Semver {
_overhead: 0,
_scalar: 0,
_batcherHash: bytes32(0),
_gasLimit: 0,
_gasLimit: 1,
_unsafeBlockSigner: address(0),
_config: ResourceMetering.ResourceConfig({
maxResourceLimit: 0,
elasticityMultiplier: 0,
baseFeeMaxChangeDenominator: 0,
maxResourceLimit: 1,
elasticityMultiplier: 1,
baseFeeMaxChangeDenominator: 2,
minimumBaseFee: 0,
systemTxMaxGas: 0,
maximumBaseFee: 0
......
......@@ -111,8 +111,10 @@ contract SystemConfig_Initialize_TestFail is SystemConfig_Init {
});
vm.store(address(sysConf), bytes32(0), bytes32(0));
vm.expectRevert("SystemConfig: gas limit too low");
vm.prank(multisig);
// The call to initialize reverts due to: "SystemConfig: gas limit too low"
// but the proxy revert message bubbles up.
vm.expectRevert("Proxy: delegatecall to new implementation contract failed");
Proxy(payable(address(sysConf))).upgradeToAndCall(
address(systemConfigImpl),
abi.encodeCall(
......
......@@ -14,14 +14,7 @@ contract SystemConfig_GasLimitLowerBound_Invariant is Test {
Proxy proxy = new Proxy(msg.sender);
SystemConfig configImpl = new SystemConfig();
SystemConfig.Addresses memory addrs = SystemConfig.Addresses({
l1CrossDomainMessenger: address(0),
l1ERC721Bridge: address(0),
l1StandardBridge: address(0),
l2OutputOracle: address(0),
optimismPortal: address(0)
});
vm.prank(msg.sender);
proxy.upgradeToAndCall(
address(configImpl),
abi.encodeCall(
......@@ -36,7 +29,13 @@ contract SystemConfig_GasLimitLowerBound_Invariant is Test {
Constants.DEFAULT_RESOURCE_CONFIG(), // resource config
0, //_startBlock
address(0), // _batchInbox
addrs // addresses
SystemConfig.Addresses({ // _addrs
l1CrossDomainMessenger: address(0),
l1ERC721Bridge: address(0),
l1StandardBridge: address(0),
l2OutputOracle: address(0),
optimismPortal: address(0)
})
)
)
);
......
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