Repository navigation
Add GitHub attribution helpers and tests - #105
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| function routeERC20Claim(bytes32 claimId, IERC20 token, address claimant, uint256 amount) | ||
| external | ||
| nonReentrant | ||
| { | ||
| require(claimant != address(0), "invalid claimant"); | ||
| require(amount > 0, "amount required"); | ||
| address receiver = royaltyReceiver; | ||
| require(receiver != address(0), "royalty receiver required"); | ||
|
|
||
| (uint256 royaltyAmount, uint256 netAmount) = previewRoyalty(amount); | ||
|
|
||
| token.safeTransferFrom(msg.sender, receiver, royaltyAmount); | ||
| token.safeTransferFrom(msg.sender, claimant, netAmount); |
There was a problem hiding this comment.
[P1] Routing functions pull funds from caller rather than paying claims
routeERC20Claim and routeNativeClaim compute the royalty but then transfer tokens using msg.sender and the transaction’s msg.value. The React KinBridgeClaimButton introduced in the same commit invokes these functions directly from the claimant’s wallet, so the claimant must supply the full gross amount and only receives the net amount back, effectively paying the royalty instead of receiving bridged assets. Unless a privileged vault is intended to call these methods on the user’s behalf, the current flow causes users to lose the royalty amount whenever they click the claim button. The router should distribute funds it controls (or be called by the vault), not withdraw them from the claimant.
Useful? React with 👍 / 👎.
#118) This reverts commit c35c30a, reversing changes made to 302e86d. ## Describe your changes and provide context - Revert surfacing errors from db layer since the rpc / keeper / store layer hard codes a lot of handling of record not found and there needs to be a larger refactor - Can re introduce this error after a redesign and consideration of impact ## Testing performed to validate your change - Verified in unit tests and on node
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68d1bd56efb483228dbff07fcb8cb6ea