Skip to content

Commit 88c08e6

Browse files
authored
Update DefaultAccessor GetFeeQuoterTokenUpdates and add SolanaUSDCReaderAccessor impl (#1206)
* Update DefaultAccessor GetFeeQuoterTokenUpdates * re-run codegen * add usdc solana reader for accessor
1 parent 63b9aa6 commit 88c08e6

File tree

18 files changed

+184
-86
lines changed

18 files changed

+184
-86
lines changed

chains/evm/deployment/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/Masterminds/semver/v3 v3.4.0
1717
github.com/ethereum/go-ethereum v1.16.2
1818
github.com/smartcontractkit/chainlink-ccip v0.0.0-20250320090719-315440f5b0a7
19-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250910201107-cb4c31b624d3
19+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76
2020
github.com/smartcontractkit/chainlink-deployments-framework v0.37.1
2121
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250808121824-2c3544aab8f3
2222
github.com/smartcontractkit/mcms v0.21.1
@@ -218,8 +218,8 @@ require (
218218
github.com/smartcontractkit/chainlink-aptos v0.0.0-20250414155853-651b4e583ee9 // indirect
219219
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250805210128-7f8a0f403c3a // indirect
220220
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250805210128-7f8a0f403c3a // indirect
221-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 // indirect
222-
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250905211734-167560f092c1 // indirect
221+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 // indirect
222+
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2 // indirect
223223
github.com/smartcontractkit/chainlink-protos/job-distributor v0.12.0 // indirect
224224
github.com/smartcontractkit/chainlink-testing-framework/framework v0.10.15 // indirect
225225
github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 // indirect

chains/evm/deployment/go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,16 +664,16 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250805210128-7
664664
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250805210128-7f8a0f403c3a/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
665665
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250805210128-7f8a0f403c3a h1:38dAlTPRUQHZus5dCnBnQyf/V4oYn0p2svWlbPgHDQ4=
666666
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250805210128-7f8a0f403c3a/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
667-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250910201107-cb4c31b624d3 h1:dMvSvJ7nRAQViYSjdfj/vRGLULY7mJ3X4UgsPMmXgOI=
668-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250910201107-cb4c31b624d3/go.mod h1:1diMLMwfIACeqJFt7ySGaBrJIeUwHTLhVVYlb41EyKk=
669-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
670-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
667+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ=
668+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA=
669+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw=
670+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc=
671671
github.com/smartcontractkit/chainlink-deployments-framework v0.37.1 h1:GqqcSz0egZGS6HGk9CnswvONwVAQsP3VWGpLGj8DR7M=
672672
github.com/smartcontractkit/chainlink-deployments-framework v0.37.1/go.mod h1:nvsOomMe/u/T4vekY7sd10HEGDbvadEw6bUMEblPDP0=
673673
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250808121824-2c3544aab8f3 h1:SRMNzCdQnF2x6+QlL5YSzVeWyJb/BXqMrg+zSGaBPVg=
674674
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250808121824-2c3544aab8f3/go.mod h1:3Lsp38qxen9PABVF+O5eocveQev+hyo9HLAgRodBD4Q=
675-
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250905211734-167560f092c1 h1:HZt/80mhcNw6/MlYBIRracxfHWNqFF0iZ5nZEVZBUgo=
676-
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250905211734-167560f092c1/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
675+
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2 h1:1/KdO5AbUr3CmpLjMPuJXPo2wHMbfB8mldKLsg7D4M8=
676+
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
677677
github.com/smartcontractkit/chainlink-protos/job-distributor v0.12.0 h1:/bhoALRzNXZkdzxBkNM505pMofNy0K0eW1nCzXw+AUI=
678678
github.com/smartcontractkit/chainlink-protos/job-distributor v0.12.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE=
679679
github.com/smartcontractkit/chainlink-testing-framework/framework v0.10.15 h1:OyX2Z68z6VDY4aadqMXjwSTE/0misA5fk8Iq710nxkk=

execute/factory.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ func (p PluginFactory) NewReportingPlugin(
159159
p.ocrConfig.Config.ChainSelector,
160160
offchainConfig.TokenDataObservers,
161161
p.tokenDataEncoder,
162+
p.chainAccessors,
162163
p.extendedReaders,
163164
p.addrCodec,
164165
)

execute/test_utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ func (it *IntTest) Start() *testhelpers.OCR3Runner[[]byte] {
266266
})
267267
}
268268

269+
emptyChainAccessors := make(map[cciptypes.ChainSelector]cciptypes.ChainAccessor)
269270
homeChain := setupHomeChainPoller(it.t, it.lggr, chainConfigInfos)
270271
ctx := it.t.Context()
271272
err := homeChain.Start(ctx)
@@ -277,6 +278,7 @@ func (it *IntTest) Start() *testhelpers.OCR3Runner[[]byte] {
277278
it.dstSelector,
278279
it.tokenObserverConfig,
279280
testhelpers.TokenDataEncoderInstance,
281+
emptyChainAccessors,
280282
it.tokenChainReader,
281283
mockAddrCodec,
282284
)

