fix(recurring): guard rescueTokens with nonReentrant - #1755
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile SummaryThe PR protects owner token rescues with the contract’s shared reentrancy guard and validates that nonzero fees have a nonzero destination.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security defects identified. The owner-only rescue operation shares the existing reentrancy guard with payment execution, validates both addresses, checks transfer success, and the fee-address check executes before funds or payment state are changed. Important Files Changed
Reviews (1): Last reviewed commit: "fix(recurring): guard rescueTokens with ..." | Re-trigger Greptile |

Add
rescueTokensfunction and zero-address fee validation toERC20RecurringPaymentProxyAdds a guard that reverts payment execution when
feeAmountis non-zero butfeeAddressis the zero address, preventing fees from being burned unintentionally.Introduces a
rescueTokensfunction allowing the contract owner to recover ERC20 tokens that have accumulated in the contract. The function enforces non-zero addresses for both the token and recipient, and is protected byonlyOwnerandnonReentrantmodifiers.Tests cover:
feeAmount > 0andfeeAddressis the zero address