Commit eb5cf574 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: cleanup

parent 123409e3
...@@ -138,14 +138,11 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init { ...@@ -138,14 +138,11 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
/// to dispute the first output root by using genesis as the starting point. /// to dispute the first output root by using genesis as the starting point.
/// For now, it is critical that the first proposed output root of an OP stack /// For now, it is critical that the first proposed output root of an OP stack
/// chain is done so by an honest party. /// chain is done so by an honest party.
/*
function test_initialize_firstOutput_reverts() public { function test_initialize_firstOutput_reverts() public {
uint256 submissionInterval = oracle.SUBMISSION_INTERVAL(); uint256 submissionInterval = l2OutputOracle.submissionInterval();
vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x11)); vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x11));
factory.create(GAME_TYPE, ROOT_CLAIM, abi.encode(submissionInterval, block.number - 1)); factory.create(GAME_TYPE, ROOT_CLAIM, abi.encode(submissionInterval, block.number - 1));
} }
*/
/// @dev Tests that the `create` function reverts when the rootClaim does not disagree with the outcome. /// @dev Tests that the `create` function reverts when the rootClaim does not disagree with the outcome.
function testFuzz_initialize_badRootStatus_reverts(Claim rootClaim, bytes calldata extraData) public { function testFuzz_initialize_badRootStatus_reverts(Claim rootClaim, bytes calldata extraData) public {
......
...@@ -984,8 +984,6 @@ contract OptimismPortalResourceFuzz_Test is CommonTest { ...@@ -984,8 +984,6 @@ contract OptimismPortalResourceFuzz_Test is CommonTest {
// Pick a pseudorandom block number // Pick a pseudorandom block number
vm.roll(uint256(keccak256(abi.encode(_blockDiff))) % uint256(type(uint16).max) + uint256(_blockDiff)); vm.roll(uint256(keccak256(abi.encode(_blockDiff))) % uint256(type(uint16).max) + uint256(_blockDiff));
vm.roll(uint256(keccak256(abi.encode(_blockDiff))) % uint256(type(uint16).max));
// Create a resource config to mock the call to the system config with // Create a resource config to mock the call to the system config with
ResourceMetering.ResourceConfig memory rcfg = ResourceMetering.ResourceConfig({ ResourceMetering.ResourceConfig memory rcfg = ResourceMetering.ResourceConfig({
maxResourceLimit: _maxResourceLimit, maxResourceLimit: _maxResourceLimit,
......
...@@ -6,6 +6,7 @@ import { CommonTest } from "test/setup/CommonTest.sol"; ...@@ -6,6 +6,7 @@ import { CommonTest } from "test/setup/CommonTest.sol";
// Libraries // Libraries
import { Constants } from "src/libraries/Constants.sol"; import { Constants } from "src/libraries/Constants.sol";
import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol";
// Target contract dependencies // Target contract dependencies
import { ResourceMetering } from "src/L1/ResourceMetering.sol"; import { ResourceMetering } from "src/L1/ResourceMetering.sol";
...@@ -121,8 +122,7 @@ contract SystemConfig_Initialize_Test is SystemConfig_Init { ...@@ -121,8 +122,7 @@ contract SystemConfig_Initialize_Test is SystemConfig_Init {
vm.store(address(systemConfig), bytes32(uint256(106)), bytes32(uint256(0xff))); vm.store(address(systemConfig), bytes32(uint256(106)), bytes32(uint256(0xff)));
// Initialize with a non zero start block, should see a revert // Initialize with a non zero start block, should see a revert
address admin = address(uint160(uint256(vm.load(address(systemConfig), Constants.PROXY_OWNER_ADDRESS)))); vm.prank(EIP1967Helper.getAdmin(address(systemConfig)));
vm.prank(admin);
// The call to initialize reverts due to: "SystemConfig: cannot override an already set start block" // The call to initialize reverts due to: "SystemConfig: cannot override an already set start block"
// but the proxy revert message bubbles up. // but the proxy revert message bubbles up.
Proxy(payable(address(systemConfig))).upgradeToAndCall( Proxy(payable(address(systemConfig))).upgradeToAndCall(
......
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