From ad0aba69ff2b4950b55e13bcfb5aa0fabb58b2d2 Mon Sep 17 00:00:00 2001 From: 0xsuryansh Date: Tue, 6 Aug 2024 03:08:17 +0530 Subject: [PATCH] fix: trial fix for smoke tests Signed-off-by: 0xsuryansh --- .../ocr2/plugins/ccip/testhelpers/ccip_contracts.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go b/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go index 0653e585d9..ac19cdc6c5 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go @@ -1490,10 +1490,17 @@ func (args *ManualExecArgs) execute(report *commit_store.CommitStoreCommitReport msg.GasLimit = args.GasLimit } + destGasAmounts := make([]*big.Int, len(msg.TokenAmounts)) + + // Initialize each element in the slice to a new big.Int value in one line using a loop + for i := range destGasAmounts { + destGasAmounts[i] = new(big.Int) + } + // CCIP-2950 create a new object for evm_2_evm_offramp.EVM2EVMOffRampGasLimitOverride evm2evmOffRampGasLimitOverride := &evm_2_evm_offramp.EVM2EVMOffRampGasLimitOverride{ ReceiverExecutionGasLimit: msg.GasLimit, - DestGasAmounts: args.destGasAmounts, + DestGasAmounts: destGasAmounts, } manualExecGasLimits = append(manualExecGasLimits, evm2evmOffRampGasLimitOverride)