Skip to content

Formatting fixes#2124

Open
RensR wants to merge 2 commits into
mainfrom
fix-minor-code-cleanup
Open

Formatting fixes#2124
RensR wants to merge 2 commits into
mainfrom
fix-minor-code-cleanup

Conversation

@RensR

@RensR RensR commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Applied a bunch of modern Go upgrades to the chains/evm/deployment code

KodeyThomas
KodeyThomas previously approved these changes Jun 10, 2026
@RensR RensR force-pushed the fix-minor-code-cleanup branch from 29e098a to e4817ff Compare June 10, 2026 11:13
@RensR RensR marked this pull request as ready for review June 10, 2026 11:15
Copilot AI review requested due to automatic review settings June 10, 2026 11:15
@RensR RensR requested review from a team as code owners June 10, 2026 11:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 applies a set of “modern Go” refactors across the chains/evm/deployment code, including adopting newer stdlib helpers (slices, errors.Join), simplifying error-wrapping/returns, and minor cleanup in tests and sequences.

Changes:

  • Refactors various loops/utilities to use newer stdlib helpers (slices.Sort, slices.Contains, errors.Join, for i := range n).
  • Introduces utils.Wrap and uses it to standardize validation error wrapping.
  • Simplifies some if err != nil { return ... } patterns to return x, err.

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 42 comments.

Show a summary per file
File Description
chains/evm/go.mod Reclassifies some dependencies as indirect.
chains/evm/deployment/v2_0_0/testsetup/testsetup.go Updates test config override pointer construction (currently broken).
chains/evm/deployment/v2_0_0/testadapter/test_adapter_test.go Updates pointer construction in test input (currently broken).
chains/evm/deployment/v2_0_0/sequences/tokens/set_allowed_finality_config_for_token_pools.go Small cleanup to inline chain.Selector usage in errors/inputs.
chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity_test.go Replaces local pointer helpers with new(...) (currently broken).
chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain.go Uses utils.Wrap and simplifies redundant returns.
chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_internal_test.go Removes unnecessary range-variable capture.
chains/evm/deployment/v2_0_0/sequences/sequence_fee_quoter_input_creation_test.go Uses slices.Sort for selector ordering.
chains/evm/deployment/v2_0_0/sequences/fee_quoter.go Uses max, for i := range n, and introduces a generic batching helper.
chains/evm/deployment/v2_0_0/sequences/deploy_verifier_resolver_via_create2.go Minor cleanup of local variables / unreachable return.
chains/evm/deployment/v2_0_0/sequences/deploy_chain_contracts_test.go Uses slices.Contains for membership checks.
chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes.go Replaces pointer creation with new(...) (currently broken).
chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes_test.go Replaces pointer helpers with new(...) (currently broken).
chains/evm/deployment/v2_0_0/sequences/cctp/migrate_hybrid_lock_release_liquidity.go Uses slices.Sort and import reordering.
chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box_custom_operations.go Uses slices.Contains to simplify authorization checks.
chains/evm/deployment/v2_0_0/create2_factory/create2_factory_test.go Simplifies error returns.
chains/evm/deployment/v2_0_0/changesets/remove_fee_tokens.go Simplifies error returns.
chains/evm/deployment/v2_0_0/adapters/chain_family.go Replaces pointer creation with new(...) (currently broken).
chains/evm/deployment/v1_6_1/sequences/configure_token_pool_for_remote_chain.go Uses utils.Wrap for validation errors.
chains/evm/deployment/v1_6_0/sequences/fee_quoter.go Removes range-variable captures (Go 1.22+ semantics).
chains/evm/deployment/v1_6_0/sequences/deploy_token_pool_contracts_test.go Removes local pointer helper.
chains/evm/deployment/v1_5_1/sequences/token_pool/configure_token_pool_for_remote_chains.go Adds Validate() method using utils.Wrap and reuses it.
chains/evm/deployment/v1_5_1/sequences/deploy_token_pool_test.go Replaces pointer helper with new(...) (currently broken).
chains/evm/deployment/v1_5_0/sequences/onramp.go Removes range-variable captures (Go 1.22+ semantics).
chains/evm/deployment/v1_5_0/adapters/configimport.go Removes unnecessary loop-var capture in goroutine.
chains/evm/deployment/v1_0_0/transfer_ownership_test.go Replaces ptr.String with new(...) (currently broken).
chains/evm/deployment/v1_0_0/adapters/transfer_ownership_test.go Replaces ptr.String with new(...) (currently broken).
chains/evm/deployment/v1_0_0/adapters/token_adapter.go Uses errors.Join to validate multiple addresses at once.
chains/evm/deployment/v1_0_0/adapters/deployer_test.go Replaces ptr.String with new(...) (currently broken).
chains/evm/deployment/utils/testhelpers/message_decoder_test.go Switches to strings.Builder for PrettyPrintMessage.
chains/evm/deployment/utils/common.go Adds utils.Wrap(err, msg) helper.
chains/evm/deployment/hooks/post_proposal_ccip_send.go Simplifies return (currently changes error/return-value behavior).
chains/evm/deployment/fastcurse_test.go Replaces ptr.String with new(...) (currently broken).
.gitignore Ignores /.gocache.

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

Comment thread chains/evm/deployment/v2_0_0/testsetup/testsetup.go
Comment thread chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes.go
Comment thread chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes.go
Comment thread chains/evm/deployment/v2_0_0/adapters/chain_family.go
Comment thread chains/evm/deployment/v2_0_0/testadapter/test_adapter_test.go
Comment thread chains/evm/deployment/v1_0_0/adapters/deployer_test.go Outdated
Comment thread chains/evm/deployment/fastcurse_test.go Outdated
Comment thread chains/evm/deployment/fastcurse_test.go Outdated
Comment thread chains/evm/deployment/fastcurse_test.go Outdated
Comment thread chains/evm/deployment/hooks/post_proposal_ccip_send.go
carte7000
carte7000 previously approved these changes Jun 15, 2026
@RensR RensR force-pushed the fix-minor-code-cleanup branch 2 times, most recently from c2d0bca to f0d2e06 Compare June 15, 2026 14:33
@RensR RensR enabled auto-merge June 15, 2026 14:33
@RensR RensR force-pushed the fix-minor-code-cleanup branch from f0d2e06 to 046aaa1 Compare June 15, 2026 14:38
@github-actions

Copy link
Copy Markdown
Metric fix-minor-code-cleanup main
Coverage 70.1% 69.9%

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.

4 participants