Skip to content

Commit

Permalink
Merge pull request #15860 from smartcontractkit/dk/audit-fixes
Browse files Browse the repository at this point in the history
Upgrade cl-ccip and fix breaking test
  • Loading branch information
dimkouv authored Jan 9, 2025
2 parents f3f4592 + e60de77 commit 3bae747
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ import (
ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big"
"github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight"

"github.com/smartcontractkit/chainlink-common/pkg/types"

"github.com/smartcontractkit/chainlink-ccip/pkg/contractreader"
"github.com/smartcontractkit/chainlink-ccip/pkg/reader"
cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-ccip/pluginconfig"
"github.com/smartcontractkit/chainlink-common/pkg/types"

evmconfig "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/configs/evm"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/client"
Expand Down Expand Up @@ -195,7 +196,7 @@ func Test_USDCReader_MessageHashes(t *testing.T) {

for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
hashes, err1 := usdcReader.MessageHashes(ctx, tc.sourceChain, tc.destChain, tc.tokens)
hashes, err1 := usdcReader.MessagesByTokenID(ctx, tc.sourceChain, tc.destChain, tc.tokens)
require.NoError(t, err1)

require.Equal(t, len(tc.expectedMsgIDs), len(hashes))
Expand Down Expand Up @@ -270,7 +271,7 @@ func Benchmark_MessageHashes(b *testing.B) {
b.ResetTimer()

for i := 0; i < b.N; i++ {
hashes, err := usdcReader.MessageHashes(ctx, sourceChain, destChain, tokens)
hashes, err := usdcReader.MessagesByTokenID(ctx, sourceChain, destChain, tokens)
require.NoError(b, err)
require.Len(b, hashes, tc.tokenCount) // Ensure the number of matches is as expected
}
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/contracts/ccipreader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,9 @@ func TestCCIPReader_NextSeqNum(t *testing.T) {
seqNums, err := s.reader.NextSeqNum(ctx, []cciptypes.ChainSelector{chainS1, chainS2, chainS3})
require.NoError(t, err)
assert.Len(t, seqNums, 3)
assert.Equal(t, cciptypes.SeqNum(10), seqNums[0])
assert.Equal(t, cciptypes.SeqNum(20), seqNums[1])
assert.Equal(t, cciptypes.SeqNum(30), seqNums[2])
assert.Equal(t, cciptypes.SeqNum(10), seqNums[chainS1])
assert.Equal(t, cciptypes.SeqNum(20), seqNums[chainS2])
assert.Equal(t, cciptypes.SeqNum(30), seqNums[chainS3])
}

func TestCCIPReader_GetExpectedNextSequenceNumber(t *testing.T) {
Expand Down

0 comments on commit 3bae747

Please sign in to comment.