Skip to content

feat: tooling API set token pool token transfer fees 2.0#1931

Merged
chris-de-leon-cll merged 36 commits intomainfrom
feat/tp-token-transfer-fee-configs
Apr 7, 2026
Merged

feat: tooling API set token pool token transfer fees 2.0#1931
chris-de-leon-cll merged 36 commits intomainfrom
feat/tp-token-transfer-fee-configs

Conversation

@chris-de-leon-cll
Copy link
Copy Markdown
Collaborator

@chris-de-leon-cll chris-de-leon-cll commented Apr 3, 2026

Summary

Adds deployment/tokens.SetTokenTransferFee for v2 token pools (optional min block confirmations, per-destination fee config, merge with on-chain or defaults) via TokenFeeAdapter

Fee Quoter SetTokenTransferFee now uses utils.Optional, Resolve instead of Infer, StripPatchVersion for adapter lookup, and dedupes token addresses per (src, dst) using trimmed strings.

Checklist:

  • Add support for partial updates to minBlockConfirmations
  • Move test to tokens_and_token_pools_test.go?
    • Keeping it where it is for now - can move it later if needed
  • Instead of introducing a new changeset, can we add this to the existing fees adapter?
    • Don't think this is possible at the moment - while both have some similarities, the use case is sufficiently different and may even warrant a new self-serve UI page

@chris-de-leon-cll chris-de-leon-cll self-assigned this Apr 3, 2026
@chris-de-leon-cll chris-de-leon-cll changed the base branch from main to tt/tokens2 April 3, 2026 08:54
@chris-de-leon-cll chris-de-leon-cll changed the title feat: tooling API set token pool token transfer fees feat: tooling API set token pool token transfer fees 2.0 Apr 3, 2026
Copy link
Copy Markdown
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

Adds a new token-pool (v2) token transfer fee configuration changeset and updates the existing Fee Quoter fee changeset to use the new utils.Optional + Resolve flow and patch-stripped adapter lookups.

Changes:

  • Introduce deployment/tokens.SetTokenTransferFee supporting per-pool min block confirmations and per-destination fee config with merge-from-onchain-or-defaults behavior.
  • Add EVM v1_7_0 token adapter + sequences to apply token-pool fee configs and min block confirmations on-chain.
  • Update Fee Quoter SetTokenTransferFee to use utils.Optional, Resolve, StripPatchVersion, and trimmed-address deduping; add/adjust integration tests.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
integration-tests/go.mod Adds local module requirement for ccv/chains/evm/deployment used by new integration tests.
integration-tests/go.sum Updates sums for new dependencies.
integration-tests/deployment/set_token_transfer_fee_test.go Refactors existing fee tests and adds new coverage for v2 token pool fee config + min confirmations.
go.md Updates module relationship diagram to reflect new dependency path.
deployment/utils/optional.go Adds generic Optional[T] type and helpers for partial updates.
deployment/utils/common.go Adds StripPatchVersion helper for adapter registry lookups.
deployment/tokens/product.go Introduces TokenFeeAdapter interface and sequence input types for token-pool fee updates.
deployment/tokens/fees.go Implements new token-pool fee changeset (verify/apply + onchain/default merge).
deployment/fees/models.go Replaces prior “Infer” value wrapper with utils.Optional + Resolve.
deployment/fees/set_token_transfer_fee.go Uses StripPatchVersion, Resolve, and trimmed-address dedupe in verify.
ccv/chains/evm/deployment/v1_7_0/sequences/tokens/set_min_block_confirmations_for_token_pools.go New sequence to set token-pool min block confirmations.
ccv/chains/evm/deployment/v1_7_0/sequences/tokens/set_token_transfer_fee_config_for_token_pools.go New sequence to set/disable per-destination token transfer fee configs for pools.
ccv/chains/evm/deployment/v1_7_0/sequences/tokens/configure_token_for_transfers.go Resolves TokenAdminRegistry address from datastore when not provided.
ccv/chains/evm/deployment/v1_7_0/adapters/tokens.go Extends EVM v1_7_0 token adapter to implement TokenFeeAdapter (set + query fee configs).

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

Comment thread deployment/fees/set_token_transfer_fee.go
Comment thread deployment/tokens/fees.go
Comment thread deployment/tokens/fees.go
Comment thread integration-tests/deployment/set_token_transfer_fee_test.go
Comment thread integration-tests/deployment/set_token_transfer_fee_test.go Outdated
@chris-de-leon-cll chris-de-leon-cll marked this pull request as ready for review April 6, 2026 23:25
@chris-de-leon-cll chris-de-leon-cll requested review from a team as code owners April 6, 2026 23:25
tt-cll
tt-cll previously approved these changes Apr 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Metric feat/tp-token-transfer-fee-configs main
Coverage 70.1% 69.9%

@chris-de-leon-cll chris-de-leon-cll added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 375080d Apr 7, 2026
57 checks passed
@chris-de-leon-cll chris-de-leon-cll deleted the feat/tp-token-transfer-fee-configs branch April 7, 2026 18:44
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.

5 participants