Skip to content

Commit 3406e43

Browse files
committed
feat(contracts): merge events into a single one with a new status field
1 parent 8ba0339 commit 3406e43

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

aggregation-mode/abi/AlignedProofAggregationService.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/src/core/AlignedProofAggregationService.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ contract AlignedProofAggregationService is
6464
} catch {
6565
AggregatedProof storage proof = aggregatedProofs[currentAggregatedProofNumber];
6666
proof.status = AggregatedProofStatus.Failed;
67-
emit AggregatedProofFailed(currentAggregatedProofNumber);
67+
emit NewAggregatedProof(currentAggregatedProofNumber, AggregatedProofStatus.Failed, 0x0, 0x0);
68+
currentAggregatedProofNumber += 1;
6869
}
6970
}
7071

7172
function markCurrentAggregatedProofAsMissed() public onlyAlignedAggregator {
7273
AggregatedProof storage proof = aggregatedProofs[currentAggregatedProofNumber];
7374
proof.status = AggregatedProofStatus.Missed;
74-
emit AggregatedProofMissed(currentAggregatedProofNumber);
75+
emit NewAggregatedProof(currentAggregatedProofNumber, AggregatedProofStatus.Missed, 0x0, 0x0);
7576
currentAggregatedProofNumber += 1;
7677
}
7778

@@ -80,7 +81,7 @@ contract AlignedProofAggregationService is
8081
proof.merkleRoot = merkleRoot;
8182
proof.blobHash = blobHash;
8283
proof.status = AggregatedProofStatus.Verified;
83-
emit NewAggregatedProofVerified(currentAggregatedProofNumber, merkleRoot, blobHash);
84+
emit NewAggregatedProof(currentAggregatedProofNumber, AggregatedProofStatus.Verified, merkleRoot, blobHash);
8485
currentAggregatedProofNumber += 1;
8586
}
8687

contracts/src/core/IAlignedProofAggregationService.sol

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ interface IAlignedProofAggregationService {
4343
function markCurrentAggregatedProofAsMissed() external;
4444

4545
/// @notice event that gets emitted after a successful aggregated proof verification
46-
event NewAggregatedProofVerified(uint64 indexed proofNumber, bytes32 merkleRoot, bytes32 blobVersionedHash);
47-
/// @notice event that gets emitted when an aggregated proof could not be sent to the contract.
48-
event AggregatedProofMissed(uint64 indexed proofNumber);
49-
/// @notice event that gets emitted after a failed aggregated proof verification
50-
event AggregatedProofFailed(uint64 indexed proofNumber);
46+
event NewAggregatedProof(
47+
uint64 indexed proofNumber, AggregatedProofStatus status, bytes32 merkleRoot, bytes32 blobVersionedHash
48+
);
5149

5250
error OnlyAlignedAggregator(address sender);
5351
}

0 commit comments

Comments
 (0)