diff --git a/integration-tests/smoke/ccip/ccip_messaging_test.go b/integration-tests/smoke/ccip/ccip_messaging_test.go index fc154b848be..c4153205442 100644 --- a/integration-tests/smoke/ccip/ccip_messaging_test.go +++ b/integration-tests/smoke/ccip/ccip_messaging_test.go @@ -82,12 +82,13 @@ func Test_CCIPMessaging(t *testing.T) { ) t.Run("data message to eoa", func(t *testing.T) { + receiver := common.HexToAddress("0xdead") out = runMessagingTestCase(messagingTestCase{ testCaseSetup: setup, replayed: replayed, nonce: nonce, }, - common.HexToAddress("0xdead"), + receiver[:], []byte("hello eoa"), nil, // default extraArgs testhelpers.EXECUTION_STATE_SUCCESS, // success because offRamp won't call an EOA @@ -95,13 +96,14 @@ func Test_CCIPMessaging(t *testing.T) { }) t.Run("message to contract not implementing CCIPReceiver", func(t *testing.T) { + receiver := state.Chains[destChain].FeeQuoter.Address() out = runMessagingTestCase( messagingTestCase{ testCaseSetup: setup, replayed: out.replayed, nonce: out.nonce, }, - state.Chains[destChain].FeeQuoter.Address(), + receiver[:], []byte("hello FeeQuoter"), nil, // default extraArgs testhelpers.EXECUTION_STATE_SUCCESS, // success because offRamp won't call a contract not implementing CCIPReceiver @@ -111,13 +113,14 @@ func Test_CCIPMessaging(t *testing.T) { t.Run("message to contract implementing CCIPReceiver", func(t *testing.T) { latestHead, err := e.Env.Chains[destChain].Client.HeaderByNumber(ctx, nil) require.NoError(t, err) + receiver := state.Chains[destChain].Receiver.Address() out = runMessagingTestCase( messagingTestCase{ testCaseSetup: setup, replayed: out.replayed, nonce: out.nonce, }, - state.Chains[destChain].Receiver.Address(), + receiver[:], []byte("hello CCIPReceiver"), nil, // default extraArgs testhelpers.EXECUTION_STATE_SUCCESS, @@ -136,13 +139,14 @@ func Test_CCIPMessaging(t *testing.T) { t.Run("message to contract implementing CCIPReceiver with low exec gas", func(t *testing.T) { latestHead, err := e.Env.Chains[destChain].Client.HeaderByNumber(ctx, nil) require.NoError(t, err) + receiver := state.Chains[destChain].Receiver.Address() out = runMessagingTestCase( messagingTestCase{ testCaseSetup: setup, replayed: out.replayed, nonce: out.nonce, }, - state.Chains[destChain].Receiver.Address(), + receiver[:], []byte("hello CCIPReceiver with low exec gas"), testhelpers.MakeEVMExtraArgsV2(1, false), // 1 gas is too low. testhelpers.EXECUTION_STATE_FAILURE, // state would be failed onchain due to low gas @@ -296,7 +300,7 @@ func sleepAndReplay(t *testing.T, e testhelpers.DeployedEnv, sourceChain, destCh func runMessagingTestCase( tc messagingTestCase, - receiver common.Address, + receiver []byte, msgData []byte, extraArgs []byte, expectedExecutionState int, @@ -308,10 +312,11 @@ func runMessagingTestCase( }, tc.sourceChain, tc.sender) require.NoError(tc.t, err) require.Equal(tc.t, tc.nonce, latestNonce) + require.LessOrEqual(tc.t, 32, receiver) startBlocks := make(map[uint64]*uint64) msgSentEvent := testhelpers.TestSendRequest(tc.t, tc.deployedEnv.Env, tc.onchainState, tc.sourceChain, tc.destChain, false, router.ClientEVM2AnyMessage{ - Receiver: common.LeftPadBytes(receiver.Bytes(), 32), + Receiver: common.LeftPadBytes(receiver, 32), Data: msgData, TokenAmounts: nil, FeeToken: common.HexToAddress("0x0"),