99 "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/v1_7_0/operations/fee_quoter"
1010 "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/v1_7_0/operations/offramp"
1111 "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/v1_7_0/operations/onramp"
12+ "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/v1_7_0/operations/proxy"
1213 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract"
1314 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router"
1415 "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences"
@@ -74,7 +75,7 @@ var ConfigureChainForLanes = cldf_ops.NewSequence(
7475 BaseExecutionGasCost : remoteConfig .BaseExecutionGasCost ,
7576 DefaultCCVs : defaultOutboundCCVs ,
7677 LaneMandatedCCVs : laneMandatedOutboundCCVs ,
77- DefaultExecutor : common .HexToAddress (remoteConfig .DefaultExecutor ),
78+ DefaultExecutor : common .HexToAddress (remoteConfig .DefaultExecutor ), // The proxy address
7879 OffRamp : remoteConfig .OffRamp ,
7980 })
8081 feeQuoterArgs = append (feeQuoterArgs , fee_quoter.DestChainConfigArgs {
@@ -94,10 +95,17 @@ var ConfigureChainForLanes = cldf_ops.NewSequence(
9495 OffRamp : common .HexToAddress (input .OffRamp ),
9596 })
9697 defaultExecutor := common .HexToAddress (remoteConfig .DefaultExecutor )
97- if destChainSelectorsPerExecutor [defaultExecutor ] == nil {
98- destChainSelectorsPerExecutor [defaultExecutor ] = []executor.RemoteChainConfigArgs {}
98+ getTargetReport , err := cldf_ops .ExecuteOperation (b , proxy .GetTarget , chain , contract.FunctionInput [any ]{
99+ ChainSelector : chain .Selector ,
100+ Address : defaultExecutor ,
101+ })
102+ if err != nil {
103+ return sequences.OnChainOutput {}, fmt .Errorf ("failed to get target address of Executor(%s) on chain %s: %w" , defaultExecutor , chain , err )
104+ }
105+ if destChainSelectorsPerExecutor [getTargetReport .Output ] == nil {
106+ destChainSelectorsPerExecutor [getTargetReport .Output ] = []executor.RemoteChainConfigArgs {}
99107 }
100- destChainSelectorsPerExecutor [defaultExecutor ] = append (destChainSelectorsPerExecutor [defaultExecutor ], executor.RemoteChainConfigArgs {
108+ destChainSelectorsPerExecutor [getTargetReport . Output ] = append (destChainSelectorsPerExecutor [getTargetReport . Output ], executor.RemoteChainConfigArgs {
101109 DestChainSelector : remoteSelector ,
102110 Config : remoteConfig .ExecutorDestChainConfig ,
103111 })
@@ -126,18 +134,18 @@ var ConfigureChainForLanes = cldf_ops.NewSequence(
126134 writes = append (writes , onRampReport .Output )
127135
128136 // ApplyDestChainUpdates on each Executor
129- for ExecutorAddr , destChainSelectorsToAdd := range destChainSelectorsPerExecutor {
130- ExecutorReport , err := cldf_ops .ExecuteOperation (b , executor .ApplyDestChainUpdates , chain , contract.FunctionInput [executor.ApplyDestChainUpdatesArgs ]{
137+ for executorAddr , destChainSelectorsToAdd := range destChainSelectorsPerExecutor {
138+ executorReport , err := cldf_ops .ExecuteOperation (b , executor .ApplyDestChainUpdates , chain , contract.FunctionInput [executor.ApplyDestChainUpdatesArgs ]{
131139 ChainSelector : chain .Selector ,
132- Address : ExecutorAddr ,
140+ Address : executorAddr ,
133141 Args : executor.ApplyDestChainUpdatesArgs {
134142 DestChainSelectorsToAdd : destChainSelectorsToAdd ,
135143 },
136144 })
137145 if err != nil {
138- return sequences.OnChainOutput {}, fmt .Errorf ("failed to apply dest chain config updates to Executor(%s) on chain %s: %w" , ExecutorAddr , chain , err )
146+ return sequences.OnChainOutput {}, fmt .Errorf ("failed to apply dest chain config updates to Executor(%s) on chain %s: %w" , executorAddr , chain , err )
139147 }
140- writes = append (writes , ExecutorReport .Output )
148+ writes = append (writes , executorReport .Output )
141149 }
142150
143151 // ApplyDestChainConfigUpdates on FeeQuoter
0 commit comments