Skip to content

Adding changes needed for the SetTokenTransferFee Update#1836

Open
sowgandhi11 wants to merge 18 commits intomainfrom
fix/set-token-transfer-fee-fq2.0
Open

Adding changes needed for the SetTokenTransferFee Update#1836
sowgandhi11 wants to merge 18 commits intomainfrom
fix/set-token-transfer-fee-fq2.0

Conversation

@sowgandhi11
Copy link

  • Removed the upper bound for identifying the latest FQ address

  • Returning the AddressRef data for the FeeQuoter

  • Added a new method GetFeeContractRef(e cldf.Environment, src uint64, dst uint64) (AddressRef, error)

  • Added a fees.go adapter implementation for CCIP 2.0

@github-actions
Copy link

👋 sowgandhi11, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the fee deployment flow to support SetTokenTransferFee across newer CCIP FeeQuoter versions by (a) discovering the deployed fee contract/version from the datastore, (b) returning AddressRef for fee contracts, and (c) adding an EVM CCIP 2.0 fee adapter implementation.

Changes:

  • Extend the FeeAdapter interface with GetFeeContractRef(...) (datastore.AddressRef, error) and update EVM adapters to return AddressRef data.
  • Update the SetTokenTransferFee changeset to select an adapter based on the discovered on-chain fee contract version.
  • Add a CCIP 2.0 EVM fees adapter and adjust v1.6 FeeQuoter “latest address” selection logic.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
deployment/fees/set_token_transfer_fee.go Selects fee adapter based on discovered fee contract ref/version before executing the update sequence.
deployment/fees/product.go Extends FeeAdapter interface to expose fee contract AddressRef.
chains/evm/deployment/v2_0_0/adapters/fees.go New CCIP 2.0 EVM fees adapter implementation (FeeQuoter-based).
chains/evm/deployment/v1_6_0/sequences/adapter.go Updates FeeQuoter “latest version” selection to remove the previous upper bound.
chains/evm/deployment/v1_5_0/adapters/fees.go Updates v1.5 fee adapter to return a fee contract AddressRef (OnRamp-based).
Comments suppressed due to low confidence (1)

deployment/fees/set_token_transfer_fee.go:132

  • inferTokenTransferFeeArgs is called with adapter (resolved from cfg.Version), but the actual sequence execution uses updater (resolved from the on-chain fee contract ref version). If cfg.Version differs from the deployed contract version, inference may query the wrong ABI/contract and fail or infer incorrect defaults. Consider selecting a single adapter based on the discovered contract ref version and using it consistently for inference and updates (or error if versions disagree).
				settings[dst.Selector] = map[string]*TokenTransferFeeArgs{}
				for _, feeCfg := range dst.Settings {
					if args, err := inferTokenTransferFeeArgs(adapter, e, src.Selector, dst.Selector, feeCfg); err != nil {
						return cldf.ChangesetOutput{}, fmt.Errorf("failed to infer token transfer fee args for token %s: %w", feeCfg.Address, err)
					} else {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sowgandhi11 sowgandhi11 marked this pull request as ready for review March 13, 2026 15:57
@sowgandhi11 sowgandhi11 requested a review from a team as a code owner March 13, 2026 15:57
@github-actions
Copy link

Metric fix/set-token-transfer-fee-fq2.0 main
Coverage 70.1% 69.8%

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