Commit 6c087767 authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

contracts: Add setL1BlockValues gas test (#2576)

This adds a normal (non-fuzzing) test of setL1BlockValues with the goal
of determining how much gas is used by the function.
parent 10e07754
......@@ -3,7 +3,8 @@ L1BlockTest:test_basefee() (gas: 7575)
L1BlockTest:test_hash() (gas: 7552)
L1BlockTest:test_number() (gas: 7651)
L1BlockTest:test_sequenceNumber() (gas: 7585)
L1BlockTest:test_timestamp() (gas: 7661)
L1BlockTest:test_timestamp() (gas: 7683)
L1BlockTest:test_updateValues() (gas: 28215)
L1BlockNumberTest:test_fallback() (gas: 10755)
L1BlockNumberTest:test_getL1BlockNumber() (gas: 10589)
L1BlockNumberTest:test_receive() (gas: 17418)
......
......@@ -45,4 +45,9 @@ contract L1BlockTest is CommonTest {
function test_sequenceNumber() external {
assertEq(lb.sequenceNumber(), uint64(4));
}
function test_updateValues() external {
vm.prank(depositor);
lb.setL1BlockValues(type(uint64).max, type(uint64).max, type(uint256).max, keccak256(abi.encode(1)), type(uint64).max);
}
}
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