Skip to content

fix: decode BalancesSnapped event via strategy interface in snapBalances task#2881

Open
sparrowDom wants to merge 1 commit intomasterfrom
sparrowDom/snapBalancesFix
Open

fix: decode BalancesSnapped event via strategy interface in snapBalances task#2881
sparrowDom wants to merge 1 commit intomasterfrom
sparrowDom/snapBalancesFix

Conversation

@sparrowDom
Copy link
Copy Markdown
Member

@sparrowDom sparrowDom commented Apr 22, 2026

Summary

  • When the snapBalances hardhat task runs with --consol true, the tx is routed through ConsolidationController, but the BalancesSnapped event is emitted by the target CompoundingStakingSSVStrategy. Ethers only decodes receipt.events[*].event against the ABI of the contract used to send the tx, so the event lookup failed and the task threw even though the on-chain call succeeded.
  • Fix locates the raw log by topic on the strategy's address and parses it through the strategy's interface. No contract changes required.

…ces task

When snapBalances runs with --consol, the tx is sent to ConsolidationController
but the BalancesSnapped event is emitted by the target strategy. The receipt's
decoded events are bound to the controller's ABI so the event lookup failed
and the task threw even though the tx succeeded.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.08%. Comparing base (dbae51a) to head (d71a366).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2881      +/-   ##
==========================================
- Coverage   49.32%   49.08%   -0.25%     
==========================================
  Files         113      113              
  Lines        4916     4916              
  Branches     1362     1362              
==========================================
- Hits         2425     2413      -12     
- Misses       2487     2499      +12     
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@naddison36 naddison36 left a comment

Choose a reason for hiding this comment

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

LGTM

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