Skip to content

Add support for view functions with params#1632

Open
RensR wants to merge 2 commits intomainfrom
add-support-for-read-ops-with-params
Open

Add support for view functions with params#1632
RensR wants to merge 2 commits intomainfrom
add-support-for-read-ops-with-params

Conversation

@RensR
Copy link
Collaborator

@RensR RensR commented Feb 4, 2026

This PR adds view parameter support and generates all the functions that are used on the develop branch for v2. This is done on main because main is the place where 1.6 changes should be made, while develop is for 1.7 only.

@RensR RensR marked this pull request as ready for review February 4, 2026 12:41
@RensR RensR requested review from a team as code owners February 4, 2026 12:41
Copilot AI review requested due to automatic review settings February 4, 2026 12:41

.PHONY: operations
operations: pnpmdep
#./scripts/compile_all
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should have been on, turning it off makes it quicker but could lead to wrong ops being generated

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 adds support for view functions with parameters by implementing read operations for contract getter functions across multiple CCIP versions (1.6.0, 1.6.1). The changes enable generation of read operations for view functions that accept parameters, previously limited to write operations only.

Changes:

  • Extended operations generator to create Args structs for read operations with multiple parameters
  • Added read/view contract methods (getToken, getRouter, getDestChainConfig, etc.) to TokenPool, OnRamp, OffRamp, and FeeQuoter contracts
  • Updated type references in sequences to use local operation types instead of generated gobindings
  • Uncommented compilation script in Makefile to enable operations generation

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
chains/evm/deployment/v1_6_4/changesets/apply_chain_updates_test.go Reordered import statement for burn_mint_erc20
chains/evm/deployment/v1_6_1/operations/token_pool/token_pool.go Added view functions and supporting types for TokenPool contract operations
chains/evm/deployment/v1_6_0/sequences/onramp.go Updated type references to use local operation types and changed function input types from any to struct{}
chains/evm/deployment/v1_6_0/sequences/offramp.go Updated type references to use local operation types and changed function input types
chains/evm/deployment/v1_6_0/sequences/fee_quoter.go Renamed GetTokenTransferFeeConfigInput to GetTokenTransferFeeConfigArgs and updated type references
chains/evm/deployment/v1_6_0/operations/onramp/onramp.go Added view functions with parameter support and replaced gobindings usage with local types
chains/evm/deployment/v1_6_0/operations/offramp/offramp.go Added view functions and SourceChainConfig struct, replaced gobindings with local types
chains/evm/deployment/v1_6_0/operations/fee_quoter/fee_quoter.go Added view functions and renamed GetTokenTransferFeeConfigInput to GetTokenTransferFeeConfigArgs
chains/evm/deployment/operations_gen_config.yaml Added public view functions to contract configurations
chains/evm/cmd/operations-gen/operations.tmpl Renamed WriteArgStructs to ArgStructs to support both read and write operations
chains/evm/cmd/operations-gen/main.go Added Args struct generation for read operations with multiple parameters
chains/evm/GNUmakefile Uncommented compile_all script to enable operations generation

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

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Metric add-support-for-read-ops-with-params main
Coverage 70.0% 69.7%

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.

1 participant