Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds L1 anchoring support around the UniversalTimestamps system by introducing an L2 manager for paid submissions, an L1 gateway for batching/confirmation, and supporting tooling/config.
Changes:
- Introduces L2 anchoring flow (manager, fee oracle, gateway) plus scripts for deploy + E2E interactions.
- Refactors UniversalTimestamps to store richer attestation data (timestamp + block number) using ERC-7201 storage libraries.
- Adds Scroll contracts dependency (submodule + remapping) and updates Foundry config (Solc version, RPC endpoints).
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| script/E2E.s.sol | Adds scripts to submit roots on L2 and confirm batches on L1. |
| script/DeployCreate2.s.sol | Removes legacy Create2 deploy script (replaced by new deploy scripts). |
| script/Deploy.s.sol | Adds deployment/upgrade scripts for UTS, fee oracle, manager, and gateway. |
| remappings.txt | Adds remapping for scroll-contracts/ imports. |
| lib/scroll-contracts | Adds Scroll contracts as a git submodule pin. |
| foundry.toml | Updates Solc version, ignored codes, and adds RPC endpoints. |
| foundry.lock | Locks scroll-contracts dependency version. |
| crates/contracts/abi/UniversalTimestamps.json | Regenerates ABI/artifacts for updated UniversalTimestamps. |
| crates/contracts/abi/IUniversalTimestamps.json | Regenerates ABI/artifacts for updated IUniversalTimestamps. |
| crates/contracts/abi/ERC1967Proxy.json | Regenerates ABI/artifacts (compiler version bump). |
| contracts/core/UniversalTimestampsTypes.sol | Adds shared Attestation type (timestamp + blockNumber). |
| contracts/core/UniversalTimestampsStorage.sol | Adds ERC-7201 storage access library for UTS. |
| contracts/core/MerkleTree.sol | Adds Merkle root computation/verification library intended to match Rust logic. |
| contracts/core/IUniversalTimestamps.sol | Adds expanded UTS interface (timestamp, blockNumber, full attestation, event). |
| contracts/UniversalTimestamps.sol | Refactors UTS implementation to new interface + ERC-7201 storage library. |
| contracts/L2/oracle/L1FeeOracle.sol | Adds fee oracle using Scroll L1 gas oracle predeploy. |
| contracts/L2/oracle/IL1FeeOracle.sol | Adds fee oracle interface. |
| contracts/L2/manager/L2AnchoringManagerTypes.sol | Adds anchoring queue item type. |
| contracts/L2/manager/L2AnchoringManagerStorage.sol | Adds ERC-7201 storage access library for the manager. |
| contracts/L2/manager/L2AnchoringManager.sol | Adds L2 anchoring manager (queueing, confirmation via messenger, fee collection). |
| contracts/L2/manager/IL2AnchoringManager.sol | Adds L2 anchoring manager interface and events. |
| contracts/L1/L1AnchoringGatewayStorage.sol | Adds ERC-7201 storage access library for the gateway. |
| contracts/L1/L1AnchoringGateway.sol | Adds L1 gateway to attest aggregate root and message L2 confirmation. |
| contracts/L1/IL1AnchoringGateway.sol | Adds L1 gateway interface. |
| contracts/IUniversalTimestamps.sol | Removes old interface (superseded by contracts/core/IUniversalTimestamps.sol). |
| contract-tests/UniversalTimestamps.t.sol | Removes old upgrade/storage persistence test. |
| contract-tests/Storage.t.sol | Adds ERC-7201 slot derivation consistency test. |
| contract-tests/L1AnchoringManager.t.sol | Adds tests for L2AnchoringManager (but file naming suggests L1). |
| .gitmodules | Registers lib/scroll-contracts submodule. |
| .env.test | Adds addresses/env vars for testing scripts and deployments. |
Comments suppressed due to low confidence (1)
contracts/core/UniversalTimestampsStorage.sol:1
NAMESPACEandSLOTare markedinternal, butcontract-tests/Storage.t.solreferencesUniversalTimestampsStorage.SLOT/NAMESPACE(and similarly for the L1/L2 storage libraries). This will not compile. Expose these constants (e.g.,public) if external test/contracts need them, or update tests to avoid direct access.
// SPDX-License-Identifier: MIT
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 35 out of 38 changed files in this pull request and generated 8 comments.
Comments suppressed due to low confidence (5)
script/E2E.s.sol:1
IL2AnchoringManager.submitForL1Anchoringnow takes(bytes32 root, address refundAddress), but the script calls it with a single argument. Update the script to pass a refund address (e.g.,msg.senderor an env-provided address) so it compiles and so overpayments can be refunded as intended.
script/E2E.s.sol:1IL2AnchoringManager.submitForL1Anchoringnow takes(bytes32 root, address refundAddress), but the script calls it with a single argument. Update the script to pass a refund address (e.g.,msg.senderor an env-provided address) so it compiles and so overpayments can be refunded as intended.
script/E2E.s.sol:1IL1AnchoringGateway.submitBatchrequires 4 parameters(merkleRoot, startIndex, count, gasLimit), but the script provides only 3. Pass an explicitgasLimitso the call compiles and the Scroll messenger invocation has a bounded L2 execution budget.
script/Deploy.s.sol:1- The deployment script arguments don’t match the new contract constructors/initializers:
L1FeeOracleconstructor takes onlyinitialOwner, but the script passes 3 parameters.L2AnchoringManager.initializetakes 4 parameters(initialOwner, uts, feeOracle, l2Messenger), but the script encodes 5 (includesl1Messenger).
Adjust the script to match the new signatures (and set L1 gateway / messenger via the manager’s admin setters if needed).
script/Deploy.s.sol:1
- The deployment script arguments don’t match the new contract constructors/initializers:
L1FeeOracleconstructor takes onlyinitialOwner, but the script passes 3 parameters.L2AnchoringManager.initializetakes 4 parameters(initialOwner, uts, feeOracle, l2Messenger), but the script encodes 5 (includesl1Messenger).
Adjust the script to match the new signatures (and set L1 gateway / messenger via the manager’s admin setters if needed).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
30 tasks
lightsing
added a commit
that referenced
this pull request
Mar 4, 2026
* init * fix * remove sort in MerkleTree * minimize uts * add refund * apply reviews and fix * add tests and fix * seperate notify and finalize * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add submitter and use _msgSender * add token * add constants * update fee model * feat: integrate with EAS (#35) * integrate with EAS * reduce gas cost * add EAS test and adjust l1 gas * use timestamp instead of attest to reduce L1 gas * feat(eas): update rust side (#36) * update contracts * feat(eas): update ts sdk & web (#37) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.