Open Issues Need Help
View All on GitHubAI Summary: The task involves refactoring the Ethereum (L1) smart contracts of the ZeroXBridge project to consolidate two separate deposit events (`DepositHashAppended` and `DepositEvent`) into a single, enriched `DepositEvent`. This requires modifying the `MerkleManager.sol` and `ZeroXBridgeL1.sol` contracts to return and emit additional Merkle tree metadata within the unified event. Subsequently, unit tests need to be updated to reflect the changes, and the off-chain sequencer must be adjusted to handle the new event structure.
AI Summary: The task requires fixing a bug in the `ZeroXBridgeL2.cairo` contract where the index used to store commitment hashes in a Merkle Mountain Range is incorrectly calculated, leading to verification failures. The solution involves creating a helper function to accurately determine the leaf index based on the MMR structure, similar to the existing `leafCountToMmrIndex` function in the L1 contract. The fix must pass all existing tests and be well-documented.
AI Summary: The task requires fixing a bug in the L1 Merkle manager contract where the leaf index for commitment hashes is incorrectly calculated, leading to off-chain verification failures. A helper function needs to be implemented to correctly calculate the leaf index based on the Merkle Mountain Range (MMR) structure. The solution should be concise, well-documented, and pass all existing tests.