Fix USDC multi-hop encoding, redeploy Zap, re-enable USDC#469
Merged
realproject7 merged 1 commit intomainfrom Mar 23, 2026
Merged
Fix USDC multi-hop encoding, redeploy Zap, re-enable USDC#469realproject7 merged 1 commit intomainfrom
realproject7 merged 1 commit intomainfrom
Conversation
- ZAP_PLOTLINK: 0x04f557... → 0x952606df750C01e0a12458C3F814598B94AD5C5f - Re-enable USDC in SUPPORTED_ZAP_TOKENS (was disabled in PR #466) Root cause: abi.encode(field1, field2, ...) produces flat tuple encoding, but the V4 Router's CalldataDecoder.decodeSwapExactInParams() expects struct-style encoding (with an outer 0x20 offset word). Added _encodeAsStruct() helper in the contract. New contract verified on Sourcify. Successful USDC trade: https://basescan.org/tx/0x22298421d03be8f4459c03141b10148b1b0c28e34e78e943e0a4b1995c43ea7f Fixes #468 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
approved these changes
Mar 23, 2026
Collaborator
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The repo-side changes match issue #468: the new zap contract address is wired in, USDC is re-enabled, and the PR documents a successful mainnet USDC trade after redeployment.
Findings
- None.
Decision
Approving because the acceptance criteria relevant to this repo are satisfied and CI is green.
6 tasks
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.
Summary
ZAP_PLOTLINKto newly deployed contract:0x952606df750C01e0a12458C3F814598B94AD5C5fSUPPORTED_ZAP_TOKENS(was disabled in PR Disable USDC zap pending contract fix (#464) #466)Fixes #468
Root Cause
abi.encode(field1, field2, ...)produces flat tuple encoding, but the V4 Router'sCalldataDecoder.decodeSwapExactInParams()expects struct-style encoding with an outer0x20offset word. The single-hopExactInputSingleParamsworked because Forge'sabi.encode(struct)naturally includes this offset, while our manual multi-hop encoding did not.Contract Fix (in plotlink-contracts)
Added
_encodeAsStruct()helper that prepends0x20offset to flat-encoded multi-hop params, matching what the Router expects. Applied to both_executeV4MultiHopSwapExactInand_executeV4MultiHopSwapExactOut.Successful USDC Trade (Base Mainnet)
TX:
0x22298421d03be8f4459c03141b10148b1b0c28e34e78e943e0a4b1995c43ea7fTest plan
🤖 Generated with Claude Code