Skip to content

Commit

Permalink
update MerkleRoot struct to flat layout, matching contract
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanRHall committed Aug 28, 2024
1 parent df61360 commit db85cc0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions internal/reader/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,12 @@ func (r *CCIPChainReader) CommitReportsGTETimestamp(
// The following types are used to decode the events
// but should be replaced by chain-reader modifiers and use the base cciptypes.CommitReport type.

type Interval struct {
Min uint64
Max uint64
}

type MerkleRoot struct {
SourceChainSelector uint64
Interval Interval
MinSeqNr uint64
MaxSeqNr uint64
MerkleRoot cciptypes.Bytes32
OnRampAddress []byte
}

type TokenPriceUpdate struct {
Expand Down Expand Up @@ -216,8 +213,8 @@ func (r *CCIPChainReader) CommitReportsGTETimestamp(
merkleRoots = append(merkleRoots, cciptypes.MerkleRootChain{
ChainSel: cciptypes.ChainSelector(mr.SourceChainSelector),
SeqNumsRange: cciptypes.NewSeqNumRange(
cciptypes.SeqNum(mr.Interval.Min),
cciptypes.SeqNum(mr.Interval.Max),
cciptypes.SeqNum(mr.MinSeqNr),
cciptypes.SeqNum(mr.MaxSeqNr),
),
MerkleRoot: mr.MerkleRoot,
})
Expand Down

0 comments on commit db85cc0

Please sign in to comment.