Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
eb5cf574
Commit
eb5cf574
authored
Nov 06, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: cleanup
parent
123409e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
8 deletions
+3
-8
FaultDisputeGame.t.sol
packages/contracts-bedrock/test/FaultDisputeGame.t.sol
+1
-4
OptimismPortal.t.sol
packages/contracts-bedrock/test/OptimismPortal.t.sol
+0
-2
SystemConfig.t.sol
packages/contracts-bedrock/test/SystemConfig.t.sol
+2
-2
No files found.
packages/contracts-bedrock/test/FaultDisputeGame.t.sol
View file @
eb5cf574
...
@@ -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 {
...
...
packages/contracts-bedrock/test/OptimismPortal.t.sol
View file @
eb5cf574
...
@@ -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,
...
...
packages/contracts-bedrock/test/SystemConfig.t.sol
View file @
eb5cf574
...
@@ -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(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment