Formatting fixes#2124
Open
RensR wants to merge 2 commits into
Open
Conversation
KodeyThomas
previously approved these changes
Jun 10, 2026
29e098a to
e4817ff
Compare
Contributor
There was a problem hiding this comment.
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.Wrapand uses it to standardize validation error wrapping. - Simplifies some
if err != nil { return ... }patterns toreturn 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.
carte7000
previously approved these changes
Jun 15, 2026
c2d0bca to
f0d2e06
Compare
f0d2e06 to
046aaa1
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applied a bunch of modern Go upgrades to the chains/evm/deployment code