Skip to content
Merged
Changes from all commits
Commits
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
8 changes: 2 additions & 6 deletions deployment/ccip/shared/deployergroup/deployer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,14 @@ func (d *DeployerGroup) Enact() (cldf.ChangesetOutput, error) {
return d.enactDeployer()
}

func ValidateMCMS(env cldf.Environment, selector uint64, mcmConfig *proposalutils.TimelockConfig) error {
func ValidateMCMSWithState(env cldf.Environment, selector uint64, mcmConfig *proposalutils.TimelockConfig, state stateview.CCIPOnChainState) error {
family, err := chain_selectors.GetSelectorFamily(selector)
if err != nil {
return fmt.Errorf("failed to get chain selector family: %w", err)
}

switch family {
case chain_selectors.FamilyEVM:
state, err := stateview.LoadOnchainState(env)
if err != nil {
return fmt.Errorf("failed to load onchain state: %w", err)
}
mcmsState, ok := state.EVMMCMSStateByChain()[selector]
if !ok {
return fmt.Errorf("failed to get mcms state for chain %d", selector)
Expand Down Expand Up @@ -376,7 +372,7 @@ func (d *DeployerGroup) enactMcms() (cldf.ChangesetOutput, error) {
batches := make([]mcmstypes.BatchOperation, 0, len(dc.transactions))
describedBatches := make([][]string, 0, len(dc.transactions))
for selector, txs := range dc.transactions {
err := ValidateMCMS(d.e, selector, d.mcmConfig)
err := ValidateMCMSWithState(d.e, selector, d.mcmConfig, d.state)
if err != nil {
return cldf.ChangesetOutput{}, fmt.Errorf("failed to validate mcms state: %w", err)
}
Expand Down
Loading