Skip to content

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

Merged
naddison36 merged 1 commit into
masterfrom
sparrowDom/snapBalancesFix
Apr 30, 2026
Merged

fix: decode BalancesSnapped event via strategy interface in snapBalances task#2881
naddison36 merged 1 commit into
masterfrom
sparrowDom/snapBalancesFix

Conversation

@sparrowDom

@sparrowDom sparrowDom commented Apr 22, 2026

Copy link
Copy Markdown
Member

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

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.08%. Comparing base (dbae51a) to head (d71a366).
⚠️ Report is 3 commits behind head on master.

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.

@naddison36 naddison36 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@naddison36
naddison36 merged commit 78e4669 into master Apr 30, 2026
14 of 18 checks passed
@naddison36
naddison36 deleted the sparrowDom/snapBalancesFix branch April 30, 2026 10:26
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