From 93510f138ff6f9c2e67c9e1284e7fc9eb89aae53 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Thu, 16 Nov 2023 16:02:15 -0600 Subject: [PATCH] switch from chainlink-relay to chainlink-common --- cmd/monitoring/main.go | 5 +++-- go.mod | 2 +- go.sum | 4 ++-- integration-tests/common/common.go | 2 +- integration-tests/go.mod | 3 ++- integration-tests/go.sum | 6 ++++-- pkg/monitoring/config.go | 2 +- pkg/monitoring/feed_config.go | 3 ++- pkg/monitoring/metrics.go | 3 ++- pkg/monitoring/node_config.go | 3 ++- pkg/monitoring/prometheus_exporter.go | 3 ++- pkg/monitoring/prometheus_exporter_test.go | 5 +++-- pkg/monitoring/source_balances.go | 3 ++- pkg/monitoring/source_envelope.go | 7 ++++--- pkg/monitoring/source_envelope_test.go | 7 ++++--- pkg/monitoring/source_txresults.go | 3 ++- pkg/monitoring/testutils.go | 5 +++-- pkg/solana/cache_test.go | 2 +- pkg/solana/chain.go | 14 +++++++------- pkg/solana/chain_test.go | 4 ++-- pkg/solana/client/client_test.go | 2 +- pkg/solana/client/test_helpers.go | 3 ++- pkg/solana/client/test_helpers_test.go | 7 ++++--- pkg/solana/cmd/chainlink-solana/main.go | 2 +- pkg/solana/config.go | 4 ++-- pkg/solana/config/config.go | 4 ++-- pkg/solana/db/db.go | 2 +- pkg/solana/fees/recent_fees.go | 2 +- pkg/solana/logger/logger.go | 2 +- pkg/solana/monitor/balance.go | 6 +++--- pkg/solana/monitor/balance_test.go | 4 ++-- pkg/solana/relay.go | 6 +++--- pkg/solana/report_test.go | 3 ++- pkg/solana/state_cache.go | 2 +- pkg/solana/transmissions_cache.go | 2 +- pkg/solana/transmitter.go | 3 ++- pkg/solana/txm/pendingtx_test.go | 2 +- pkg/solana/txm/txm.go | 4 ++-- pkg/solana/txm/txm_internal_test.go | 6 +++--- pkg/solana/txm/txm_race_test.go | 6 +++--- pkg/solana/txm/txm_test.go | 6 +++--- 41 files changed, 91 insertions(+), 73 deletions(-) diff --git a/cmd/monitoring/main.go b/cmd/monitoring/main.go index 00512d2c2..1dda5d5ec 100644 --- a/cmd/monitoring/main.go +++ b/cmd/monitoring/main.go @@ -5,8 +5,9 @@ import ( "fmt" "github.com/gagliardetto/solana-go/rpc" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" "github.com/smartcontractkit/chainlink-solana/pkg/monitoring" ) diff --git a/go.mod b/go.mod index fd880ea44..0588052c1 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/pelletier/go-toml/v2 v2.1.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20231115220132-869da59f5b1c github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8 github.com/stretchr/testify v1.8.4 go.uber.org/multierr v1.11.0 diff --git a/go.sum b/go.sum index c9f0c3b51..2e6a6c0b3 100644 --- a/go.sum +++ b/go.sum @@ -429,8 +429,8 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9 h1:fFD5SgSJtnXvkGLK3CExNKpUIz4sGrNNkKv3Ljw63Hk= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231115220132-869da59f5b1c h1:C/bwm/TyexSX+HE/SmJrFxLpCG3qdVNqqUpIgPU/Mkw= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231115220132-869da59f5b1c/go.mod h1:Hrru9i7n+WEYyW2aIt3/YGPhxLX+HEGWnhk3yVXeDF8= 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= diff --git a/integration-tests/common/common.go b/integration-tests/common/common.go index 7441f67c0..619f65aef 100644 --- a/integration-tests/common/common.go +++ b/integration-tests/common/common.go @@ -37,7 +37,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/store/models" - relay_utils "github.com/smartcontractkit/chainlink-relay/pkg/utils" + relay_utils "github.com/smartcontractkit/chainlink-common/pkg/utils" test_env_sol "github.com/smartcontractkit/chainlink-solana/integration-tests/docker/test_env" "github.com/smartcontractkit/chainlink-solana/integration-tests/solclient" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" diff --git a/integration-tests/go.mod b/integration-tests/go.mod index c87af2368..6dd30053c 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -15,8 +15,8 @@ require ( github.com/onsi/gomega v1.27.8 github.com/rs/zerolog v1.30.0 github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b + github.com/smartcontractkit/chainlink-common v0.1.7-0.20231115220132-869da59f5b1c github.com/smartcontractkit/chainlink-env v0.38.3 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231020211840-0b428fa4352c github.com/smartcontractkit/chainlink-testing-framework v1.17.12-0.20231018101901-23824db88d36 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20231020211957-78a1d7ea6e2d @@ -375,6 +375,7 @@ require ( github.com/slack-go/slack v0.12.2 // indirect github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 // indirect + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020211750-7a730729c169 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect github.com/smartcontractkit/ocr2keepers v0.7.27 // indirect github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 44dce5fb4..5792a7261 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -2347,12 +2347,14 @@ github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231115220132-869da59f5b1c h1:C/bwm/TyexSX+HE/SmJrFxLpCG3qdVNqqUpIgPU/Mkw= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231115220132-869da59f5b1c/go.mod h1:Hrru9i7n+WEYyW2aIt3/YGPhxLX+HEGWnhk3yVXeDF8= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 h1:vdieOW3CZGdD2R5zvCSMS+0vksyExPN3/Fa1uVfld/A= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8= github.com/smartcontractkit/chainlink-env v0.38.3 h1:ZtOnwkG622R0VCTxL5V09AnT/QXhlFwkGTjd0Lsfpfg= github.com/smartcontractkit/chainlink-env v0.38.3/go.mod h1:7z4sw/hN8TxioQCLwFqQdhK3vaOV0a22Qe99z4bRUcg= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9 h1:fFD5SgSJtnXvkGLK3CExNKpUIz4sGrNNkKv3Ljw63Hk= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020211750-7a730729c169 h1:iQw/EnA9A1AxlODc2DmBVR2om6ekx0DznuV+0Mn5hmE= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020211750-7a730729c169/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918/go.mod h1:/yp/sqD8Iz5GU5fcercjrw0ivJF7HDcupYg+Gjr7EPg= github.com/smartcontractkit/chainlink-testing-framework v1.17.12-0.20231018101901-23824db88d36 h1:ow84QG8vEHMvfjGg0RF8HNYh80WcHci6PIenXyY6K8Y= diff --git a/pkg/monitoring/config.go b/pkg/monitoring/config.go index c47e1cfcd..6a038ac34 100644 --- a/pkg/monitoring/config.go +++ b/pkg/monitoring/config.go @@ -6,7 +6,7 @@ import ( "os" "time" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) type SolanaConfig struct { diff --git a/pkg/monitoring/feed_config.go b/pkg/monitoring/feed_config.go index f9ae5658a..26b6de677 100644 --- a/pkg/monitoring/feed_config.go +++ b/pkg/monitoring/feed_config.go @@ -7,7 +7,8 @@ import ( "math/big" "github.com/gagliardetto/solana-go" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) type SolanaFeedConfig struct { diff --git a/pkg/monitoring/metrics.go b/pkg/monitoring/metrics.go index 5fc36d134..f6c8401e9 100644 --- a/pkg/monitoring/metrics.go +++ b/pkg/monitoring/metrics.go @@ -5,7 +5,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) var BalanceAccountNames = []string{ diff --git a/pkg/monitoring/node_config.go b/pkg/monitoring/node_config.go index 5e12a447f..bafa53f2d 100644 --- a/pkg/monitoring/node_config.go +++ b/pkg/monitoring/node_config.go @@ -5,8 +5,9 @@ import ( "fmt" "io" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" "github.com/smartcontractkit/libocr/offchainreporting2/types" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) type SolanaNodeConfig struct { diff --git a/pkg/monitoring/prometheus_exporter.go b/pkg/monitoring/prometheus_exporter.go index 7fbf98385..dfda6e1e0 100644 --- a/pkg/monitoring/prometheus_exporter.go +++ b/pkg/monitoring/prometheus_exporter.go @@ -5,7 +5,8 @@ import ( "sync" "github.com/gagliardetto/solana-go" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) func NewPrometheusExporterFactory( diff --git a/pkg/monitoring/prometheus_exporter_test.go b/pkg/monitoring/prometheus_exporter_test.go index 38dc9c219..268c0125f 100644 --- a/pkg/monitoring/prometheus_exporter_test.go +++ b/pkg/monitoring/prometheus_exporter_test.go @@ -5,9 +5,10 @@ import ( "testing" "time" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" - "github.com/smartcontractkit/chainlink-solana/pkg/monitoring/mocks" "github.com/stretchr/testify/require" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" + "github.com/smartcontractkit/chainlink-solana/pkg/monitoring/mocks" ) func TestPrometheusExporter(t *testing.T) { diff --git a/pkg/monitoring/source_balances.go b/pkg/monitoring/source_balances.go index 4746e44d3..8f7bf42d3 100644 --- a/pkg/monitoring/source_balances.go +++ b/pkg/monitoring/source_balances.go @@ -7,7 +7,8 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) type Balances struct { diff --git a/pkg/monitoring/source_envelope.go b/pkg/monitoring/source_envelope.go index 0b7ccac39..49bedf6ec 100644 --- a/pkg/monitoring/source_envelope.go +++ b/pkg/monitoring/source_envelope.go @@ -9,11 +9,12 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" - "github.com/smartcontractkit/chainlink-solana/pkg/monitoring/event" - pkgSolana "github.com/smartcontractkit/chainlink-solana/pkg/solana" "github.com/smartcontractkit/libocr/offchainreporting2/types" "go.uber.org/multierr" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" + "github.com/smartcontractkit/chainlink-solana/pkg/monitoring/event" + pkgSolana "github.com/smartcontractkit/chainlink-solana/pkg/solana" ) func NewEnvelopeSourceFactory( diff --git a/pkg/monitoring/source_envelope_test.go b/pkg/monitoring/source_envelope_test.go index 2fdf695ad..62e1a108a 100644 --- a/pkg/monitoring/source_envelope_test.go +++ b/pkg/monitoring/source_envelope_test.go @@ -10,12 +10,13 @@ import ( bin "github.com/gagliardetto/binary" "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" - "github.com/smartcontractkit/chainlink-solana/pkg/monitoring/mocks" - pkgSolana "github.com/smartcontractkit/chainlink-solana/pkg/solana" "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" + "github.com/smartcontractkit/chainlink-solana/pkg/monitoring/mocks" + pkgSolana "github.com/smartcontractkit/chainlink-solana/pkg/solana" ) var ( diff --git a/pkg/monitoring/source_txresults.go b/pkg/monitoring/source_txresults.go index ecccc1f46..a539be472 100644 --- a/pkg/monitoring/source_txresults.go +++ b/pkg/monitoring/source_txresults.go @@ -7,7 +7,8 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) func NewTxResultsSourceFactory( diff --git a/pkg/monitoring/testutils.go b/pkg/monitoring/testutils.go index 13d07e612..1db1e6ecb 100644 --- a/pkg/monitoring/testutils.go +++ b/pkg/monitoring/testutils.go @@ -7,8 +7,9 @@ import ( "time" "github.com/gagliardetto/solana-go" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) // Generators diff --git a/pkg/solana/cache_test.go b/pkg/solana/cache_test.go index 0545fb062..57fc83bba 100644 --- a/pkg/solana/cache_test.go +++ b/pkg/solana/cache_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" diff --git a/pkg/solana/chain.go b/pkg/solana/chain.go index b4d9885e0..9fd5d26cc 100644 --- a/pkg/solana/chain.go +++ b/pkg/solana/chain.go @@ -15,13 +15,13 @@ import ( "github.com/pkg/errors" "go.uber.org/multierr" - "github.com/smartcontractkit/chainlink-relay/pkg/chains" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - "github.com/smartcontractkit/chainlink-relay/pkg/loop" - "github.com/smartcontractkit/chainlink-relay/pkg/services" - "github.com/smartcontractkit/chainlink-relay/pkg/types" - relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/chains" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/types" + relaytypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" diff --git a/pkg/solana/chain_test.go b/pkg/solana/chain_test.go index 33dc849bc..62f7564ff 100644 --- a/pkg/solana/chain_test.go +++ b/pkg/solana/chain_test.go @@ -13,12 +13,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" ) const TestSolanaGenesisHashTemplate = `{"jsonrpc":"2.0","result":"%s","id":1}` diff --git a/pkg/solana/client/client_test.go b/pkg/solana/client/client_test.go index cc378f4fb..d4c4b4ae0 100644 --- a/pkg/solana/client/client_test.go +++ b/pkg/solana/client/client_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" diff --git a/pkg/solana/client/test_helpers.go b/pkg/solana/client/test_helpers.go index e763607df..12374bee6 100644 --- a/pkg/solana/client/test_helpers.go +++ b/pkg/solana/client/test_helpers.go @@ -9,9 +9,10 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils" ) // SetupLocalSolNode sets up a local solana node via solana cli, and returns the url diff --git a/pkg/solana/client/test_helpers_test.go b/pkg/solana/client/test_helpers_test.go index c303888f0..f1f1dfffe 100644 --- a/pkg/solana/client/test_helpers_test.go +++ b/pkg/solana/client/test_helpers_test.go @@ -5,11 +5,12 @@ import ( "time" "github.com/gagliardetto/solana-go" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" + "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" ) func TestSetupLocalSolNode_SimultaneousNetworks(t *testing.T) { diff --git a/pkg/solana/cmd/chainlink-solana/main.go b/pkg/solana/cmd/chainlink-solana/main.go index 707eea418..924dd5a2b 100644 --- a/pkg/solana/cmd/chainlink-solana/main.go +++ b/pkg/solana/cmd/chainlink-solana/main.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/go-plugin" "github.com/pelletier/go-toml/v2" - "github.com/smartcontractkit/chainlink-relay/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-solana/pkg/solana" ) diff --git a/pkg/solana/config.go b/pkg/solana/config.go index 5f720e56c..822064edd 100644 --- a/pkg/solana/config.go +++ b/pkg/solana/config.go @@ -10,8 +10,8 @@ import ( "go.uber.org/multierr" "golang.org/x/exp/slices" - "github.com/smartcontractkit/chainlink-relay/pkg/config" - relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/config" + relaytypes "github.com/smartcontractkit/chainlink-common/pkg/types" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" soldb "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" diff --git a/pkg/solana/config/config.go b/pkg/solana/config/config.go index c680b09fc..2a03d0204 100644 --- a/pkg/solana/config/config.go +++ b/pkg/solana/config/config.go @@ -7,8 +7,8 @@ import ( "github.com/gagliardetto/solana-go/rpc" "go.uber.org/multierr" - relaycfg "github.com/smartcontractkit/chainlink-relay/pkg/config" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + relaycfg "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" diff --git a/pkg/solana/db/db.go b/pkg/solana/db/db.go index 6fb7719ab..5e91b78f6 100644 --- a/pkg/solana/db/db.go +++ b/pkg/solana/db/db.go @@ -8,7 +8,7 @@ import ( "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils" ) type Node struct { diff --git a/pkg/solana/fees/recent_fees.go b/pkg/solana/fees/recent_fees.go index e20b6f912..b0362b82d 100644 --- a/pkg/solana/fees/recent_fees.go +++ b/pkg/solana/fees/recent_fees.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" ) diff --git a/pkg/solana/logger/logger.go b/pkg/solana/logger/logger.go index c19ecb968..819a75a7d 100644 --- a/pkg/solana/logger/logger.go +++ b/pkg/solana/logger/logger.go @@ -1,6 +1,6 @@ package logger -import "github.com/smartcontractkit/chainlink-relay/pkg/logger" +import "github.com/smartcontractkit/chainlink-common/pkg/logger" // Logger is an alias for backwards compatibility. type Logger = logger.Logger diff --git a/pkg/solana/monitor/balance.go b/pkg/solana/monitor/balance.go index bd6593240..1fab11550 100644 --- a/pkg/solana/monitor/balance.go +++ b/pkg/solana/monitor/balance.go @@ -6,9 +6,9 @@ import ( "github.com/gagliardetto/solana-go" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - "github.com/smartcontractkit/chainlink-relay/pkg/types" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils" solanaClient "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" ) diff --git a/pkg/solana/monitor/balance_test.go b/pkg/solana/monitor/balance_test.go index db437cdb0..508661007 100644 --- a/pkg/solana/monitor/balance_test.go +++ b/pkg/solana/monitor/balance_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - "github.com/smartcontractkit/chainlink-relay/pkg/utils/tests" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client/mocks" "github.com/smartcontractkit/chainlink-solana/pkg/solana/internal" ) diff --git a/pkg/solana/relay.go b/pkg/solana/relay.go index 9f86ffcee..dece2beb1 100644 --- a/pkg/solana/relay.go +++ b/pkg/solana/relay.go @@ -10,9 +10,9 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" - relaylogger "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + relaylogger "github.com/smartcontractkit/chainlink-common/pkg/logger" + relaytypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" diff --git a/pkg/solana/report_test.go b/pkg/solana/report_test.go index b27d4c9fc..6209ddf85 100644 --- a/pkg/solana/report_test.go +++ b/pkg/solana/report_test.go @@ -9,12 +9,13 @@ import ( "time" bin "github.com/gagliardetto/binary" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" "github.com/smartcontractkit/libocr/commontypes" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils" ) func TestBuildReport(t *testing.T) { diff --git a/pkg/solana/state_cache.go b/pkg/solana/state_cache.go index 563acae4c..fa9a72f84 100644 --- a/pkg/solana/state_cache.go +++ b/pkg/solana/state_cache.go @@ -12,7 +12,7 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" diff --git a/pkg/solana/transmissions_cache.go b/pkg/solana/transmissions_cache.go index e2e27ec57..d05e5b46e 100644 --- a/pkg/solana/transmissions_cache.go +++ b/pkg/solana/transmissions_cache.go @@ -10,7 +10,7 @@ import ( "github.com/gagliardetto/solana-go/rpc" "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" diff --git a/pkg/solana/transmitter.go b/pkg/solana/transmitter.go index 8c71b7452..3d4eb971d 100644 --- a/pkg/solana/transmitter.go +++ b/pkg/solana/transmitter.go @@ -6,9 +6,10 @@ import ( "github.com/gagliardetto/solana-go" "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" "github.com/smartcontractkit/libocr/offchainreporting2/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" ) diff --git a/pkg/solana/txm/pendingtx_test.go b/pkg/solana/txm/pendingtx_test.go index 1017572fd..5d1a8935b 100644 --- a/pkg/solana/txm/pendingtx_test.go +++ b/pkg/solana/txm/pendingtx_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - relayutils "github.com/smartcontractkit/chainlink-relay/pkg/utils" + relayutils "github.com/smartcontractkit/chainlink-common/pkg/utils" ) func TestPendingTxContext(t *testing.T) { diff --git a/pkg/solana/txm/txm.go b/pkg/solana/txm/txm.go index 02a86561a..6025adc40 100644 --- a/pkg/solana/txm/txm.go +++ b/pkg/solana/txm/txm.go @@ -12,13 +12,13 @@ import ( "github.com/google/uuid" "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink-relay/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/services" solanaClient "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana/fees" "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" - relayutils "github.com/smartcontractkit/chainlink-relay/pkg/utils" + relayutils "github.com/smartcontractkit/chainlink-common/pkg/utils" ) const ( diff --git a/pkg/solana/txm/txm_internal_test.go b/pkg/solana/txm/txm_internal_test.go index c7312c298..5faddc5e1 100644 --- a/pkg/solana/txm/txm_internal_test.go +++ b/pkg/solana/txm/txm_internal_test.go @@ -25,9 +25,9 @@ import ( "github.com/smartcontractkit/chainlink-solana/pkg/solana/fees" keyMocks "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm/mocks" - relayconfig "github.com/smartcontractkit/chainlink-relay/pkg/config" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relayutils "github.com/smartcontractkit/chainlink-relay/pkg/utils" + relayconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + relayutils "github.com/smartcontractkit/chainlink-common/pkg/utils" ) type soltxmProm struct { diff --git a/pkg/solana/txm/txm_race_test.go b/pkg/solana/txm/txm_race_test.go index c796c6df5..73385ff0c 100644 --- a/pkg/solana/txm/txm_race_test.go +++ b/pkg/solana/txm/txm_race_test.go @@ -11,8 +11,8 @@ import ( solanaGo "github.com/gagliardetto/solana-go" "go.uber.org/zap/zapcore" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils" solanaClient "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" clientmocks "github.com/smartcontractkit/chainlink-solana/pkg/solana/client/mocks" @@ -227,4 +227,4 @@ func TestTxm_SendWithRetry_Race(t *testing.T) { testRunner(t, client) }) -} \ No newline at end of file +} diff --git a/pkg/solana/txm/txm_test.go b/pkg/solana/txm/txm_test.go index c56574090..7dc72708b 100644 --- a/pkg/solana/txm/txm_test.go +++ b/pkg/solana/txm/txm_test.go @@ -20,9 +20,9 @@ import ( "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm" keyMocks "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm/mocks" - relayconfig "github.com/smartcontractkit/chainlink-relay/pkg/config" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relayutils "github.com/smartcontractkit/chainlink-relay/pkg/utils" + relayconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + relayutils "github.com/smartcontractkit/chainlink-common/pkg/utils" ) func TestTxm_Integration(t *testing.T) {