forked from matter-labs/era-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a466cd
commit d62bd27
Showing
4 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
l2-contracts/contracts/data-availability/EigenDAL2Validator.sol
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.24; | ||
|
||
import {IL2DAValidator} from "../interfaces/IL2DAValidator.sol"; | ||
|
||
/// Rollup DA validator. It will publish data that would allow to use either calldata or blobs. | ||
contract EigenDAL2Validator is IL2DAValidator { | ||
function validatePubdata( | ||
// The rolling hash of the user L2->L1 logs. | ||
bytes32, | ||
// The root hash of the user L2->L1 logs. | ||
bytes32, | ||
// The chained hash of the L2->L1 messages | ||
bytes32, | ||
// The chained hash of uncompressed bytecodes sent to L1 | ||
bytes32, | ||
// Operator data, that is related to the DA itself | ||
bytes calldata | ||
) external returns (bytes32 outputHash) { | ||
// Since we do not need to publish anything to L1, we can just return 0. | ||
// Note, that Rollup validator sends the hash of uncompressed state diffs, since the | ||
// correctness of the publish pubdata depends on it. However Validium doesn't sent anything, | ||
// so we don't need to publish even that. | ||
// TODO: Implement real validation logic. | ||
outputHash = bytes32(0); | ||
} | ||
} |