fix(contracts): add zero-amount + fee-on-transfer checks in PaymentEscrow#5368
Closed
michaelxmchn wants to merge 2 commits into
Closed
fix(contracts): add zero-amount + fee-on-transfer checks in PaymentEscrow#5368michaelxmchn wants to merge 2 commits into
michaelxmchn wants to merge 2 commits into
Conversation
…ymentEscrow - Add balance-before/after pattern in createEscrow to handle fee-on-transfer tokens — store actual received amount instead of nominal input amount - Add SafeERC20 import + using directive for safe transfer wrapper - Add contributor metadata @Custom: tags for CI traceability - Add FeeOnTransferToken mock (5% burn) for comprehensive test coverage - Add PaymentEscrow test suite: 14 tests covering zero-amount rejection, invalid addresses, standard ERC20 lifecycle, fee-on-transfer deposit/ release/refund, double-settle protection, and access control - Fix hardhat.config.js for multi-version Solidity (0.8.20 + 0.8.24/cancun) - Fix ChainlinkAdapter.sol tuple destructuring for Solidity 0.8.24 compat Closes ClankerNation#179 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ention Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Unfortunately the changes in this PR didn't fully resolve the issue. Please rework your solution and submit a new pull request within 2 hours. Make sure to review the acceptance criteria in the linked issue and verify all conditions are met before resubmitting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim #179
💳 Payment: USDC | 0x301c9f7ebb1b937901adf96a144553f95e89e145 | Base
Fixes #179 — security hardening for PaymentEscrow.
require(amount > 0, "Amount must be > 0")require(token != address(0), "Invalid token")safeTransferFrom/safeTransferinstead of raw transfer callsTest Plan
14 new tests covering: zero amount rejection, invalid payee/token, fee-on-transfer lifecycle, standard ERC20 flow, double-settlement protection, lock period enforcement — 14/14 PASS.
🤖 Generated with Claude Code