execute/tokendata/observer/observer.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func NewConfigBasedCompositeObservers(
5858
destChainSelector cciptypes.ChainSelector,
5959
config []pluginconfig.TokenDataObserverConfig,
6060
encoder cciptypes.TokenDataEncoder,
61+
chainAccessors map[cciptypes.ChainSelector]cciptypes.ChainAccessor,
6162
readers map[cciptypes.ChainSelector]contractreader.Extended,
6263
addrCodec cciptypes.AddressCodec,
6364
) (TokenDataObserver, error) {
@@ -67,9 +68,10 @@ func NewConfigBasedCompositeObservers(
6768
// e.g. observers[i] := config.CreateTokenDataObserver()
6869
switch {
6970
case c.USDCCCTPObserverConfig != nil:
70-
observer, err := usdc.NewUSDCTokenDataObserver(ctx, lggr, destChainSelector,
71+
observer, err := usdc.NewUSDCTokenDataObserver(
72+
ctx, lggr, destChainSelector,
7173
*c.USDCCCTPObserverConfig,
72-
encoder.EncodeUSDC, readers, addrCodec)
74+
encoder.EncodeUSDC, chainAccessors, readers, addrCodec)
7375
if err != nil {
7476
return nil, fmt.Errorf("create USDC/CCTP token observer: %w", err)
7577
}

execute/tokendata/observer/observer_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func Test_CompositeTokenDataObserver_EmptyObservers(t *testing.T) {
2727
[]pluginconfig.TokenDataObserverConfig{},
2828
nil,
2929
nil,
30+
nil,
3031
mockAddrCodec,
3132
)
3233
require.NoError(t, err)

execute/tokendata/usdc/usdc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func NewUSDCTokenDataObserver(
3535
destChainSelector cciptypes.ChainSelector,
3636
usdcConfig pluginconfig.USDCCCTPObserverConfig,
3737
attestationEncoder AttestationEncoder,
38+
chainAccessors map[cciptypes.ChainSelector]cciptypes.ChainAccessor,
3839
readers map[cciptypes.ChainSelector]contractreader.Extended,
3940
addrCodec cciptypes.AddressCodec,
4041
) (*USDCTokenDataObserver, error) {
@@ -43,6 +44,7 @@ func NewUSDCTokenDataObserver(
4344
ctx,
4445
lggr,
4546
usdcConfig.Tokens,
47+
chainAccessors,
4648
readers,
4749
addrCodec,
4850
)

execute/tokendata/usdc/usdc_int_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,15 @@ func Test_USDC_CCTP_Flow(t *testing.T) {
247247
},
248248
}
249249

250+
emptyChainAccessors := make(map[cciptypes.ChainSelector]cciptypes.ChainAccessor)
250251
mockAddrCodec := internal.NewMockAddressCodecHex(t)
251252
tkReader, err := usdc.NewUSDCTokenDataObserver(
252253
t.Context(),
253254
logger.Test(t),
254255
baseChain,
255256
config,
256257
testhelpers.USDCEncoder,
258+
emptyChainAccessors,
257259
map[cciptypes.ChainSelector]contractreader.Extended{
258260
fujiChain: mockReader(t, fuji),
259261
sepoliaChain: mockReader(t, sepolia),

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/prometheus/client_golang v1.22.0
1313
github.com/prometheus/client_model v0.6.2
1414
github.com/smartcontractkit/chain-selectors v1.0.67
15-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250910201107-cb4c31b624d3
15+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76
1616
github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6
1717
github.com/smartcontractkit/libocr v0.0.0-20250707144819-babe0ec4e358
1818
github.com/stretchr/testify v1.10.0
@@ -82,8 +82,8 @@ require (
8282
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
8383
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
8484
github.com/shopspring/decimal v1.4.0 // indirect
85-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 // indirect
86-
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250905211734-167560f092c1 // indirect
85+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 // indirect
86+
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2 // indirect
8787
github.com/stephenlacy/go-ethereum-hdwallet v0.0.0-20230913225845-a4fa94429863 // indirect
8888
github.com/stretchr/objx v0.5.2 // indirect
8989
github.com/supranational/blst v0.3.14 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,12 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp
263263
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
264264
github.com/smartcontractkit/chain-selectors v1.0.67 h1:gxTqP/JC40KDe3DE1SIsIKSTKTZEPyEU1YufO1admnw=
265265
github.com/smartcontractkit/chain-selectors v1.0.67/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8=
266-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250910201107-cb4c31b624d3 h1:dMvSvJ7nRAQViYSjdfj/vRGLULY7mJ3X4UgsPMmXgOI=
267-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250910201107-cb4c31b624d3/go.mod h1:1diMLMwfIACeqJFt7ySGaBrJIeUwHTLhVVYlb41EyKk=
268-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
269-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
270-
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250905211734-167560f092c1 h1:HZt/80mhcNw6/MlYBIRracxfHWNqFF0iZ5nZEVZBUgo=
271-
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250905211734-167560f092c1/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
266+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ=
267+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA=
268+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw=
269+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc=
270+
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2 h1:1/KdO5AbUr3CmpLjMPuJXPo2wHMbfB8mldKLsg7D4M8=
271+
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
272272
github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 h1:L6KJ4kGv/yNNoCk8affk7Y1vAY0qglPMXC/hevV/IsA=
273273
github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w=
274274
github.com/smartcontractkit/libocr v0.0.0-20250707144819-babe0ec4e358 h1:+NVzR5LZVazRUunzVn34u+lwnpmn6NTVPCeZOVyQHLo=

0 commit comments

Comments
 (0)