[CLD-1913]: feat(pkg): migrate getSolanaState over from chainlink repo#5
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Solana MCMS-with-timelock “state loader” API and centralizes contract-type constants so Solana deployment tooling can read required addresses/seeds directly from the deployments datastore (replacing prior inlined logic elsewhere).
Changes:
- Introduces
pkg/family/solana.GetStateand supporting types to load Solana MCMS/timelock program IDs, PDA seeds, and access-controller accounts from the datastore. - Adds Solana-specific datastore contract-type constants under
pkg/family/solana. - Adds shared contract-type constants under
pkg/contract.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| pkg/family/solana/state.go | New state loader + state structs for Solana MCMS/timelock addresses/seeds from datastore refs. |
| pkg/family/solana/contract.go | New Solana-specific contract type constants for datastore entries. |
| pkg/contract/contract.go | New shared contract type constants used across packages (incl. Solana roles/timelock). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
96e85b0 to
dc089bb
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Solana “state” loader under pkg/family/solana and centralizes contract-type constants, with the goal of moving Solana MCMS/timelock state loading out of the deployment proposal utilities and relying solely on the datastore.
Changes:
- Added
GetState+ supporting types/helpers to load Solana MCMS-with-timelock state from datastore address refs. - Introduced Solana-specific datastore contract-type constants.
- Added a unit test asserting an error is returned for incomplete (nil/empty) datastore refs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/family/solana/state.go | Implements Solana MCMS/timelock state loading/parsing from datastore refs. |
| pkg/family/solana/state_test.go | Adds test coverage for incomplete datastore inputs. |
| pkg/family/solana/contract.go | Defines Solana MCMS/timelock-related contract type constants. |
| pkg/contract/contract.go | Introduces shared contract type constants (incl. MCMS/timelock related). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Introduce pkg/contract for shared deployment ContractType strings and pkg/family/solana for Solana-specific datastore types plus MCMS/timelock state loading from the environment datastore. CLD-1913
dc089bb to
a53afa6
Compare
| import cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" | ||
|
|
||
| // Contract types for Solana MCMS / timelock entries in the datastore. | ||
| const ( |
There was a problem hiding this comment.
wondering if we should place these inside engine/cld/mcms instead since they are all mcms related?
There was a problem hiding this comment.
okay i can have a look at that, will these constants be used outside of changesets too?
| import cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" | ||
|
|
||
| const ( | ||
| BypasserManyChainMultisig cldf.ContractType = "BypasserManyChainMultiSig" |
There was a problem hiding this comment.
same for these, wondering if we should place these inside engine/cld/mcms instead since they are all mcms related?
Also not sure if we want to port the Link token ones, wdyt?
There was a problem hiding this comment.
are we porting the deploy link token over? I was thinking if we do , then we may need the link token ones?
There was a problem hiding this comment.
I'm not sure, maybe it makes sense for we to own the link tooling? I'm just not so sure about it since we don't own the contract themselves, but maybe it's a special contract similar to mcms
There was a problem hiding this comment.
yeah it will be like MCMS, we also use deploy link token as the basic examples usually for demonstrating changesets or operations api.
| import cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" | ||
|
|
||
| const ( | ||
| BypasserManyChainMultisig cldf.ContractType = "BypasserManyChainMultiSig" |
There was a problem hiding this comment.
I'm not sure, maybe it makes sense for we to own the link tooling? I'm just not so sure about it since we don't own the contract themselves, but maybe it's a special contract similar to mcms
🤖 I have created a release *beep* *boop* --- ## [0.1.0](cld-changesets-v0.0.1...cld-changesets-v0.1.0) (2026-05-06) ### Features * add "catalog create chain metadata" changeset ([#36](#36)) ([c12bb51](c12bb51)) * add catalog create contract metadata changeset ([#27](#27)) ([8ec1cbc](8ec1cbc)) * add CRE workflow deploy changeset and operation ([#1](#1)) ([960fde1](960fde1)) * add target name param to cre deploy changeset ([#3](#3)) ([8b25662](8b25662)) * fund mcms pdas ([#22](#22)) ([821e542](821e542)) * **jobspec:** port jobspec changesets from chainlink ([#21](#21)) ([0ce3f74](0ce3f74)) * link token ([#30](#30)) ([07345c1](07345c1)) * **pkg:** add contract constants and Solana MCMS state loading ([#5](#5)) ([6a2bbee](6a2bbee)) * port BuildProposalFromBatchesV2 ([#24](#24)) ([28d53d7](28d53d7)) * port run changeset from chainlink ([#32](#32)) ([693922f](693922f)) * port solana grant role ([#33](#33)) ([7eca5be](7eca5be)) * port token approve ([#40](#40)) ([04130de](04130de)) * **port:** firedrill mcms with operations api refactor ([#25](#25)) ([6d9010c](6d9010c)) * **solana:** add SOL funding helpers for deployer transfers ([#19](#19)) ([63bebf8](63bebf8)) * **solana:** port over mcms pda loader ([#11](#11)) ([7170ddc](7170ddc)) ### Bug Fixes * **aptos:** move state load ([#8](#8)) ([de58102](de58102)) * **evm:** port state load evm funcs ([#9](#9)) ([99279f1](99279f1)) * **state:** restore addressbook usage ([#17](#17)) ([017cd5e](017cd5e)) --- 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> Co-authored-by: James Kong <61834+jkongie@users.noreply.github.com>
This is for moving getSolanaState out of deployment/common/proposalutils/propose.go
I removed the logic to fetch from addressbook and only left the datastore
Jira: CLD-1913