Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add getSharesFromQueuedWithdrawal #1078

Open
wants to merge 7 commits into
base: slashing-magnitudes-fixes
Choose a base branch
from

Conversation

0xClandestine
Copy link
Member

@0xClandestine 0xClandestine commented Feb 10, 2025

Motivation:

Users want a cost effective way to query withdrawable shares.

Modifications:

  • added getSharesFromQueuedWithdrawal(bytes32 withdrawalRoot)
  • renamed getQueuedWithdrawals to getSharesFromQueuedWithdrawals.

Result:

Users can query withdrawable shares with withdrawalRoot alone.

@0xClandestine 0xClandestine changed the base branch from dev to slashing-magnitudes-fixes February 10, 2025 17:59
@0xClandestine 0xClandestine changed the title Feat: queued withdrawal shares alias feat: add getSharesFromQueuedWithdrawal Feb 10, 2025
src/contracts/interfaces/IDelegationManager.sol Outdated Show resolved Hide resolved
src/test/unit/DelegationUnit.t.sol Outdated Show resolved Hide resolved
function getSharesFromQueuedWithdrawal(
bytes32 withdrawalRoot
) external view returns (Withdrawal memory withdrawal, uint256[] memory shares) {
(withdrawal, shares) = _getSharesByWithdrawalRoot(withdrawalRoot);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just return the shares? If the user has the withdrawal root then they wouldn't need the withdrawal

Copy link
Collaborator

Choose a reason for hiding this comment

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

This also works for Renzo

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.

3 participants