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
70d0dd4a
Commit
70d0dd4a
authored
Aug 02, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: fixup test
contracts-bedrock: gas-snapshot
parent
a5414d36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
22 deletions
+5
-22
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+1
-0
L2OutputOracle.t.sol
packages/contracts-bedrock/test/L2OutputOracle.t.sol
+4
-22
No files found.
packages/contracts-bedrock/.gas-snapshot
View file @
70d0dd4a
...
...
@@ -239,6 +239,7 @@ L2OutputOracleUpgradeable_Test:test_initValuesOnProxy_succeeds() (gas: 46738)
L2OutputOracleUpgradeable_Test:test_initializeImpl_alreadyInitialized_reverts() (gas: 15216)
L2OutputOracleUpgradeable_Test:test_initializeProxy_alreadyInitialized_reverts() (gas: 20216)
L2OutputOracleUpgradeable_Test:test_upgrading_succeeds() (gas: 191346)
L2OutputOracle_constructor_Test:test_constructor_badTimestamp_reverts() (gas: 12353)
L2OutputOracle_constructor_Test:test_constructor_l2BlockTimeZero_reverts() (gas: 39147)
L2OutputOracle_constructor_Test:test_constructor_submissionInterval_reverts() (gas: 39157)
L2OutputOracle_constructor_Test:test_constructor_succeeds() (gas: 51712)
...
...
packages/contracts-bedrock/test/L2OutputOracle.t.sol
View file @
70d0dd4a
...
...
@@ -52,37 +52,19 @@ contract L2OutputOracle_constructor_Test is L2OutputOracle_Initializer {
});
}
/* For some reason, this test causes foundry to stack overflow
/// @dev Tests that the constructor reverts if the starting timestamp is invalid.
function test_constructor_badTimestamp_reverts() external {
Proxy proxy = new Proxy({
_admin: alice
});
vm.store(address(proxy), bytes32(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc), bytes32(uint256(uint160(address(oracle)))));
// Reset the initialized field in the 0th storage slot
// so that initialize can be called again.
vm.store(address(oracle), bytes32(uint256(0)), bytes32(uint256(0)));
vm.expectRevert("L2OutputOracle: starting L2 timestamp must be less than current time");
proxy.upgradeToAndCall({
_implementation: address(oracle),
_data: abi.encodeCall(
L2OutputOracle.initialize,
(
0,
block.timestamp + 1,
address(0),
address(0)
)
)
});
L2OutputOracle(address(proxy)).initialize({
oracle.initialize({
_startingBlockNumber: 0,
_startingTimestamp: block.timestamp + 1,
_proposer: address(0),
_challenger: address(0)
});
}
*/
}
contract L2OutputOracle_getter_Test is L2OutputOracle_Initializer {
...
...
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