Skip to content

Commit c63d3dd

Browse files
fix: resolve refs (#2011)
1 parent 6396d35 commit c63d3dd

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

chains/evm/deployment/v1_0_0/adapters/deployer_test.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ func TestUpdateMCMSConfig(t *testing.T) {
171171

172172
// get recently deployed MCMS addresses
173173
mcmsRefs := make(map[uint64][]datastore.AddressRef)
174+
partialMCMSRefs := make(map[uint64][]datastore.AddressRef)
174175
for _, sel := range []uint64{selector1, selector2} {
175176
cancellerRef, err := datastore_utils.FindAndFormatRef(env.DataStore, datastore.AddressRef{
176177
ChainSelector: sel,
@@ -181,19 +182,26 @@ func TestUpdateMCMSConfig(t *testing.T) {
181182
require.NoError(t, err)
182183
bypasserRef, err := datastore_utils.FindAndFormatRef(env.DataStore, datastore.AddressRef{
183184
ChainSelector: sel,
184-
Type: datastore.ContractType(deploymentutils.CancellerManyChainMultisig),
185+
Type: datastore.ContractType(deploymentutils.BypasserManyChainMultisig),
185186
Qualifier: "CLLCCIP",
186187
Version: semver.MustParse("1.0.0"),
187188
}, sel, datastore_utils.FullRef)
188189
require.NoError(t, err)
189190
proposerRef, err := datastore_utils.FindAndFormatRef(env.DataStore, datastore.AddressRef{
190191
ChainSelector: sel,
191-
Type: datastore.ContractType(deploymentutils.CancellerManyChainMultisig),
192+
Type: datastore.ContractType(deploymentutils.ProposerManyChainMultisig),
192193
Qualifier: "CLLCCIP",
193194
Version: semver.MustParse("1.0.0"),
194195
}, sel, datastore_utils.FullRef)
195196
require.NoError(t, err)
196197
mcmsRefs[sel] = append(mcmsRefs[sel], cancellerRef, bypasserRef, proposerRef)
198+
for _, ref := range mcmsRefs[sel] {
199+
partialMCMSRefs[sel] = append(partialMCMSRefs[sel], datastore.AddressRef{
200+
Type: ref.Type,
201+
Qualifier: ref.Qualifier,
202+
Version: ref.Version,
203+
})
204+
}
197205
}
198206

199207
// check that deployed config is correct
@@ -221,11 +229,11 @@ func TestUpdateMCMSConfig(t *testing.T) {
221229
Chains: map[uint64]deployops.UpdateMCMSConfigInputPerChain{
222230
selector1: {
223231
MCMConfig: testhelpers.SingleGroupMCMSTwoSigners(),
224-
MCMContracts: mcmsRefs[selector1],
232+
MCMContracts: partialMCMSRefs[selector1],
225233
},
226234
selector2: {
227235
MCMConfig: testhelpers.SingleGroupMCMSTwoSigners(),
228-
MCMContracts: mcmsRefs[selector2],
236+
MCMContracts: partialMCMSRefs[selector2],
229237
},
230238
},
231239
MCMS: mcms.Input{

deployment/deploy/mcms.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func updateMCMSConfigApply(d *DeployerRegistry, mcmsRegistry *changesets.MCMSRea
149149

150150
mcmsContracts = append(mcmsContracts, mcmsRef)
151151
}
152+
chainCfg.MCMContracts = mcmsContracts
152153

153154
// find existing addresses for this chain from the env
154155
existingAddrs := d.ExistingAddressesForChain(e, selector)

0 commit comments

Comments
 (0)