fix!: move contract version to internal package#64
Conversation
|
👋 jkongie, 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! |
There was a problem hiding this comment.
Pull request overview
Moves shared semver “contract version” constants out of the public pkg/cldfutil API into a new internal/contractver package, and updates all call sites (operations, sequences, state loaders, and tests) to use the new identifiers.
Changes:
- Introduces
internal/contractverwith semver constants and updates consumers to usecontractver.V*instead ofcldfutil.Version*. - Removes the public
pkg/cldfutil/version.goconstants file (breaking public API change as described). - Updates EVM/Solana/Aptos state code and multiple tests to use the new internal version constants.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/family/solana/sequences/sequence.go | Switches sequence + datastore writes to internal/contractver versions. |
| pkg/family/solana/operations/operation.go | Switches Solana operations’ version to internal/contractver. |
| pkg/family/evm/operations/timelock_deploy.go | Uses internal/contractver for deployed timelock version tagging. |
| pkg/family/evm/operations/mcm_deploy.go | Uses internal/contractver for deployed MCM versions. |
| pkg/family/evm/operations/callproxy_deploy.go | Uses internal/contractver for deployed CallProxy version tagging. |
| pkg/contract/link/view/v10/static_link_token.go | Uses internal/contractver when building TypeAndVersion strings. |
| pkg/contract/link/view/v10/link_token.go | Uses internal/contractver when building TypeAndVersion strings. |
| pkg/cldfutil/version.go | Removes public version constants from pkg/cldfutil (breaking API). |
| link/changesets/deploy_link_token.go | Switches Link changeset TypeAndVersion construction to internal/contractver. |
| link/changesets/deploy_link_token_test.go | Updates assertions to use internal/contractver. |
| legacy/pkg/family/solana/testutils/datastore.go | Updates Solana legacy test utilities to use internal/contractver. |
| legacy/pkg/family/solana/state.go | Updates Solana legacy state loading type/version expectations. |
| legacy/pkg/family/solana/state_test.go | Updates Solana legacy state tests to use internal/contractver. |
| legacy/pkg/family/solana/changesets/transfer_ownership.go | Updates operation version to internal/contractver. |
| legacy/pkg/family/solana/changesets/deploy_timelock.go | Updates timelock deploy/init type/version tags to internal/contractver. |
| legacy/pkg/family/solana/changesets/deploy_mcm.go | Updates MCM deploy/init type/version tags to internal/contractver. |
| legacy/pkg/family/solana/changesets/access_controller.go | Updates access controller deploy/init type/version tags to internal/contractver. |
| legacy/pkg/family/evm/state.go | Updates EVM legacy state loaders to use internal/contractver. |
| legacy/pkg/family/evm/state_test.go | Updates EVM legacy state tests to use internal/contractver. |
| legacy/pkg/family/evm/changesets/deploy_mcms.go | Updates legacy EVM MCMS deploy helper to use internal/contractver. |
| legacy/pkg/family/aptos/state.go | Updates Aptos legacy state loader to use internal/contractver. |
| legacy/pkg/family/aptos/state_test.go | Updates Aptos legacy tests to use internal/contractver. |
| legacy/mcms/changesets/transfer_to_mcms_with_timelock_test.go | Updates legacy MCMS transfer test to use internal/contractver. |
| legacy/mcms/changesets/fund_mcm_pdas_test.go | Updates MCMS PDA funding test type/version tags to internal/contractver. |
| legacy/mcms/changesets/deploy_mcms_with_timelock_test.go | Updates MCMS deploy tests to use internal/contractver. |
| internal/contractver/version.go | Adds new internal semver constants package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ecPablo
left a comment
There was a problem hiding this comment.
LGTM There's some linting errors pending
BREAKING CHANGE: Moves version constants out of the public API and into internal. This also does a slight naming refactor for conciseness of code.
b9d60aa
c2db3b8 to
b9d60aa
Compare
|
🤖 I have created a release *beep* *boop* --- ## [0.5.0](v0.4.0...v0.5.0) (2026-05-29) ### ⚠ BREAKING CHANGES * Deletes the ApproveToken helper and related tests. * Removes the Solana MCMS state views from the public API. * Removes the LinkToken and StaticLinkToken state views from the public API. * Moves version constants out of the public API and into internal. * Remove `ValidateSelectorsInEnvironment` method from `pkg/cldfutil/selectors.go`. ### Features * delete ApproveToken helper ([#70](#70)) ([83f59e7](83f59e7)) * delete Link state views ([#68](#68)) ([d5f643b](d5f643b)) * link refactor ([#71](#71)) ([177dbc5](177dbc5)) * remove Solana MCMS state views ([#69](#69)) ([eb948dd](eb948dd)) * remove ValidateSelectorsInEnvironment method ([#61](#61)) ([72f431f](72f431f)) ### Bug Fixes * move contract version to internal package ([#64](#64)) ([936a00b](936a00b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: app-token-issuer-ops-platform[bot] <275822481+app-token-issuer-ops-platform[bot]@users.noreply.github.com>


BREAKING CHANGE: Moves version constants out of the public API and into internal.
This also does a slight naming refactor for conciseness of code.