Skip to content

Conversation

naddison36
Copy link
Collaborator

Changes

  • Hardhat task autoValidatorWithdrawals that automatically withdraws from the staking strategy and the validators
  • Change the Staking Strategy contract so the Registrator can withdraw ETH and WETH from the strategy contract to the Vault
  • Added Hardhat task signMessage to sign messages by the Defender Relayers
  • Deployed the latest staking strategy contract to Hoodi

Code Change Checklist

To be completed before internal review begins:

  • The contract code is complete
  • Executable deployment file
  • Fork tests that test after the deployment file runs
  • Unit tests *if needed
  • The owner has done a full checklist review of the code + tests

Internal review:

  • Two approvals by internal reviewers

Copy link

github-actions bot commented Oct 13, 2025

Warnings
⚠️ 👀 This PR needs at least 2 reviewers

Generated by 🚫 dangerJS against 70e1bef

Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.78%. Comparing base (a241689) to head (70e1bef).
⚠️ Report is 244 commits behind head on nicka/pectra.

Additional details and impacted files
@@               Coverage Diff                @@
##           nicka/pectra    #2685      +/-   ##
================================================
- Coverage         42.66%   40.78%   -1.89%     
================================================
  Files               121      122       +1     
  Lines              5670     5750      +80     
  Branches           1502     1526      +24     
================================================
- Hits               2419     2345      -74     
- Misses             3248     3402     +154     
  Partials              3        3              

☔ 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
Member

@sparrowDom sparrowDom left a comment

Choose a reason for hiding this comment

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

LGTM

types.int
)
.addParam(
"execute",
Copy link
Member

Choose a reason for hiding this comment

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

this could also be called dry-run

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. I'll change to dryrun to be consistent with the other Hardhat tasks

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Change is in commit a5430f6

"Automatically withdraws funds from a validator"
)
.addParam(
"buffer",
Copy link
Member

Choose a reason for hiding this comment

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

BufferBp could be a better name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like to keep the Hardhat option short. bufferBp would become --buffer-bp. The option description should say its in basis points

Copy link
Member

Choose a reason for hiding this comment

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

good point 👍


// Iterate over the pending partial withdrawals
let totalPendingPartialWithdrawals = BigNumber.from(0);
let countPendingPartialWithdrawals = 0;
Copy link
Member

Choose a reason for hiding this comment

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

I think we could benefit in the future if we put these calculations in a separate script. So one could plug any Vault that supports async withdrawals and a native staking strategy and it would output the various balance metrics

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea. I've put in a separate totalPartialWithdrawals function in the same js file for now. See commit 70e1bef

Copy link

@naddison36 naddison36 merged commit 3e790c1 into nicka/pectra Oct 14, 2025
14 of 19 checks passed
@naddison36 naddison36 deleted the nicka/pectra-automation branch October 14, 2025 01:21
@naddison36
Copy link
Collaborator Author

Merging as I want to contract changes in the the feature branch.

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