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-3288] - Add unimplemented Chain Reader ReplaySequence placeholders #801

Closed
wants to merge 3 commits into from
Closed
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.20240712101200-5b11e6cc6e86
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240715171956-cc622d3f7291
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.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-common v0.1.7-0.20240715171956-cc622d3f7291 h1:X1GKI3vdC/IKoHolU8ZqqUs9rKvZ0XKOTrQxolk/L8U=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240715171956-cc622d3f7291/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
8 changes: 4 additions & 4 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240712101200-5b11e6cc6e86
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240715171956-cc622d3f7291
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e
github.com/smartcontractkit/chainlink-testing-framework v1.32.2
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240712150704-055a9d24f80a
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240712150704-055a9d24f80a
github.com/smartcontractkit/chainlink-testing-framework v1.32.3
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240715175313-4992f5dbc3d7
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240715175313-4992f5dbc3d7
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
16 changes: 8 additions & 8 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1389,8 +1389,8 @@ 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.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-common v0.1.7-0.20240715171956-cc622d3f7291 h1:X1GKI3vdC/IKoHolU8ZqqUs9rKvZ0XKOTrQxolk/L8U=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240715171956-cc622d3f7291/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=
Expand All @@ -1399,14 +1399,14 @@ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h
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.32.2 h1:j5OQ9Xt2aqAGJfpEkh1pxvOiZMVbxypjFEBZkdIEfZg=
github.com/smartcontractkit/chainlink-testing-framework v1.32.2/go.mod h1:OYlILtWsQskqZgzIjRe7PpIEySJVhb4qMnGxOuzrUgA=
github.com/smartcontractkit/chainlink-testing-framework v1.32.3 h1:Uv3slT6O/gCyt5eHqWVomnZJDfgTqqpNQCYBs+lUBBs=
github.com/smartcontractkit/chainlink-testing-framework v1.32.3/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-20240712150704-055a9d24f80a h1:EMYExaAqDwOOnjC+cUpPuQWC5UncjBr0wWHnmcgtYao=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240712150704-055a9d24f80a/go.mod h1:ptqxOLFnLDa5LcaWRqdiin/crRQm51tWyCCgNmh88Hk=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240712150704-055a9d24f80a h1:UNrfllaYSx6UkXs2xQRRQphWNQMhohFJxdW+99H4JSY=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240712150704-055a9d24f80a/go.mod h1:FZEPDvLPk3ECLUSMShGDWLWIFr2gZWeU4A9is3DqkdU=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240715175313-4992f5dbc3d7 h1:5FxLNSXCDz5Crstw0KCq7mbci6FVvZaBLFqedxeWe1E=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240715175313-4992f5dbc3d7/go.mod h1:+P1PVkL9v52v+yFDM7z3HnzMN5mlsd8gQMSYiR0wIvo=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240715175313-4992f5dbc3d7 h1:2EHkX5nl78oPBExIoPrpMGrL2iMFIOwR6WPhIMKXtls=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240715175313-4992f5dbc3d7/go.mod h1:Rb/sEhqdqu0eDfqKzcJcoe97T2ZL372KykxCNmCY1yQ=
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
13 changes: 9 additions & 4 deletions pkg/solana/chainreader/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ func (s *SolanaChainReaderService) HealthReport() map[string]error {
return map[string]error{s.Name(): s.Healthy()}
}

// Bind implements the types.ContractReader interface and allows new contract bindings to be added
// to the service.
func (s *SolanaChainReaderService) Bind(_ context.Context, bindings []types.BoundContract) error {
return s.bindings.Bind(bindings)
}

// GetLatestValue implements the types.ContractReader interface and requests and parses on-chain
// data named by the provided contract, method, and params.
func (s *SolanaChainReaderService) GetLatestValue(ctx context.Context, contractName, method string, _ primitives.ConfidenceLevel, params any, returnVal any) error {
Expand Down Expand Up @@ -180,10 +186,9 @@ func (s *SolanaChainReaderService) QueryKey(ctx context.Context, contractName st
return nil, errors.New("unimplemented")
}

// Bind implements the types.ContractReader interface and allows new contract bindings to be added
// to the service.
func (s *SolanaChainReaderService) Bind(_ context.Context, bindings []types.BoundContract) error {
return s.bindings.Bind(bindings)
// ReplaySequence implements the types.ContractReader interface.
func (s *SolanaChainReaderService) ReplaySequence(_ context.Context, _, _ string, _ string) error {
return errors.New("unimplemented")
}

// CreateContractType implements the ContractTypeProvider interface and allows the chain reader
Expand Down
14 changes: 13 additions & 1 deletion pkg/solana/chainreader/chain_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,12 @@ func (r *wrappedTestChainReader) QueryKey(ctx context.Context, contractName stri
return nil, nil
}

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

func getAddresses(t *testing.T, tester ChainReaderInterfaceTester[*testing.T], a, b int) (ag_solana.PublicKey, ag_solana.PublicKey) {
t.Helper()

Expand Down Expand Up @@ -713,8 +719,9 @@ func (r *chainReaderInterfaceTester) SetBatchLatestValues(t *testing.T, _ BatchC
t.Skip("GetBatchLatestValues is not yet supported in Solana")
}

func (r *chainReaderInterfaceTester) TriggerEvent(t *testing.T, testStruct *TestStruct) {
func (r *chainReaderInterfaceTester) TriggerEvent(t *testing.T, _ *TestStruct) string {
t.Skip("Events are not yet supported in Solana")
return ""
}

func (r *chainReaderInterfaceTester) GetBindings(t *testing.T) []types.BoundContract {
Expand Down Expand Up @@ -883,3 +890,8 @@ func (s *skipEventsChainReader) QueryKey(ctx context.Context, contractName strin
s.t.Skip("QueryKey is not yet supported in Solana")
return nil, nil
}

func (s *skipEventsChainReader) ReplaySequence(_ context.Context, _, _ string, _ string) error {
s.t.Skip("ReplaySequence is not yet supported in Solana")
return nil
}
Loading