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
dde7018e
Commit
dde7018e
authored
Feb 14, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lint
parent
43591702
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
L2OutputOracle.sol
packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol
+4
-1
L2OutputOracle.t.sol
...ges/contracts-bedrock/contracts/test/L2OutputOracle.t.sol
+4
-1
No files found.
packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol
View file @
dde7018e
...
@@ -91,7 +91,10 @@ contract L2OutputOracle is Initializable, Semver {
...
@@ -91,7 +91,10 @@ contract L2OutputOracle is Initializable, Semver {
address _challenger
address _challenger
) Semver(1, 0, 0) {
) Semver(1, 0, 0) {
require(_l2BlockTime > 0, "L2OutputOracle: L2 block time must be greater than 0");
require(_l2BlockTime > 0, "L2OutputOracle: L2 block time must be greater than 0");
require(_submissionInterval > _l2BlockTime, "L2OutputOracle: submission interval must be greater than L2 block time");
require(
_submissionInterval > _l2BlockTime,
"L2OutputOracle: submission interval must be greater than L2 block time"
);
SUBMISSION_INTERVAL = _submissionInterval;
SUBMISSION_INTERVAL = _submissionInterval;
L2_BLOCK_TIME = _l2BlockTime;
L2_BLOCK_TIME = _l2BlockTime;
...
...
packages/contracts-bedrock/contracts/test/L2OutputOracle.t.sol
View file @
dde7018e
...
@@ -56,7 +56,10 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
...
@@ -56,7 +56,10 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
);
);
}
}
function testFuzz_constructor_submissionIntervalLteL2BlockTime_reverts(uint256 _submissionInterval, uint256 _l2BlockTime) external {
function testFuzz_constructor_submissionIntervalLteL2BlockTime_reverts(
uint256 _submissionInterval,
uint256 _l2BlockTime
) external {
// Bound the _l2blockTime to be in the range of [1, type(uint256).max]
// Bound the _l2blockTime to be in the range of [1, type(uint256).max]
_l2BlockTime = bound(_l2BlockTime, 1, type(uint256).max);
_l2BlockTime = bound(_l2BlockTime, 1, type(uint256).max);
// Roll the block number to _l2blockTime (the starting L2 timestamp must be less than or equal to the current time)
// Roll the block number to _l2blockTime (the starting L2 timestamp must be less than or equal to the current time)
...
...
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