Commit 490fd116 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4935 from ethereum-optimism/fix/test-cleanup-2

contracts-bedrock: cleanup tests
parents e0673b59 e8079389
...@@ -158,7 +158,7 @@ L2OutputOracleTest:test_constructor_badTimestamp_reverts() (gas: 70767) ...@@ -158,7 +158,7 @@ L2OutputOracleTest:test_constructor_badTimestamp_reverts() (gas: 70767)
L2OutputOracleTest:test_constructor_l2BlockTimeZero_reverts() (gas: 45786) L2OutputOracleTest:test_constructor_l2BlockTimeZero_reverts() (gas: 45786)
L2OutputOracleTest:test_constructor_succeeds() (gas: 33695) L2OutputOracleTest:test_constructor_succeeds() (gas: 33695)
L2OutputOracleTest:test_deleteL2Outputs_afterLatest_reverts() (gas: 211855) L2OutputOracleTest:test_deleteL2Outputs_afterLatest_reverts() (gas: 211855)
L2OutputOracleTest:test_deleteL2Outputs_ifNotChallenger_reverts() (gas: 18883) L2OutputOracleTest:test_deleteL2Outputs_ifNotChallenger_reverts() (gas: 18894)
L2OutputOracleTest:test_deleteL2Outputs_nonExistent_reverts() (gas: 107292) L2OutputOracleTest:test_deleteL2Outputs_nonExistent_reverts() (gas: 107292)
L2OutputOracleTest:test_deleteOutputs_multipleOutputs_succeeds() (gas: 302143) L2OutputOracleTest:test_deleteOutputs_multipleOutputs_succeeds() (gas: 302143)
L2OutputOracleTest:test_deleteOutputs_singleOutput_succeeds() (gas: 180700) L2OutputOracleTest:test_deleteOutputs_singleOutput_succeeds() (gas: 180700)
......
...@@ -103,6 +103,15 @@ contract L2OutputOracle_Initializer is CommonTest { ...@@ -103,6 +103,15 @@ contract L2OutputOracle_Initializer is CommonTest {
// Test data // Test data
uint256 initL1Time; uint256 initL1Time;
event OutputProposed(
bytes32 indexed outputRoot,
uint256 indexed l2OutputIndex,
uint256 indexed l2BlockNumber,
uint256 l1Timestamp
);
event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex);
// Advance the evm's time to meet the L2OutputOracle's requirements for proposeL2Output // Advance the evm's time to meet the L2OutputOracle's requirements for proposeL2Output
function warpToProposeTime(uint256 _nextBlockNumber) public { function warpToProposeTime(uint256 _nextBlockNumber) public {
vm.warp(oracle.computeL2Timestamp(_nextBlockNumber) + 1); vm.warp(oracle.computeL2Timestamp(_nextBlockNumber) + 1);
...@@ -146,6 +155,13 @@ contract Portal_Initializer is L2OutputOracle_Initializer { ...@@ -146,6 +155,13 @@ contract Portal_Initializer is L2OutputOracle_Initializer {
OptimismPortal opImpl; OptimismPortal opImpl;
OptimismPortal op; OptimismPortal op;
event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);
event WithdrawalProven(
bytes32 indexed withdrawalHash,
address indexed from,
address indexed to
);
function setUp() public virtual override { function setUp() public virtual override {
L2OutputOracle_Initializer.setUp(); L2OutputOracle_Initializer.setUp();
......
...@@ -10,17 +10,6 @@ import { Types } from "../libraries/Types.sol"; ...@@ -10,17 +10,6 @@ import { Types } from "../libraries/Types.sol";
contract L2OutputOracleTest is L2OutputOracle_Initializer { contract L2OutputOracleTest is L2OutputOracle_Initializer {
bytes32 proposedOutput1 = keccak256(abi.encode(1)); bytes32 proposedOutput1 = keccak256(abi.encode(1));
event OutputProposed(
bytes32 indexed outputRoot,
uint256 indexed l2OutputIndex,
uint256 indexed l2BlockNumber,
uint256 l1Timestamp
);
function setUp() public override {
super.setUp();
}
function test_constructor_succeeds() external { function test_constructor_succeeds() external {
assertEq(oracle.PROPOSER(), proposer); assertEq(oracle.PROPOSER(), proposer);
assertEq(oracle.CHALLENGER(), owner); assertEq(oracle.CHALLENGER(), owner);
...@@ -335,8 +324,6 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer { ...@@ -335,8 +324,6 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
* Delete Tests - Happy Path * * Delete Tests - Happy Path *
*****************************/ *****************************/
event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex);
function test_deleteOutputs_singleOutput_succeeds() external { function test_deleteOutputs_singleOutput_succeeds() external {
test_proposeL2Output_proposeAnotherOutput_succeeds(); test_proposeL2Output_proposeAnotherOutput_succeeds();
test_proposeL2Output_proposeAnotherOutput_succeeds(); test_proposeL2Output_proposeAnotherOutput_succeeds();
......
...@@ -289,13 +289,6 @@ contract OptimismPortal_FinalizeWithdrawal_Test is Portal_Initializer { ...@@ -289,13 +289,6 @@ contract OptimismPortal_FinalizeWithdrawal_Test is Portal_Initializer {
bytes[] _withdrawalProof; bytes[] _withdrawalProof;
Types.OutputRootProof internal _outputRootProof; Types.OutputRootProof internal _outputRootProof;
event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);
event WithdrawalProven(
bytes32 indexed withdrawalHash,
address indexed from,
address indexed to
);
// Use a constructor to set the storage vars above, so as to minimize the number of ffi calls. // Use a constructor to set the storage vars above, so as to minimize the number of ffi calls.
constructor() { constructor() {
super.setUp(); super.setUp();
......
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