Conversation
| resp[contract][chain] = address | ||
| return resp | ||
| } | ||
| type PriceReader interface { |
There was a problem hiding this comment.
This will replace chainlink-ccip/pkg/reader/price_reader.go
| // USDCMessageReader retrieves each of the CCTPv1 MessageSent event created | ||
| // when a ccipSend is made with USDC token transfer. The events are created | ||
| // when the USDC Token pool calls the 3rd party MessageTransmitter contract. | ||
| type USDCMessageReader interface { |
There was a problem hiding this comment.
This will replace chainlink-ccip/pkg/reader/usdc_reader.go for solana and EVM
0f74219 to
c8b62ee
Compare
c8b62ee to
c33e090
Compare
c33e090 to
52d976b
Compare
apidiff results - backwards-incompatible changes detected ❌Module:
|
| Element | Change |
|---|---|
./pkg/types/ccipocr3.DestinationAccessor.GetChainFeePriceUpdate |
changed from func(context.Context, []ChainSelector) map[ChainSelector]TimestampedBig to func(context.Context, []ChainSelector) (map[ChainSelector]TimestampedUnixBig, error) |
./pkg/types/ccipocr3.DestinationAccessor.GetLatestPriceSeqNr |
changed from func(context.Context) (uint64, error) to func(context.Context) (SeqNum, error) |
./pkg/types/ccipocr3.NewTimestampedBig |
changed from func(int64, time.Time) TimestampedBig to func(int64, time.Time) TimestampedBig |
./pkg/types/ccipocr3.PriceReader.GetFeedPricesUSD |
added |
./pkg/types/ccipocr3.PriceReader.GetFeeQuoterTokenUpdates |
added |
./pkg/types/ccipocr3.TimestampedBig |
changed from TimestampedBig to TimestampedBig |
./pkg/types/ccipocr3.TimestampedBig.Timestamp |
changed from time.Time to uint32 |
./pkg/types/ccipocr3.TimestampedBig.Value |
changed from BigInt to *math/big.Int |
./pkg/types/ccipocr3.TimeStampedBigFromUnix |
changed from func(TimestampedUnixBig) TimestampedBig to func(TimestampedUnixBig) TimestampedBig |
./pkg/types/ccipocr3.USDCMessageReader.MessagesByTokenID |
added |
(Full summary: https://github.com/smartcontractkit/chainlink-common/actions/runs/17624183574/#summary-50076828284)
52d976b to
dedf05b
Compare
fd62697 to
5abe799
Compare
5abe799 to
6f15e13
Compare
| var pbSyncs []*pb.SyncRequest | ||
| for _, s := range persistedSyncs { | ||
| pbSyncs = append(pbSyncs, &pb.SyncRequest{ | ||
| ContractName: s.ContractName, | ||
| ContractAddress: s.ContractAddress, | ||
| }) | ||
| } |
There was a problem hiding this comment.
I ran into protoc gen madness trying to reuse the chain accessor pb.SyncRequest, the import "models.proto"; in chainlink-common/pkg/loop/internal/pb/ccipocr3/chainaccessor.proto caused several build issues when trying to import SyncRequest into relayer.proto
| // If grpc call succeeded, store the sync request contents so we can re-populate them if the relayer restarts. | ||
| if err != nil { | ||
| c.mu.Lock() | ||
| c.syncs = append(c.syncs, req) // TODO: maybe dedupe these if needed |
There was a problem hiding this comment.
Sync() is called many times, this will grow very quickly, should likely change to a map
The last remaining components to be migrated off of ChainReader and to ChainAccessor that will be required by Solana and TON are
PriceReaderandUSDCReader.Note: these are not required for the
TON2EVME2E test, but will be needed for future TON milestones and for LOOPPed Solana.This PR:
USDCMessageReaderandPriceReaderinterfaces to theChainAccessorinterfacepkg/types/ccipocr3/chainaccessor.goto a better homeGetLatestPriceSeqNr(ctx context.Context) (uint64, error)uses uint64 as the return value but other code paths useccipocr3.SeqNum, update toccipocr3.SeqNumGetChainFeePriceUpdateto return an errorGetTokenPriceUSDreturns accipocr3.TimestampedUnixBig, butGetChainFeePriceUpdatereturns amap[ccipocr3.ChainSelector]ccipocr3.TimestampedBig, prefer to useTimestampedUnixBigSync()calls inside the grpc client and server implsCorresponding cl-ccip PR: smartcontractkit/chainlink-ccip#1175