Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 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
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
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
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
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
6 changes: 3 additions & 3 deletions legacy/mcms/changesets/deploy_mcms_with_timelock.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/smartcontractkit/chainlink-deployments-framework/operations"

evmchangesets "github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/changesets"
"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
"github.com/smartcontractkit/cld-changesets/legacy/pkg/family/evm"
solchangesets "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/solana/changesets"
evmops "github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)

// migrateAddressBookWithQualifiers migrates an address book to a data store,
Expand Down Expand Up @@ -256,7 +256,7 @@ func grantRoleLogic(e cldf.Environment, cfg GrantRoleInput) (cldf.ChangesetOutpu
}

out := cldf.ChangesetOutput{}
gasBoostConfigs := oputil.GasBoostConfigsForChainMap(cfg.ExistingProposerByChain, cfg.GasBoostConfigPerChain)
gasBoostConfigs := evmops.GasBoostConfigsForChainMap(cfg.ExistingProposerByChain, cfg.GasBoostConfigPerChain)
Comment thread
ecPablo marked this conversation as resolved.
for chain := range cfg.ExistingProposerByChain {
stateForChain := mcmsState[chain]
evmChains := e.BlockChains.EVMChains()
Expand All @@ -268,7 +268,7 @@ func grantRoleLogic(e cldf.Environment, cfg GrantRoleInput) (cldf.ChangesetOutpu
Timelock: stateForChain.Timelock,
CallProxy: stateForChain.CallProxy,
}, false, gasBoostConfigs[chain])
out, err = oputil.AddEVMCallSequenceToCSOutput(e, out, seqReport, err, mcmsStateForProposal, cfg.MCMS, fmt.Sprintf("GrantRolesForTimelock on %s", evmChains[chain]))
out, err = evmops.AddEVMCallSequenceToCSOutput(e, out, seqReport, err, mcmsStateForProposal, cfg.MCMS, fmt.Sprintf("GrantRolesForTimelock on %s", evmChains[chain]))
if err != nil {
return out, fmt.Errorf("failed to grant roles for timelock on chain %d: %w", chain, err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/smartcontractkit/chainlink-deployments-framework/operations"

opevm "github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/operations"
"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
seqevm "github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/sequences"
evmstate "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/evm"
evmops "github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)

// DeployMCMSOption is a function that modifies a TypeAndVersion before or after deployment.
Expand Down Expand Up @@ -201,11 +201,11 @@ func DeployMCMSWithTimelockContracts(
env.OperationsBundle,
opevm.OpDeployTimelock,
chain,
oputil.EVMDeployInput[opevm.OpDeployTimelockInput]{
evmops.EVMDeployInput[opevm.OpDeployTimelockInput]{
ChainSelector: chain.Selector,
DeployInput: opInput,
},
oputil.RetryDeploymentWithGasBoost[opevm.OpDeployTimelockInput](config.GasBoostConfig),
evmops.RetryDeploymentWithGasBoost[opevm.OpDeployTimelockInput](config.GasBoostConfig),
)
execReports = append(execReports, report.ToGenericReport())
if err != nil {
Expand Down Expand Up @@ -242,11 +242,11 @@ func DeployMCMSWithTimelockContracts(
env.OperationsBundle,
opevm.OpDeployCallProxy,
chain,
oputil.EVMDeployInput[opevm.OpDeployCallProxyInput]{
evmops.EVMDeployInput[opevm.OpDeployCallProxyInput]{
ChainSelector: chain.Selector,
DeployInput: opInput,
},
oputil.RetryDeploymentWithGasBoost[opevm.OpDeployCallProxyInput](config.GasBoostConfig),
evmops.RetryDeploymentWithGasBoost[opevm.OpDeployCallProxyInput](config.GasBoostConfig),
)
execReports = append(execReports, report.ToGenericReport())
if err != nil {
Expand Down
14 changes: 7 additions & 7 deletions legacy/mcms/internal/family/evm/changesets/grant_timelock.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"github.com/smartcontractkit/chainlink-deployments-framework/operations"

"github.com/smartcontractkit/cld-changesets/internal/mcmsrole"
"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
seqevm "github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/sequences"
evmops "github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)

// GrantRolesForTimelock grants RBACTimelock roles to the MCMS contracts in timelockContracts.
Expand All @@ -38,13 +38,13 @@ func GrantRolesForTimelock(
timelockContracts *cldfproposalutils.MCMSWithTimelockContracts,
skipIfDeployerKeyNotAdmin bool, // If true, skip role grants if the deployer key is not an admin.
gasBoostConfig *cldfproposalutils.GasBoostConfig,
) (operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]oputil.EVMCallOutput], error) {
) (operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]evmops.EVMCallOutput], error) {
lggr := env.Logger
ctx := env.GetContext()

if timelockContracts == nil {
lggr.Errorw("Timelock contracts not found", "chain", chain.String())
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]oputil.EVMCallOutput]{}, fmt.Errorf("timelock contracts not found for chain %s", chain.String())
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]evmops.EVMCallOutput]{}, fmt.Errorf("timelock contracts not found for chain %s", chain.String())
}

