Skip to content

feat: new mcms deploy changeset#89

Draft
graham-chainlink wants to merge 2 commits into
mainfrom
ggoh/temp-mcms-refactor
Draft

feat: new mcms deploy changeset#89
graham-chainlink wants to merge 2 commits into
mainfrom
ggoh/temp-mcms-refactor

Conversation

@graham-chainlink

@graham-chainlink graham-chainlink commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Refactor and redesigne to better accomodate new chains and utilising the new utils method integrated in cldf. The deploy changeset is chain agonistic and uses the registry pattern to add new chains that we want to deploy, each chain specific implementation is localised in its own folder eg mcms/evm.

  • no more addressbook
  • remove usage of evm bindings to check if contracts are deployed (now uses datastore lookup directly)
  • utilise new utils such as ds.WriteMetadata and ChangesetOutputBuilder.

new structure

mcms/
├── changesets/
│   ├── deploy/          # deploy changeset + deploy registry + types
│   │   ├── changeset.go
│   │   ├── registry.go
│   │   └── types.go
│   └── setconfig/       # setconfig changeset + setconfig registry + types
│       ├── changeset.go
│       ├── registry.go
│       └── types.go
├── evm/
│   ├── deploy/          # registers with changesets/deploy
│   └── setconfig/       # registers with changesets/setconfig
├── solana/
│   └── ...
└── operations/          # legacy — consider moving under evm/ or legacy/

This new folder structure feels more intuitive and user wanting to extend mcms with new chain should be able to follow the pattern easily

JIRA: https://smartcontract-it.atlassian.net/browse/CLD-2719

Refactor and redesigne to better accomodate new chains and utilising the new utils method integrated in cldf. The deploy changeset is chain agonistic and uses the registry pattern to add new chains that we want to deploy, each chain specific implementation is localised in its own folder eg mcms/evm.

new structure
```
mcms/
├── changesets/
│   ├── deploy/          # deploy changeset + deploy registry + types
│   │   ├── changeset.go
│   │   ├── registry.go
│   │   └── types.go
│   └── setconfig/       # setconfig changeset + setconfig registry + types
│       ├── changeset.go
│       ├── registry.go
│       └── types.go
├── evm/
│   ├── deploy/          # registers with changesets/deploy
│   └── setconfig/       # registers with changesets/setconfig
├── solana/
│   └── ...
└── operations/          # legacy — consider moving under evm/ or legacy/
```

This new folder structure feels more intuitive and user wanting to extend mcms with new chain should be able to follow the pattern easily

JIRA: https://smartcontract-it.atlassian.net/browse/CLD-2719
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

Release impact (release-please)

Current version 0.7.1 (on main)
After merge 0.8.0 (minor bump)

PR title: feat: new mcms deploy changeset

Merging this PR as-is will contribute a minor bump to the next release-please release PR.

Conventional commit → bump

Intent PR title prefix Bump
Bug fix fix: patch
New feature feat: minor
Breaking change feat!: / fix!: or BREAKING CHANGE: / BREAKING-CHANGE: in description major
No release chore:, docs:, ci:, refactor:, etc. none

Update the PR title before merge if you need a different bump (squash commit message = PR title).

Preview is based on this PR title only. The release-please release PR may include other unreleased commits already on main.

Comment on lines +262 to +284
func (d *deployer) getTimelockAdminAddresses(timelockAddr common.Address) ([]common.Address, error) {
timelock, err := bindings.NewRBACTimelock(timelockAddr, d.chain.Client)
if err != nil {
return nil, fmt.Errorf("bind timelock: %w", err)
}

callOpts := &bind.CallOpts{Context: d.b.GetContext()}
count, err := timelock.GetRoleMemberCount(callOpts, mcmsrole.AdminRole.ID)
if err != nil {
return nil, fmt.Errorf("get admin count: %w", err)
}

admins := make([]common.Address, 0, count.Uint64())
for i := range count.Uint64() {
member, err := timelock.GetRoleMember(callOpts, mcmsrole.AdminRole.ID, new(big.Int).SetUint64(i))
if err != nil {
return nil, fmt.Errorf("get admin member %d: %w", i, err)
}
admins = append(admins, member)
}

return admins, nil
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

IS there better way to do this like using the mcms inspector?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces a new chain-family–agnostic MCMS “deploy with timelock” changeset using a registry pattern, with an EVM family implementation and accompanying tests.

Changes:

  • Added mcms/changesets/deploy changeset package (registry, types, changeset implementation, and docs) to dispatch per-chain deployments by chain family.
  • Added EVM deploy family implementation under mcms/evm/deploy (sequence, datastore address helpers, and auto-registration).
  • Updated Go module dependencies (notably chainlink-deployments-framework and mcms) and added EVM-focused changeset tests.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mcms/evm/deploy/sequence.go EVM per-chain deployment sequence for MCMS+timelock and role grants.
mcms/evm/deploy/register.go Auto-registers EVM family in deploy registry and validates EVM chains.
mcms/evm/deploy/addresses.go Loads existing deployed addresses from datastore and builds AddressRefs for new deployments.
mcms/changesets/deploy/types.go Defines shared input/deps/types for family implementations.
mcms/changesets/deploy/registry.go Implements the registry for per-family deploy implementations and chain grouping.
mcms/changesets/deploy/families.go Exposes RegisterFamilies helper for external family registrations.
mcms/changesets/deploy/doc.go Godoc describing usage and how to add new chain families.
mcms/changesets/deploy/changeset.go Main changeset: verifies, runs per-chain sequences in parallel, merges metadata into datastore.
mcms/changesets/deploy/changeset_evm_test.go Tests for fresh, partial, and multi-chain EVM deployments and timelock roles.
go.mod Bumps core deps and adds new indirect deps.
go.sum Updates dependency checksums accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mcms/changesets/deploy/changeset.go
Comment thread mcms/evm/deploy/sequence.go
Comment thread mcms/evm/deploy/register.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants