Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG committed Nov 8, 2024
1 parent 9c58a25 commit e933453
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion deployment/ccip/changeset/home_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ func DeployHomeChain(env deployment.Environment, config interface{}) (deployment
if err != nil {
return deployment.ChangesetOutput{}, errors.Wrapf(deployment.ErrInvalidConfig, "%v", err)
}
ab := deployment.NewMemoryAddressBook()
// Note we also deploy the cap reg.
_, err = ccipdeployment.DeployHomeChain(env.Logger, env, env.Chains[cfg.HomeChainSel], cfg.RMNStaticConfig, cfg.RMNDynamicConfig, cfg.NodeOperators, cfg.NodeP2PIDsPerNodeOpAdmin)
_, err = ccipdeployment.DeployHomeChain(env.Logger, env, ab, env.Chains[cfg.HomeChainSel], cfg.RMNStaticConfig, cfg.RMNDynamicConfig, cfg.NodeOperators, cfg.NodeP2PIDsPerNodeOpAdmin)
if err != nil {
env.Logger.Errorw("Failed to deploy cap reg", "err", err, "addresses", env.ExistingAddresses)
return deployment.ChangesetOutput{}, err
Expand Down
4 changes: 2 additions & 2 deletions deployment/ccip/changeset/home_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ func TestDeployHomeChain(t *testing.T) {
"NodeOperator": p2pIds,
},
}
_, err = DeployHomeChain(e, homeChainCfg)
output, err := DeployHomeChain(e, homeChainCfg)
require.NoError(t, err)

require.NoError(t, e.ExistingAddresses.Merge(output.AddressBook))
state, err := ccdeploy.LoadOnchainState(e)
require.NoError(t, err)
require.NotNil(t, state.Chains[homeChainSel].CapabilityRegistry)
Expand Down
2 changes: 1 addition & 1 deletion deployment/ccip/deploy_home_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ func DeployCapReg(
func DeployHomeChain(
lggr logger.Logger,
e deployment.Environment,
ab deployment.AddressBook,
chain deployment.Chain,
rmnHomeStatic rmn_home.RMNHomeStaticConfig,
rmnHomeDynamic rmn_home.RMNHomeDynamicConfig,
nodeOps []capabilities_registry.CapabilitiesRegistryNodeOperator,
nodeP2PIDsPerNodeOpAdmin map[string][][32]byte,
) (*ContractDeploy[*capabilities_registry.CapabilitiesRegistry], error) {
ab := e.ExistingAddresses
// load existing state
state, err := LoadOnchainState(e)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion deployment/ccip/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestDeployCCIPContracts(t *testing.T) {
nodes, err := deployment.NodeInfo(e.NodeIDs, e.Offchain)
require.NoError(t, err)

_, err = DeployHomeChain(lggr, e, e.Chains[homeChainSel],
_, err = DeployHomeChain(lggr, e, e.ExistingAddresses, e.Chains[homeChainSel],
NewTestRMNStaticConfig(),
NewTestRMNDynamicConfig(),
NewTestNodeOperator(e.Chains[homeChainSel].DeployerKey.From),
Expand Down
2 changes: 1 addition & 1 deletion deployment/ccip/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func NewMemoryEnvironment(t *testing.T, lggr logger.Logger, numChains int, numNo
envNodes, err := deployment.NodeInfo(e.NodeIDs, e.Offchain)
require.NoError(t, err)
e.ExistingAddresses = ab
_, err = DeployHomeChain(lggr, e, chains[homeChainSel],
_, err = DeployHomeChain(lggr, e, e.ExistingAddresses, chains[homeChainSel],
NewTestRMNStaticConfig(),
NewTestRMNDynamicConfig(),
NewTestNodeOperator(chains[homeChainSel].DeployerKey.From),
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/ccip-tests/testsetups/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func NewLocalDevEnvironment(t *testing.T, lggr logger.Logger) (ccipdeployment.De

envNodes, err := deployment.NodeInfo(e.NodeIDs, e.Offchain)
require.NoError(t, err)
_, err = ccipdeployment.DeployHomeChain(lggr, e, chains[homeChainSel],
_, err = ccipdeployment.DeployHomeChain(lggr, *e, e.ExistingAddresses, chains[homeChainSel],
ccipdeployment.NewTestRMNStaticConfig(),
ccipdeployment.NewTestRMNDynamicConfig(),
ccipdeployment.NewTestNodeOperator(chains[homeChainSel].DeployerKey.From),
Expand Down

0 comments on commit e933453

Please sign in to comment.