Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
7b2ded2
chore: move oputils into non legacy folder
ecPablo Jun 20, 2026
55ea3be
feat: add deploy custom topology
ecPablo Jun 20, 2026
f9aab1d
Merge branch 'refs/heads/main' into ecpablo/deploy-topology-mcms
ecPablo Jun 22, 2026
ed8ab5c
feat: add deploy custom topology
ecPablo Jun 23, 2026
44c087b
feat(mcms): add transfer-to-mcms changeset [CLD-2762]
graham-chainlink Jun 23, 2026
9ebd24d
Merge branch 'refs/heads/main' into ecpablo/fund-mcms-pdas
ecPablo Jun 23, 2026
b3cc5cf
feat: fund mcms pdas refactor
ecPablo Jun 23, 2026
5d0d941
Merge branch 'main' into ecpablo/deploy-topology-mcms
ecPablo Jun 23, 2026
b05953d
fix: add checks for duplicate timelock refs or conflicting regs with …
ecPablo Jun 23, 2026
05e8c69
Potential fix for pull request finding
ecPablo Jun 23, 2026
0961740
fix: remove code duplication on sequence registry
ecPablo Jun 23, 2026
0cf7ac3
Potential fix for pull request finding
ecPablo Jun 23, 2026
1bad648
Potential fix for pull request finding
ecPablo Jun 23, 2026
00f1923
Potential fix for pull request finding
ecPablo Jun 23, 2026
08f25ce
Potential fix for pull request finding
ecPablo Jun 23, 2026
41dbbe3
Potential fix for pull request finding
ecPablo Jun 23, 2026
21e456e
Potential fix for pull request finding
ecPablo Jun 23, 2026
c112b33
fix: code cleanup and copilot comments
ecPablo Jun 23, 2026
9e4e51b
Merge branch 'ggoh/CLD-2762/transfer-to-mcms' into ecpablo/deploy-top…
ecPablo Jun 23, 2026
dd1c08b
fix: remove transfer ownership changeset in favor of new changeset in…
ecPablo Jun 23, 2026
64cd08b
fix: remove transfer ownership changeset in favor of new changeset in…
ecPablo Jun 23, 2026
1faf6ec
Merge branch 'ecpablo/deploy-topology-mcms' into ecpablo/fund-mcms-pdas
ecPablo Jun 23, 2026
3e3382d
fix: remove transfer ownership changeset in favor of new changeset in…
ecPablo Jun 23, 2026
76e5e77
Potential fix for pull request finding
ecPablo Jun 24, 2026
9f438dc
fix: copilot comments
ecPablo Jun 24, 2026
4fce639
fix: copilot comments
ecPablo Jun 24, 2026
2e0c579
Merge branch 'main' into ecpablo/deploy-topology-mcms
ecPablo Jun 24, 2026
aea9450
fix: use ExecuteOnChainSequenceAndMerge in changeset.go
ecPablo Jun 24, 2026
0594dd9
fix: remove ds merge
ecPablo Jun 24, 2026
d9fd9f2
fix: use new gas boost types and use familyregistry
ecPablo Jun 24, 2026
f91be67
fix: removed type alias
ecPablo Jun 24, 2026
d95268a
Potential fix for pull request finding
ecPablo Jun 24, 2026
215e6d9
fix: address copilot comments
ecPablo Jun 24, 2026
bac6cf5
fix: restore transfer to mcms changes
ecPablo Jun 24, 2026
99a9ee1
fix: linting
ecPablo Jun 24, 2026
1896f69
fix: linting
ecPablo Jun 24, 2026
efb0b98
Potential fix for pull request finding
ecPablo Jun 24, 2026
5b8cb99
Potential fix for pull request finding
ecPablo Jun 24, 2026
26d8991
Potential fix for pull request finding
ecPablo Jun 24, 2026
ab353bf
Potential fix for pull request finding
ecPablo Jun 24, 2026
30fe931
fix: copilot comments
ecPablo Jun 24, 2026
474032b
feat(mcms): add transfer-to-timelock changeset [CLD-2762] (#99)
graham-chainlink Jun 24, 2026
89d36c1
refactor: introduce family registry helper (#102)
graham-chainlink Jun 24, 2026
49fbcdc
fix: use ExecuteOnChainSequenceAndMerge in changeset.go
ecPablo Jun 24, 2026
0cf80a5
fix: remove ds merge
ecPablo Jun 24, 2026
66c12e6
fix: use new gas boost types and use familyregistry
ecPablo Jun 24, 2026
d417d8f
fix: removed type alias
ecPablo Jun 24, 2026
c6a62fa
Potential fix for pull request finding
ecPablo Jun 24, 2026
491435d
fix: address copilot comments
ecPablo Jun 24, 2026
dc658e0
fix: restore transfer to mcms changes
ecPablo Jun 24, 2026
328a819
fix: linting
ecPablo Jun 24, 2026
3725e62
fix: linting
ecPablo Jun 24, 2026
3899f44
chore: update gitignore
ecPablo Jun 24, 2026
361a70a
Merge branch 'ecpablo/deploy-topology-mcms' into ecpablo/fund-mcms-pdas
ecPablo Jun 24, 2026
53e0365
fix: always set env.Datastore to new datastore with deployed contracts
ecPablo Jun 25, 2026
6180e35
fix: use Collect, assert exact error messages, and add doc.go with ex…
ecPablo Jun 25, 2026
6c772fd
fix: add comment explicitly stating how duplicates are handled
ecPablo Jun 25, 2026
9838c45
fix: add more explicit copy logic for qualifier
ecPablo Jun 25, 2026
31907a3
chore: add .go cache folder to gitignore
ecPablo Jun 25, 2026
3a591e0
Merge branch 'ecpablo/deploy-topology-mcms' into ecpablo/fund-mcms-pdas
ecPablo Jun 25, 2026
0574177
fix: move changeset to solana specific folder since this changeset is…
ecPablo Jun 25, 2026
9676a53
Merge branch 'main' into ecpablo/fund-mcms-pdas
ecPablo Jun 26, 2026
b509d26
fix: lint errors
ecPablo Jun 26, 2026
d2140f0
fix: move solana specific changeset under mcms/solana/changesets/fund…
ecPablo Jun 26, 2026
eb1320f
Merge branch 'main' into ecpablo/fund-mcms-pdas
ecPablo Jun 26, 2026
3cf7c8d
fix: consolidate sequences and ops in the same changesets folder
ecPablo Jun 26, 2026
e2587b4
Merge branch 'main' into ecpablo/fund-mcms-pdas
ecPablo Jun 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions mcms/changesets/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Package changesets provides multi-family MCMS changesets.
//
// Start here when looking for a changeset to use. Each subdirectory is a
// self-contained changeset with a chain-agnostic entrypoint ([Changeset], Config,
// and optionally a registry for per-family sequences).
//
// # Multi-family changesets (this directory)
//
// - set-config — configure MCMS contracts across chains
// - deploy — deploy the standard MCMS topology
// - deploy-custom-topology — deploy an arbitrary MCMS topology
// - transfer-to-timelock — transfer contract ownership to a timelock
// - firedrill — MCMS firedrill operations
//
// Import path pattern:
//
// github.com/smartcontractkit/cld-changesets/mcms/changesets/<name>
//
// Blank-import the chain families you need, for example:
//
// _ "github.com/smartcontractkit/cld-changesets/mcms/evm/set-config"
// _ "github.com/smartcontractkit/cld-changesets/mcms/solana/set-config"
//
// # Family-only changesets
//
// Some changesets are inherently specific to one chain family and have no
// chain-agnostic wrapper. Solana-only changesets live under
// mcms/solana/changesets (for example fund-mcm-pdas). EVM-only changesets
// would follow mcms/evm/changesets if added in the future.
//
// Family implementation packages (mcms/evm/<name>, mcms/solana/<name>) contain
// sequences and operations registered by multi-family changesets via init.
// Solana-only changesets live under mcms/solana/changesets.
package changesets
16 changes: 16 additions & 0 deletions mcms/solana/changesets/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Package changesets holds Solana-only MCMS changesets.
//
// Multi-family changesets (set-config, deploy, firedrill, and others) live under
// mcms/changesets and register per-family implementations from mcms/solana/<name>
// and mcms/evm/<name>. Solana-only changesets that have no chain-agnostic layer
// — because the concept is inherently Solana-specific — live here instead.
//
// # Available changesets
//
// - fund-mcm-pdas — fund MCMS signer PDAs with lamports
// (github.com/smartcontractkit/cld-changesets/mcms/solana/changesets/fund-mcm-pdas)
//
// Import path pattern:
//
// github.com/smartcontractkit/cld-changesets/mcms/solana/changesets/<name>
package changesets
91 changes: 91 additions & 0 deletions mcms/solana/changesets/fund-mcm-pdas/changeset.go
Comment thread
ecPablo marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package fundmcmpdas

import (
"errors"
"fmt"

"github.com/smartcontractkit/chainlink-deployments-framework/changeset/sequenceutils"
"github.com/smartcontractkit/chainlink-deployments-framework/datastore"
cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"

"github.com/smartcontractkit/cld-changesets/internal/maputil"
)

var _ cldf.ChangeSetV2[Config] = Changeset{}

// Changeset funds MCMS signer PDAs on each configured Solana chain.
type Changeset struct{}

func (Changeset) VerifyPreconditions(env cldf.Environment, config Config) error {
if len(config.FundingPerChain) == 0 {
return errors.New("no funding config provided")
}

for chainSelector, chainCfg := range config.FundingPerChain {
if _, ok := env.BlockChains.SolanaChains()[chainSelector]; !ok {
return fmt.Errorf("solana chain %d not found in environment", chainSelector)
}
Comment thread
ecPablo marked this conversation as resolved.
if err := validateMCMSRefs(env, chainSelector, chainCfg); err != nil {
return err
}
if err := validateDeployerBalance(env, chainSelector, chainCfg); err != nil {
return err
}
}

return nil
}

func (Changeset) Apply(e cldf.Environment, config Config) (cldf.ChangesetOutput, error) {
deps := Deps{
BlockChains: e.BlockChains,
DataStore: e.DataStore,
}

var agg sequenceutils.OnChainOutput

for _, chainSelector := range maputil.SortedMapKeys(config.FundingPerChain) {
chainCfg := config.FundingPerChain[chainSelector]

var mergeErr error
agg, mergeErr = sequenceutils.ExecuteOnChainSequenceAndMerge(
e.OperationsBundle,
deps,
SeqFundMCMPDAs,
ChainInput{
ChainSelector: chainSelector,
FundingConfig: chainCfg,
},
agg,
)
if mergeErr != nil {
return buildOutput(e, agg, mergeErr)
}
}

return buildOutput(e, agg, nil)
}

func buildOutput(
e cldf.Environment,
agg sequenceutils.OnChainOutput,
err error,
) (cldf.ChangesetOutput, error) {
ds := datastore.NewMemoryDataStore()
if metaErr := ds.WriteMetadata(agg.Metadata); metaErr != nil {
return cldf.ChangesetOutput{DataStore: ds},
fmt.Errorf("failed to write metadata to datastore: %w", metaErr)
}

partialOutput := cldf.ChangesetOutput{DataStore: ds}
if err != nil {
return partialOutput, err
}

out, buildErr := cldf.NewOutputBuilder(e, ds).Build()
if buildErr != nil {
return out, fmt.Errorf("build changeset output: %w", buildErr)
}

return out, nil
}
Loading
Loading