Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BCF-3269] - Add unimplemented Chain Reader BatchGetLatestValues placeholders #764

Merged
merged 6 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/pelletier/go-toml/v2 v2.2.0
github.com/prometheus/client_golang v1.17.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240710114009-3df55c8b7e75
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.26.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240710114009-3df55c8b7e75 h1:jDuxV39bMlrsaGEzUylafD7pM4sCSd0nbOsZPj8DqDA=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240710114009-3df55c8b7e75/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86 h1:TYALsn6Jue7xCIcXMel+Ow0SuudVfOUAz6iups946Yw=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
Expand Down
14 changes: 7 additions & 7 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/smartcontractkit/chainlink-solana/integration-tests

go 1.21.7
go 1.22.5

replace github.com/smartcontractkit/chainlink-solana => ../

Expand All @@ -14,11 +14,11 @@ require (
github.com/lib/pq v1.10.9
github.com/pelletier/go-toml/v2 v2.2.2
github.com/rs/zerolog v1.31.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240710114009-3df55c8b7e75
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240708150922-0546185ead68
github.com/smartcontractkit/chainlink-testing-framework v1.31.10
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240710151026-df3b03391fed
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240710151026-df3b03391fed
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240710164543-c4891620b6dd
github.com/smartcontractkit/chainlink-testing-framework v1.32.2
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240712093950-14ade151fb28
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240712093950-14ade151fb28
github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e
github.com/smartcontractkit/seth v1.0.12
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -361,7 +361,7 @@ require (
github.com/smartcontractkit/chainlink-automation v1.0.4 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240702145022-37a2c3a742d1 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240708122322-f972e7dee350 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
Expand Down
20 changes: 10 additions & 10 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1389,24 +1389,24 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240710114009-3df55c8b7e75 h1:jDuxV39bMlrsaGEzUylafD7pM4sCSd0nbOsZPj8DqDA=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240710114009-3df55c8b7e75/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86 h1:TYALsn6Jue7xCIcXMel+Ow0SuudVfOUAz6iups946Yw=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240702145022-37a2c3a742d1 h1:dsTmitRaVizHxoYFoGz4+y/zVa8XnvKUiTaZdx+6t9M=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240702145022-37a2c3a742d1/go.mod h1:6DgCnHMGdBaIh0bLs1dK0MtdeMZfeNhc/nvBUN6KIUg=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240708122322-f972e7dee350 h1:J1Bv8OxYcZ42+Hgqi3ZAnZCcpEBpFYK2LFL94/PsU+s=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240708122322-f972e7dee350/go.mod h1:fHb0CxyVnLFG3FGL3rEe6ckIbNp5iF12bOcpVkR6PWA=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
github.com/smartcontractkit/chainlink-testing-framework v1.31.10 h1:zFsXW04ceKMg37oR0EaxlTPH7vL9YnnNA4VntvsaOZ4=
github.com/smartcontractkit/chainlink-testing-framework v1.31.10/go.mod h1:wSRZGoukZliwfTkghdF4cI1RLHz5k3aDnL+rXhJ6f7k=
github.com/smartcontractkit/chainlink-testing-framework v1.32.2 h1:j5OQ9Xt2aqAGJfpEkh1pxvOiZMVbxypjFEBZkdIEfZg=
github.com/smartcontractkit/chainlink-testing-framework v1.32.2/go.mod h1:OYlILtWsQskqZgzIjRe7PpIEySJVhb4qMnGxOuzrUgA=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240710151026-df3b03391fed h1:4nbBKhy++eVJIdn2vky34+vA6l7ZfT+63/4oqKaQe1M=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240710151026-df3b03391fed/go.mod h1:FZQ6RFxXgiUNWmE6724fZo9m+wryJmBKFavWq0Dcp/M=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240710151026-df3b03391fed h1:J9c+R27O+zznuqD/Smh2Vt0HYx5jmZkECeta85jmqAY=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240710151026-df3b03391fed/go.mod h1:+3j+flO5h0gy/O1+3ZbD8ioT3EmwEbLgWE8PPka9Nvw=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240712093950-14ade151fb28 h1:nOe0tszoZxle+xI1yF4lHaSOApdFHa8qY3GLbaFj9Gc=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240712093950-14ade151fb28/go.mod h1:9qPAxvktO8ioCduh2KXRIlUrJwYb+mVeKzjBgp3Gp14=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240712093950-14ade151fb28 h1:s1cwhXhpsR8UzNv9s5NukhGvMdWtiRCg6VLeTKpUlo8=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240712093950-14ade151fb28/go.mod h1:JLLM06C6ZQrfHFMlQCFXNreYsfcAtXsgUJfzN5cG39Y=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
Expand Down
5 changes: 5 additions & 0 deletions pkg/solana/chainreader/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ func (s *SolanaChainReaderService) GetLatestValue(ctx context.Context, contractN
return nil
}

// BatchGetLatestValues implements the types.ContractReader interface.
func (s *SolanaChainReaderService) BatchGetLatestValues(_ context.Context, _ types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error) {
return nil, errors.New("unimplemented")
}

// QueryKey implements the types.ContractReader interface.
func (s *SolanaChainReaderService) QueryKey(ctx context.Context, contractName string, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType any) ([]types.Sequence, error) {
return nil, errors.New("unimplemented")
Expand Down
15 changes: 15 additions & 0 deletions pkg/solana/chainreader/chain_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,12 @@ func (r *wrappedTestChainReader) GetLatestValue(ctx context.Context, contractNam
return r.service.GetLatestValue(ctx, contractName, method, confidenceLevel, params, returnVal)
}

// BatchGetLatestValues implements the types.ContractReader interface.
func (r *wrappedTestChainReader) BatchGetLatestValues(_ context.Context, _ types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error) {
r.test.Skip("BatchGetLatestValues is not yet supported in Solana")
return nil, nil
}

// QueryKey implements the types.ContractReader interface.
func (r *wrappedTestChainReader) QueryKey(ctx context.Context, contractName string, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType any) ([]types.Sequence, error) {
r.test.Skip("QueryKey is not yet supported in Solana")
Expand Down Expand Up @@ -703,6 +709,10 @@ func (r *chainReaderInterfaceTester) SetTestStructLatestValue(t *testing.T, test
r.reader.testStructQueue = append(r.reader.testStructQueue, testStruct)
}

func (r *chainReaderInterfaceTester) SetBatchLatestValues(t *testing.T, _ BatchCallEntry) {
t.Skip("GetBatchLatestValues is not yet supported in Solana")
}

func (r *chainReaderInterfaceTester) TriggerEvent(t *testing.T, testStruct *TestStruct) {
t.Skip("Events are not yet supported in Solana")
}
Expand Down Expand Up @@ -864,6 +874,11 @@ func (s *skipEventsChainReader) GetLatestValue(ctx context.Context, contractName
return s.ContractReader.GetLatestValue(ctx, contractName, method, confidenceLevel, params, returnVal)
}

func (s *skipEventsChainReader) BatchGetLatestValues(_ context.Context, _ types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error) {
s.t.Skip("BatchGetLatestValues is not yet supported in Solana")
return nil, nil
}

func (s *skipEventsChainReader) QueryKey(ctx context.Context, contractName string, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType any) ([]types.Sequence, error) {
s.t.Skip("QueryKey is not yet supported in Solana")
return nil, nil
Expand Down
Loading