timelock := timelockContracts.Timelock
Expand All @@ -56,16 +56,16 @@ func GrantRolesForTimelock(
// get admin addresses
adminAddresses, err := getAdminAddresses(ctx, timelock)
if err != nil {
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]oputil.EVMCallOutput]{}, fmt.Errorf("failed to get admin addresses: %w", err)
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]evmops.EVMCallOutput]{}, fmt.Errorf("failed to get admin addresses: %w", err)
}
isDeployerKeyAdmin := slices.Contains(adminAddresses, chain.DeployerKey.From.String())
isTimelockAdmin := slices.Contains(adminAddresses, timelock.Address().String())
if !isDeployerKeyAdmin && skipIfDeployerKeyNotAdmin {
lggr.Infow("Deployer key is not admin, skipping role grants", "chain", chain.String())
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]oputil.EVMCallOutput]{}, nil
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]evmops.EVMCallOutput]{}, nil
}
if !isDeployerKeyAdmin && !isTimelockAdmin {
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]oputil.EVMCallOutput]{}, errors.New("neither deployer key nor timelock is admin, cannot grant roles")
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]evmops.EVMCallOutput]{}, errors.New("neither deployer key nor timelock is admin, cannot grant roles")
}

seqDeps := seqevm.SeqGrantRolesTimelockDeps{
Expand Down Expand Up @@ -119,7 +119,7 @@ func GrantRolesForTimelock(
)
if err != nil {
lggr.Errorw("Failed to grant roles for timelock", "chain", chain.String(), "err", err)
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]oputil.EVMCallOutput]{}, err
return operations.SequenceReport[seqevm.SeqGrantRolesTimelockInput, map[uint64][]evmops.EVMCallOutput]{}, err
}

