Skip to content

docs: mark isWithdrawable() as deprecated - #151

Open
Tranquil-Flow wants to merge 1 commit into
devfrom
docs/deprecate-iswithdrawable
Open

docs: mark isWithdrawable() as deprecated#151
Tranquil-Flow wants to merge 1 commit into
devfrom
docs/deprecate-iswithdrawable

Conversation

@Tranquil-Flow

Copy link
Copy Markdown

Summary

Closes #126

Marks isWithdrawable() as @deprecated in both ISavingCircles interface and SavingCircles implementation.

The function has O(N²) gas cost — it iterates all members and for each calls _activeClaimableCheck, which itself scans all members. The deprecation notice directs callers to:

  • isMemberWithdrawable(id, member) for per-member O(N) checks
  • currentRoundWithdrawer(id) for O(1) lookup of the current round's recipient

Function retained for backward compatibility; removal planned for the next breaking release.

Changes

  • ISavingCircles.sol: added @dev @deprecated NatSpec with migration guidance
  • SavingCircles.sol: added matching @dev @deprecated NatSpec

Test plan

  • forge test passes (140 tests)
  • Documentation-only change — no behavioral impact

Mark isWithdrawable() as @deprecated in both ISavingCircles interface and
the SavingCircles implementation. The original function has O(N²) gas cost
from iterating all members and checking deposits for each round. Recommend
isMemberWithdrawable(id, member) for per-member checks or
currentRoundWithdrawer(id) for the current round's designated withdrawer.

- Closes: #126
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.

Assess deprecating isWithdrawable(uint256) and define withdrawability API semantics

1 participant