From 72eaa623b2ebb18f592b1ab25b9135d064ca09a4 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:01:43 -0300 Subject: [PATCH] Change vectorx for implementation --- .../da-layers/eigenda/DummyEigenDABridge.sol | 12 ++++++------ .../{DummyVectorX.sol => DummyImplementation.sol} | 4 ++-- .../da-layers/eigenda/EigenDAAttestationLib.sol | 8 ++++---- .../contracts/da-layers/eigenda/IEigenDABridge.sol | 6 +++--- .../eigenda/{IVectorx.sol => IImplementation.sol} | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) rename da-contracts/contracts/da-layers/eigenda/{DummyVectorX.sol => DummyImplementation.sol} (61%) rename da-contracts/contracts/da-layers/eigenda/{IVectorx.sol => IImplementation.sol} (85%) diff --git a/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol b/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol index 731942b39..6cb5cc986 100644 --- a/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol +++ b/da-contracts/contracts/da-layers/eigenda/DummyEigenDABridge.sol @@ -3,18 +3,18 @@ pragma solidity 0.8.24; import {IEigenDABridge} from "./IEigenDABridge.sol"; -import {IVectorx} from "./IVectorx.sol"; -import {DummyVectorX} from "./DummyVectorX.sol"; +import {IImplementation} from "./IImplementation.sol"; +import {DummyImplementation} from "./DummyImplementation.sol"; contract DummyEigenDABridge is IEigenDABridge { - IVectorx public vectorxContract; + IImplementation public implementationContract; constructor() { - vectorxContract = new DummyVectorX(); + implementationContract = new DummyImplementation(); } - function vectorx() external view returns (IVectorx) { - return vectorxContract; + function implementation() external view returns (IImplementation) { + return implementationContract; } function verifyBlobLeaf(bytes calldata) external view returns (bool) { diff --git a/da-contracts/contracts/da-layers/eigenda/DummyVectorX.sol b/da-contracts/contracts/da-layers/eigenda/DummyImplementation.sol similarity index 61% rename from da-contracts/contracts/da-layers/eigenda/DummyVectorX.sol rename to da-contracts/contracts/da-layers/eigenda/DummyImplementation.sol index eccee235b..6be819b13 100644 --- a/da-contracts/contracts/da-layers/eigenda/DummyVectorX.sol +++ b/da-contracts/contracts/da-layers/eigenda/DummyImplementation.sol @@ -2,9 +2,9 @@ pragma solidity 0.8.24; -import {IVectorx} from "./IVectorx.sol"; +import {IImplementation} from "./IImplementation.sol"; -contract DummyVectorX is IVectorx { +contract DummyImplementation is IImplementation { function rangeStartBlocks(bytes32) external view returns (uint32 startBlock) { return 1; } diff --git a/da-contracts/contracts/da-layers/eigenda/EigenDAAttestationLib.sol b/da-contracts/contracts/da-layers/eigenda/EigenDAAttestationLib.sol index ddda5854a..4399ac1c6 100644 --- a/da-contracts/contracts/da-layers/eigenda/EigenDAAttestationLib.sol +++ b/da-contracts/contracts/da-layers/eigenda/EigenDAAttestationLib.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.24; import {IEigenDABridge} from "./IEigenDABridge.sol"; -import {IVectorx} from "./IVectorx.sol"; +import {IImplementation} from "./IImplementation.sol"; abstract contract EigenDAAttestationLib { struct AttestationData { @@ -11,7 +11,7 @@ abstract contract EigenDAAttestationLib { } IEigenDABridge public bridge; - IVectorx public vectorx; + IImplementation public implementation; /// @dev Mapping from attestation leaf to attestation data. /// It is necessary for recovery of the state from the onchain data. @@ -21,13 +21,13 @@ abstract contract EigenDAAttestationLib { constructor(IEigenDABridge _bridge) { bridge = _bridge; - vectorx = bridge.vectorx(); + implementation = bridge.implementation(); } function _attest(bytes memory input) internal virtual { if (!bridge.verifyBlobLeaf(input)) revert InvalidAttestationProof(); /*attestations[input.leaf] = AttestationData( - vectorx.rangeStartBlocks(input.rangeHash) + uint32(input.dataRootIndex) + 1, + implementation.rangeStartBlocks(input.rangeHash) + uint32(input.dataRootIndex) + 1, uint128(input.leafIndex) );*/ } diff --git a/da-contracts/contracts/da-layers/eigenda/IEigenDABridge.sol b/da-contracts/contracts/da-layers/eigenda/IEigenDABridge.sol index 26ff4d81e..bfcd3d300 100644 --- a/da-contracts/contracts/da-layers/eigenda/IEigenDABridge.sol +++ b/da-contracts/contracts/da-layers/eigenda/IEigenDABridge.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.24; -import {IVectorx} from "./IVectorx.sol"; +import {IImplementation} from "./IImplementation.sol"; interface IEigenDABridge { // solhint-disable-next-line gas-struct-packing @@ -27,7 +27,7 @@ interface IEigenDABridge { bytes32[] dataRootProof; // proof of inclusion of leaf within blob/bridge root bytes32[] leafProof; - // abi.encodePacked(startBlock, endBlock) of header range commitment on vectorx + // abi.encodePacked(startBlock, endBlock) of header range commitment on implementation bytes32 rangeHash; // index of the data root in the commitment tree uint256 dataRootIndex; @@ -41,6 +41,6 @@ interface IEigenDABridge { uint256 leafIndex; } - function vectorx() external view returns (IVectorx vectorx); + function implementation() external view returns (IImplementation implementation); function verifyBlobLeaf(bytes calldata input) external view returns (bool); } diff --git a/da-contracts/contracts/da-layers/eigenda/IVectorx.sol b/da-contracts/contracts/da-layers/eigenda/IImplementation.sol similarity index 85% rename from da-contracts/contracts/da-layers/eigenda/IVectorx.sol rename to da-contracts/contracts/da-layers/eigenda/IImplementation.sol index 5b7951a52..7ea954ebd 100644 --- a/da-contracts/contracts/da-layers/eigenda/IVectorx.sol +++ b/da-contracts/contracts/da-layers/eigenda/IImplementation.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.24; -interface IVectorx { +interface IImplementation { function rangeStartBlocks(bytes32 rangeHash) external view returns (uint32 startBlock); }