Repository navigation
refactor(L2): tighten BaseTime NatSpec and tests - #449
Merged
Merged
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a11ca1-0972-76cc-9a30-05db0799da5a Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a11ca1-0972-76cc-9a30-05db0799da5a Co-authored-by: Amp <amp@ampcode.com>
…y default Amp-Thread-ID: https://ampcode.com/threads/T-01a11ca1-0972-76cc-9a30-05db0799da5a Co-authored-by: Amp <amp@ampcode.com>
Collaborator
✅ Heimdall Review Status
|
4 of 5 tasks
0x00101010
marked this pull request as ready for review
October 8, 2026 22:27
Collaborator
|
Review Error for amiecorso @ 2026-10-08 22:37:17 UTC |
amiecorso
self-requested a review
October 8, 2026 22:37
amiecorso
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IBaseTimeNatSpec: correct theBaseTime_InvalidTimestampMillisPartdescription (above 800 or not a multiple of 200), enumeratesetTimestampMillisPartreverts in execution order, add@param/@return, and document thattimestampMs()combines the current seconds with the previous block's millisecond component until the block'stx[1]update executes.BaseTime.timestampMs.CommonTest(addsbaseTimetoSetup), fuzz by default, order reverts before happy paths, pin that the depositor check precedes the value check, and drop the initial-value test already covered byL2Genesis.t.sol.Runtime bytecode is unchanged. The node pins BaseTime's runtime code hash, so this PR is deliberately bytecode-neutral:
keccak256(deployedBytecode)stays0x9c4c8a497a69d0b8f2ba67be0bee7a1373186055978c3be6ec3068e0ec27f32a.versionstays1.0.0; onlysemver-lock.json'ssourceCodeHashand the ABI snapshot's output name (timestampMs_→ unnamed) change. No selector, error, or storage change.Test plan
just test(full suite) passesforge fmt --check,just snapshots-check-no-buildcast keccak $(jq -r '.deployedBytecode.object' forge-artifacts/BaseTime.sol/BaseTime.json)==0x9c4c…f32aCompanion change in base-std (read-only
IBaseTime+StdPredeploys.BASE_TIME): base/base-std#238.