Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCIP-5139 Add Support for SVM ATA to USDCTokenPool and send correct tokenReceiver to token pools #16226

Merged

Conversation

0xsuryansh
Copy link
Member

  1. For EVM chains , token receiver is message.receiver
  2. For SVM chains, token receiver is svmExtraArgs.tokenReceiver
  3. For USDC TokenPool , mintRecipient should be a fixed ATA account, so we maintain a mapping of ATA per SVM chain

@0xsuryansh 0xsuryansh requested a review from a team as a code owner February 5, 2025 08:00
Copy link
Contributor

github-actions bot commented Feb 5, 2025

Static analysis results are available

Hey @0xsuryansh, you can view Slither reports in the job summary here or download them as artifact here.
Please check them before merging and make sure you have addressed all issues.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@0xsuryansh 0xsuryansh changed the title CCIP-5139 fix: Pass Correct Token Receiver Based on Chain Family to TokenPool CCIP-5139 Add Support for SVM ATA to USDCTokenPool and send correct tokenReceiver to token pools Feb 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

Solidity Review Jira issue

Hey! We have taken the liberty to link this PR to a Jira issue for Solidity Review.

This is a new feature, that's currently in the pilot phase, so please make sure that the linkage is correct. In a contrary case, please update it manually in JIRA and replace Solidity Review issue key in the changeset file with the correct one.
Please reach out to the Test Tooling team and notify them about any issues you encounter.

Any changes to the Solidity Review Jira issue should be reflected in the changeset file. If you need to update the issue key, please do so manually in the following changeset file: contracts/.changeset/empty-baboons-wonder.md

This PR has been linked to Solidity Review Jira issue: CCIP-3966

@0xsuryansh 0xsuryansh force-pushed the CCIP-5139_fix_onramp-usdcpool-tokenreceiver-chainfamily branch from 65fbc91 to e60ac44 Compare February 5, 2025 13:55
@0xsuryansh 0xsuryansh force-pushed the CCIP-5139_fix_onramp-usdcpool-tokenreceiver-chainfamily branch from b5bf4f5 to 5cd6dc9 Compare February 5, 2025 15:55
…kenreceiver-chainfamily' into CCIP-5139_fix_onramp-usdcpool-tokenreceiver-chainfamily

# Conflicts:
#	core/gethwrappers/ccip/generated/fee_quoter/fee_quoter.go
#	core/gethwrappers/ccip/generated/onramp/onramp.go
#	core/gethwrappers/ccip/generated/onramp_with_message_transformer/onramp_with_message_transformer.go
#	core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt
@0xsuryansh 0xsuryansh requested a review from RensR February 5, 2025 17:09
jhweintraub
jhweintraub previously approved these changes Feb 5, 2025
contracts/src/v0.8/ccip/onRamp/OnRamp.sol Outdated Show resolved Hide resolved
@@ -72,6 +72,10 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion {
// A mapping of CCIP chain identifiers to destination domains
mapping(uint64 chainSelector => Domain CCTPDomain) private s_chainToDomain;

// Mapping specifically for SVM chains, stores a fixed ATA for each chain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs more information why this is done. Anyone should be able to understand without additional context.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving USDC changes to new PR

@@ -72,6 +72,10 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion {
// A mapping of CCIP chain identifiers to destination domains
mapping(uint64 chainSelector => Domain CCTPDomain) private s_chainToDomain;

// Mapping specifically for SVM chains, stores a fixed ATA for each chain
// The corresponding ATA is passed as mintRecipient when calling depositForBurnWithCaller
mapping(uint64 chainSelector => bytes32 associatedTokenAccount) private s_chainToAssociatedTokenAccount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this needs to be applied to the hybrid pool as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, will address in new PR

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@0xsuryansh 0xsuryansh added this pull request to the merge queue Feb 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 6, 2025
@0xsuryansh 0xsuryansh added this pull request to the merge queue Feb 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 6, 2025
@RensR RensR added this pull request to the merge queue Feb 6, 2025
Merged via the queue into develop with commit b92a304 Feb 6, 2025
223 of 224 checks passed
@RensR RensR deleted the CCIP-5139_fix_onramp-usdcpool-tokenreceiver-chainfamily branch February 6, 2025 18:05
karen-stepanyan pushed a commit that referenced this pull request Feb 10, 2025
…tokenReceiver to token pools (#16226)

* CCIP-5139 Add Support for SVM ATA to USDCTokenPool and send correct tokenReceiver to token pools

* fix tests

* [Bot] Update changeset file with jira issues

* Update gethwrappers

* separate test for processPoolReturnData

* fmt

* lint fix

* comment fix

* fix

* mockery run

* golf

* update comment for processMessageArgs

* wrapper update

* Revert USDC ATA support

* UPDC wrapper reset

---------

Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com>
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.

3 participants