return report, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import (
zkbindings "github.com/smartcontractkit/mcms/sdk/zksync/bindings"

"github.com/smartcontractkit/cld-changesets/internal/semvers"
"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
"github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)

type OpDeployCallProxyInput struct {
Timelock common.Address `json:"timelock"`
}

var OpDeployCallProxy = oputil.NewEVMDeployOperation(
var OpDeployCallProxy = operations.NewEVMDeployOperation(
"evm-call-proxy-deploy",
semver.MustParse("1.0.0"),
"Deploys CallProxy contract on the specified EVM chains",
mcmscontracts.CallProxy,
bindings.CallProxyMetaData,
&oputil.ContractOpts{
&operations.ContractOpts{
Version: &semvers.V1_0_0,
EVMBytecode: common.FromHex(bindings.CallProxyBin),
ZkSyncVMBytecode: zkbindings.CallProxyZkBytecode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
zkbindings "github.com/smartcontractkit/mcms/sdk/zksync/bindings"

"github.com/smartcontractkit/cld-changesets/internal/semvers"
"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
"github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)

type OpDeployTimelockInput struct {
Expand All @@ -23,13 +23,13 @@ type OpDeployTimelockInput struct {
Bypassers []common.Address `json:"bypassers"` // Bypasser of the timelock contract, usually the deployer key
}

var OpDeployTimelock = oputil.NewEVMDeployOperation(
var OpDeployTimelock = operations.NewEVMDeployOperation(
"evm-timelock-deploy",
semver.MustParse("1.0.0"),
"Deploys Timelock contract on the specified EVM chains",
mcmscontracts.RBACTimelock,
bindings.RBACTimelockMetaData,
&oputil.ContractOpts{
&operations.ContractOpts{
Version: &semvers.V1_0_0,
EVMBytecode: common.FromHex(bindings.RBACTimelockBin),
ZkSyncVMBytecode: zkbindings.RBACTimelockZkBytecode,
Expand Down
6 changes: 3 additions & 3 deletions legacy/mcms/internal/family/evm/operations/op_grant_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ package operations

import (
"github.com/Masterminds/semver/v3"
"github.com/ethereum/go-ethereum/accounts/abi/bind/v2"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"

mcmscontracts "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/contracts/mcms"
"github.com/smartcontractkit/mcms/sdk/evm/bindings"

"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
"github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)
Comment thread
ecPablo marked this conversation as resolved.

type OpGrantRoleInput struct {
Account common.Address `json:"account"`
RoleID [32]byte `json:"roleID"`
}

var OpGrantRole = oputil.NewEVMCallOperation(
var OpGrantRole = operations.NewEVMCallOperation(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need to moveNewEVMCallOperation out of legacy as i imagine we will be using operations-gen cli to generate any write or read operations in future?

@ecPablo ecPablo Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I just did that in this PR, the NewEVMCallOperation should be now in mcms/evm/operations/oputils.go

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually i meant should we keep NewEVMCallOperation in legacy as going forward we will likely use operations-gen cli to generate operation? Unless NewEVMCallOperation can be used for different purpose too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the mcms specific ones, since we'll still be using the mcms lib for them I think most of them with the execption of the deploy won't be using the ops gen tool right? So maybe worth keeping it in the non-legacy folder?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for deploy , currently we are using ops gen tool but for the others, i thought we will dedicate everything else to mcms sdk instead and i thought if we are using the mcms sdk then we will not be using NewEVMCallOperation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see now, you're right. Let me move the entire opsutils back to legacy in a followup. Once I refactor grant role it should not have any new usages

"evm-timelock-grant-role",
semver.MustParse("1.0.0"),
"Grants specified role to the ManyChainMultiSig contract on the EVM Timelock contract",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
bindings "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers"
mcmscontracts "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/contracts/mcms"

"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
"github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)

type OpEVMSetConfigMCMInput struct {
Expand All @@ -19,7 +19,7 @@ type OpEVMSetConfigMCMInput struct {
GroupParents [32]uint8 `json:"groupParents"`
}

var OpEVMSetConfigMCM = oputil.NewEVMCallOperation(
var OpEVMSetConfigMCM = operations.NewEVMCallOperation(
"evm-mcm-set-config",
semver.MustParse("1.0.0"),
"Sets Config on the deployed MCM contract",
Expand Down
14 changes: 7 additions & 7 deletions legacy/mcms/internal/family/evm/operations/ops_deploy_mcm.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import (
zkbindings "github.com/smartcontractkit/mcms/sdk/zksync/bindings"

"github.com/smartcontractkit/cld-changesets/internal/semvers"
"github.com/smartcontractkit/cld-changesets/legacy/mcms/internal/family/evm/oputil"
"github.com/smartcontractkit/cld-changesets/mcms/evm/operations"
)

type OpEVMDeployMCMOutput struct {
Address common.Address `json:"address"`
}

var OpDeployProposerMCM = oputil.NewEVMDeployOperation(
var OpDeployProposerMCM = operations.NewEVMDeployOperation(
"evm-proposer-mcm-deploy",
semver.MustParse("1.0.0"),
"Deploys Proposer MCM contract",
mcmscontracts.ProposerManyChainMultisig,
bindings.ManyChainMultiSigMetaData,
&oputil.ContractOpts{
&operations.ContractOpts{
Version: &semvers.V1_0_0,
EVMBytecode: common.FromHex(bindings.ManyChainMultiSigBin),
ZkSyncVMBytecode: zkbindings.ManyChainMultiSigZkBytecode,
Expand All @@ -32,13 +32,13 @@ var OpDeployProposerMCM = oputil.NewEVMDeployOperation(
},
)

var OpDeployBypasserMCM = oputil.NewEVMDeployOperation(
var OpDeployBypasserMCM = operations.NewEVMDeployOperation(
"evm-bypasser-mcm-deploy",
semver.MustParse("1.0.0"),
"Deploys Bypasser MCM contract",
mcmscontracts.BypasserManyChainMultisig,
bindings.ManyChainMultiSigMetaData,
&oputil.ContractOpts{
&operations.ContractOpts{
Version: &semvers.V1_0_0,
EVMBytecode: common.FromHex(bindings.ManyChainMultiSigBin),
ZkSyncVMBytecode: zkbindings.ManyChainMultiSigZkBytecode,
Expand All @@ -48,13 +48,13 @@ var OpDeployBypasserMCM = oputil.NewEVMDeployOperation(
},
)

var OpDeployCancellerMCM = oputil.NewEVMDeployOperation(
var OpDeployCancellerMCM = operations.NewEVMDeployOperation(
"evm-canceller-mcm-deploy",
semver.MustParse("1.0.0"),
"Deploys Canceller MCM contract",
mcmscontracts.CancellerManyChainMultisig,
bindings.ManyChainMultiSigMetaData,
&oputil.ContractOpts{
&operations.ContractOpts{
Version: &semvers.V1_0_0,
EVMBytecode: common.FromHex(bindings.ManyChainMultiSigBin),
ZkSyncVMBytecode: zkbindings.ManyChainMultiSigZkBytecode,
Expand Down
Loading
Loading