Skip to content

Commit

Permalink
refactor(common/changeset): removes bundle check
Browse files Browse the repository at this point in the history
Removes check that the addresses contains all the
types and versions defined in a bundle.

It is not required that the MCMS state contracts
be non-nil.  There is a Validate() method and the
docstring states that nil values are possible.
  • Loading branch information
MStreet3 committed Feb 19, 2025
1 parent 5759bab commit aeafd44
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions deployment/common/changeset/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,8 @@ func MaybeLoadMCMSWithTimelockChainState(

// the same contract can have different roles
multichain = deployment.NewTypeAndVersion(types.ManyChainMultisig, deployment.Version1_0_0)

// Convert map keys to a slice
wantTypes = []deployment.TypeAndVersion{timelock, proposer, canceller, bypasser, callProxy}
)

// Ensure the addresses contains the bundle of wanted contract types
ok, err := deployment.AddressesContainBundle(addresses, wantTypes)
if err != nil {
return nil, fmt.Errorf("unable to check MCMS contracts on chain %s error: %w", chain.Name(), err)
}

if !ok {
return nil, fmt.Errorf("missing a contract from bundle on chain %s", chain.Name())
}

for address, tv := range addresses {
switch {
case tv.Type == timelock.Type && tv.Version.String() == timelock.Version.String():
Expand Down

0 comments on commit aeafd44

Please sign in to comment.