diff --git a/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol b/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol index e2bd5e244..3e5c02602 100644 --- a/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol +++ b/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol @@ -17,9 +17,14 @@ contract DummyEigenDABridge is IEigenDABridge { return implementationContract; } + function hashBatchMetadata(BatchMetadata calldata batchMetadata) external pure returns (bytes32) { + return keccak256(abi.encodePacked(keccak256(abi.encode(batchMetadata.batchHeader)),batchMetadata.signatoryRecordHash,batchMetadata.confirmationBlockNumber)); + } + function verifyBlobLeaf(MerkleProofInput calldata merkleProof) external view returns (bool) { // Inspired by eigenlayer contracts Merkle.verifyInclusionKeccak // https://github.com/Layr-Labs/eigenlayer-contracts/blob/3f3f83bd194b3bdc77d06d8fe6b101fafc3bcfd5/src/contracts/libraries/Merkle.sol + bytes32 hashedBatchMetadata = this.hashBatchMetadata(merkleProof.blobVerificationProof.batchMetadata); uint256 index = merkleProof.blobVerificationProof.blobIndex; bytes memory inclusionProof = merkleProof.blobVerificationProof.inclusionProof; require(inclusionProof.length % 32 == 0, "proof length not multiple of 32"); diff --git a/da-contracts/foundry.toml b/da-contracts/foundry.toml index 6f29a31cc..f4c9638e0 100644 --- a/da-contracts/foundry.toml +++ b/da-contracts/foundry.toml @@ -5,7 +5,11 @@ libs = ['node_modules', 'lib'] remappings = [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", - "l2-contracts/=../l2-contracts/contracts/" + "l2-contracts/=../l2-contracts/contracts/", + "@eigenda/eigenda-utils/libraries/=lib/eigenda/contracts/src/libraries/", + "@eigenda/eigenda-utils/interfaces/=lib/eigenda/contracts/src/interfaces/", + "eigenlayer-middleware/=lib/eigenda/contracts/lib/eigenlayer-middleware/src/", + "eigenlayer-core/=lib/eigenda/contracts/lib/eigenlayer-middleware/lib/eigenlayer-contracts/src/" ] allow_paths = ["../l2-contracts/contracts"] fs_permissions = [