From cde044a4fc3f650e48a2536bce79e2341c2ebc7d 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 | 12 ++++++------ integration-tests/go.sum | 20 ++++++++++---------- 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, 101 insertions(+), 86 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 b767b7c8a..516a15684 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 08ddbd3ad..85fd333da 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -15,11 +15,11 @@ 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-relay v0.1.7-0.20231115124244-8303409abccd - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231023133638-72f4e799ab05 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20231116223216-9eea341937de + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231116220215-93510f138ff6 github.com/smartcontractkit/chainlink-testing-framework v1.19.0 - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20231116210131-a9d81ae52ccd - github.com/smartcontractkit/chainlink/v2 v2.5.1-0.20231116210131-a9d81ae52ccd + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20231116224343-7780eb63d8dc + github.com/smartcontractkit/chainlink/v2 v2.5.1-0.20231116224343-7780eb63d8dc github.com/smartcontractkit/libocr v0.0.0-20231107151413-13e0202ae8d7 github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.23.0 @@ -379,8 +379,8 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect 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.20231109141932-cb1ea9020255 // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231024133459-1ef3a11319eb // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231116223324-56d60ee456c3 // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231116220530-9d5db8010d3b // indirect github.com/smartcontractkit/ocr2keepers v0.7.28 // indirect github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index eedf639e5..b8d063091 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -2355,18 +2355,18 @@ 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-cosmos v0.4.1-0.20231109141932-cb1ea9020255 h1:Pt6c7bJU9wIN6PQQnmN8UmYYH6lpfiQ6U/B8yEC2s5s= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231109141932-cb1ea9020255/go.mod h1:EHppaccd/LTlTMI2o4dmBHe4BknEgEFFDjDGMNuGb3k= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231115124244-8303409abccd h1:PRVJxNK67pQWufXuB1cxckH/xZkcQFDy8KjN9ZYqong= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231115124244-8303409abccd/go.mod h1:rOayi690YxLlkQy959PD8INhOAIAUi9LoN0G+J/CEf4= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231024133459-1ef3a11319eb h1:HiluOfEVGOQTM6BTDImOqYdMZZ7qq7fkZ3TJdmItNr8= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231024133459-1ef3a11319eb/go.mod h1:/30flFG4L/iCYAFeA3DUzR0xuHSxAMONiWTzyzvsNwo= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231116223216-9eea341937de h1:FUay6fhW3ELmUfIk8R4ql+WsWNQHHn+qQBxDfQD9cIs= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231116223216-9eea341937de/go.mod h1:Hrru9i7n+WEYyW2aIt3/YGPhxLX+HEGWnhk3yVXeDF8= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231116223324-56d60ee456c3 h1:Z26fE3PWqlQRqW7QSRYCSpfTXzHkPqcppMPMASU8Z6g= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231116223324-56d60ee456c3/go.mod h1:EnvRRl5epzfFyXzo2JkQAh1N3EvDZOF5+ExjId4uyi0= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231116220530-9d5db8010d3b h1:KWfn3upgUYbOoOEUAuTJndS2OOmvO67h78P/oF3kbwM= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231116220530-9d5db8010d3b/go.mod h1:ShLh2mumD8ShuRBS6ONHDaW6BDloVA3fAbGysJg4Ht4= github.com/smartcontractkit/chainlink-testing-framework v1.19.0 h1:ungyY1gYcXCtmdX2yCon8pkx9HgPPLg4aNAhKNZFP5c= github.com/smartcontractkit/chainlink-testing-framework v1.19.0/go.mod h1:zScXRqmvbyTFUooyLYrOp4+V/sFPUbFJNRc72YmnuIk= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20231116210131-a9d81ae52ccd h1:55Zi3Ed6+xJYs+qCORNPVvoitUh/WP8B0AwUtWZ+m3M= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20231116210131-a9d81ae52ccd/go.mod h1:4/r8AW79/ZW0tED8GfOjO17AyXyEDZLdgeeZeLpkT1c= -github.com/smartcontractkit/chainlink/v2 v2.5.1-0.20231116210131-a9d81ae52ccd h1:hBerlu8Kus3+a+IUjLiwRmIzLMW663kEFxBCbiFOjrQ= -github.com/smartcontractkit/chainlink/v2 v2.5.1-0.20231116210131-a9d81ae52ccd/go.mod h1:8wHqNlLPdwa9ByE9lPnhrLHdlvfjZI1uj5RRrhrT4Ys= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20231116224343-7780eb63d8dc h1:avcEXOkSX95tITMGImqGl1nwX+cmm+q74cXRiVHdBbQ= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20231116224343-7780eb63d8dc/go.mod h1:JATrsArYN6wOfkjQ0i/UHnUTXrCK6v5Qr6WwPmG+vQc= +github.com/smartcontractkit/chainlink/v2 v2.5.1-0.20231116224343-7780eb63d8dc h1:JgldMjvhBvsYRRhcfHZrsX35sMMXep+ZD46x3lP/oDE= +github.com/smartcontractkit/chainlink/v2 v2.5.1-0.20231116224343-7780eb63d8dc/go.mod h1:A3oWdc95WLNcQSlxmDuQoEnmVY1uJVPNH+BEElTMJho= 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/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) {