Skip to content

Fix inconsistency: updating lastUpdatedDepositCount on backwardLET & …#606

Open
krlosMata wants to merge 1 commit intodevelopfrom
feature/update-lastUpdatedDepositCount
Open

Fix inconsistency: updating lastUpdatedDepositCount on backwardLET & …#606
krlosMata wants to merge 1 commit intodevelopfrom
feature/update-lastUpdatedDepositCount

Conversation

@krlosMata
Copy link
Copy Markdown
Member

Description

This pull request updates the AgglayerBridgeL2 contract to ensure that the lastUpdatedDepositCount variable is correctly updated during both forward and backward LET (Leaf Event Tree) operations.

Details

Contract logic improvements:

  • Updated the AgglayerBridgeL2.sol contract to set lastUpdatedDepositCount whenever the LER (Local Exit Root) is updated in both forwardLET and backwardLET operations, ensuring consistency between the deposit count and the last updated state. [1] [2]

Testing enhancements:

  • Added a test to verify that lastUpdatedDepositCount is updated correctly after a forwardLET operation, especially in emergency state scenarios.
  • Added a test to verify that lastUpdatedDepositCount is updated correctly after a backwardLET operation, including scenarios where the deposit count is rolled back.

@krlosMata krlosMata requested a review from web3security as a code owner April 15, 2026 13:51
Copy link
Copy Markdown
Collaborator

@web3security web3security left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants