Skip to content

Commit

Permalink
CCIP-3920 Fixing CCIPReader for the fee boosting (#15024)
Browse files Browse the repository at this point in the history
* Failing test

* Failing test

* Changeset

* Bump

* Bump
  • Loading branch information
mateusz-sekara authored Oct 31, 2024
1 parent a1e4f8e commit 6b29cdb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-pants-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Minor fixes to the CCIPChainReader enabling proper serialization #internal
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ func TestCCIPReader_MsgsBetweenSeqNums(t *testing.T) {
Receiver: utils.RandomAddress().Bytes(),
ExtraArgs: make([]byte, 0),
FeeToken: utils.RandomAddress(),
FeeTokenAmount: big.NewInt(0),
FeeValueJuels: big.NewInt(0),
FeeTokenAmount: big.NewInt(1),
FeeValueJuels: big.NewInt(2),
TokenAmounts: make([]ccip_reader_tester.InternalEVM2AnyTokenTransfer, 0),
})
assert.NoError(t, err)
Expand All @@ -274,8 +274,8 @@ func TestCCIPReader_MsgsBetweenSeqNums(t *testing.T) {
Receiver: utils.RandomAddress().Bytes(),
ExtraArgs: make([]byte, 0),
FeeToken: utils.RandomAddress(),
FeeTokenAmount: big.NewInt(0),
FeeValueJuels: big.NewInt(0),
FeeTokenAmount: big.NewInt(3),
FeeValueJuels: big.NewInt(4),
TokenAmounts: make([]ccip_reader_tester.InternalEVM2AnyTokenTransfer, 0),
})
assert.NoError(t, err)
Expand Down Expand Up @@ -303,7 +303,13 @@ func TestCCIPReader_MsgsBetweenSeqNums(t *testing.T) {
return msgs[i].Header.SequenceNumber < msgs[j].Header.SequenceNumber
})
require.Equal(t, cciptypes.SeqNum(10), msgs[0].Header.SequenceNumber)
require.Equal(t, big.NewInt(1), msgs[0].FeeTokenAmount.Int)
require.Equal(t, big.NewInt(2), msgs[0].FeeValueJuels.Int)

require.Equal(t, cciptypes.SeqNum(15), msgs[1].Header.SequenceNumber)
require.Equal(t, big.NewInt(3), msgs[1].FeeTokenAmount.Int)
require.Equal(t, big.NewInt(4), msgs[1].FeeValueJuels.Int)

for _, msg := range msgs {
require.Equal(t, chainS1, msg.Header.SourceChainSelector)
require.Equal(t, chainD, msg.Header.DestChainSelector)
Expand Down

0 comments on commit 6b29cdb

Please sign in to comment.