From 276996fd039f3c4f617eaf55d6110278d07ccd83 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Thu, 16 Nov 2023 15:58:36 -0600 Subject: [PATCH] switch from chainlink-relay to chainlink-common --- cmd/monitoring/main.go | 4 +-- go.mod | 2 +- go.sum | 4 +-- integration-tests/go.mod | 8 ++---- integration-tests/go.sum | 7 ++++-- integration-tests/ocr2_test.go | 2 +- ops/localenv/main.go | 2 +- pkg/cosmos/adapters/chain.go | 2 +- .../adapters/cosmwasm/contract_cache.go | 4 +-- .../adapters/cosmwasm/contract_reader.go | 2 +- .../adapters/cosmwasm/contract_transmitter.go | 2 +- pkg/cosmos/adapters/cosmwasm/relay.go | 6 ++--- pkg/cosmos/adapters/injective/relay.go | 6 ++--- pkg/cosmos/adapters/injective/transmitter.go | 2 +- pkg/cosmos/chain.go | 10 ++++---- pkg/cosmos/client/client.go | 2 +- pkg/cosmos/client/client_test.go | 2 +- pkg/cosmos/client/gas_price_estimator.go | 4 +-- pkg/cosmos/client/gas_price_estimator_test.go | 2 +- pkg/cosmos/config/config.go | 25 +++++++++---------- pkg/cosmos/config/config_test.go | 4 +-- pkg/cosmos/relay.go | 4 +-- pkg/cosmos/txm/keystore_adapter.go | 2 +- pkg/cosmos/txm/orm.go | 2 +- pkg/cosmos/txm/orm_test.go | 2 +- pkg/cosmos/txm/txm.go | 8 +++--- pkg/cosmos/txm/txm_internal_test.go | 6 ++--- pkg/monitoring/chain_reader.go | 2 +- pkg/monitoring/config.go | 2 +- pkg/monitoring/exporter_prometheus.go | 2 +- pkg/monitoring/feed_config.go | 2 +- pkg/monitoring/metrics.go | 2 +- pkg/monitoring/node_config.go | 2 +- pkg/monitoring/proxy_monitoring_test.go | 2 +- pkg/monitoring/source_envelope.go | 2 +- pkg/monitoring/source_envelope_test.go | 2 +- pkg/monitoring/source_proxy.go | 2 +- pkg/monitoring/source_txresults.go | 2 +- pkg/monitoring/source_txresults_test.go | 2 +- pkg/monitoring/testutils.go | 4 +-- 40 files changed, 76 insertions(+), 78 deletions(-) diff --git a/cmd/monitoring/main.go b/cmd/monitoring/main.go index cd9afa9cd..342133498 100644 --- a/cmd/monitoring/main.go +++ b/cmd/monitoring/main.go @@ -4,8 +4,8 @@ import ( "context" "log" - "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-cosmos/pkg/monitoring" "github.com/smartcontractkit/chainlink-cosmos/pkg/monitoring/fcdclient" diff --git a/go.mod b/go.mod index cd18a3579..1fa5228d0 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231114165715-7689cd229357 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20231117021201-6814387d8d3e github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8 github.com/stretchr/testify v1.8.4 github.com/tidwall/gjson v1.16.0 diff --git a/go.sum b/go.sum index 32a669106..dcc9bfb57 100644 --- a/go.sum +++ b/go.sum @@ -674,8 +674,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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231114165715-7689cd229357 h1:r1waaZ6ldGCkUYULdOKBbt1Z90FV6T2euJOd8Y2+I4U= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231114165715-7689cd229357/go.mod h1:rOayi690YxLlkQy959PD8INhOAIAUi9LoN0G+J/CEf4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231117021201-6814387d8d3e h1:Fsx5IJDD14wdCAe2lEI1xgztIvzjiE2iVHvYzg/grew= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231117021201-6814387d8d3e/go.mod h1:Hrru9i7n+WEYyW2aIt3/YGPhxLX+HEGWnhk3yVXeDF8= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8 h1:R9NkVN+1fooUJFsN9zj9gDY1B+zv54zNO785RQZRVfE= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index d52b7b5ec..0611d70ba 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -10,10 +10,10 @@ require ( github.com/google/uuid v1.3.1 github.com/lib/pq v1.10.9 github.com/rs/zerolog v1.29.1 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20231117021201-6814387d8d3e github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 github.com/smartcontractkit/chainlink-cosmos/ops v0.0.0-20230615043323-5fe39e28b7ee github.com/smartcontractkit/chainlink-env v0.36.0 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231114165715-7689cd229357 github.com/smartcontractkit/chainlink-testing-framework v1.15.3 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20230818010150-dc7e03125cd0 github.com/smartcontractkit/chainlink/v2 v2.6.0 @@ -54,7 +54,6 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect @@ -149,7 +148,6 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect @@ -298,6 +296,7 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230926113942-a871b2976dc1 // indirect github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687 // indirect github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb // indirect github.com/smartcontractkit/wsrpc v0.7.2 // indirect @@ -338,12 +337,9 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/sdk v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.starlark.net v0.0.0-20220817180228-f738f5508c12 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index d699488fd..9557baea1 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1471,10 +1471,12 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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.20231117021201-6814387d8d3e h1:Fsx5IJDD14wdCAe2lEI1xgztIvzjiE2iVHvYzg/grew= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20231117021201-6814387d8d3e/go.mod h1:Hrru9i7n+WEYyW2aIt3/YGPhxLX+HEGWnhk3yVXeDF8= github.com/smartcontractkit/chainlink-env v0.36.0 h1:CFOjs0c0y3lrHi/fl5qseCH9EQa5W/6CFyOvmhe2VnA= github.com/smartcontractkit/chainlink-env v0.36.0/go.mod h1:NbRExHmJGnKSYXmvNuJx5VErSx26GtE1AEN/CRzYOg8= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231114165715-7689cd229357 h1:r1waaZ6ldGCkUYULdOKBbt1Z90FV6T2euJOd8Y2+I4U= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231114165715-7689cd229357/go.mod h1:rOayi690YxLlkQy959PD8INhOAIAUi9LoN0G+J/CEf4= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230926113942-a871b2976dc1 h1:Db333w+fSm2e18LMikcIQHIZqgxZruW9uCUGJLUC9mI= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230926113942-a871b2976dc1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw= @@ -1673,6 +1675,7 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 h1:IAtl+7gua134xcV3NieDhJHjjOVeJhXAnYf/0hswjUY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0/go.mod h1:w+pXobnBzh95MNIkeIuAKcHe/Uu/CX2PKIvBP6ipKRA= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 h1:yE32ay7mJG2leczfREEhoW3VfSZIvHaB+gvVo1o8DQ8= diff --git a/integration-tests/ocr2_test.go b/integration-tests/ocr2_test.go index 062694ab3..6963238d0 100644 --- a/integration-tests/ocr2_test.go +++ b/integration-tests/ocr2_test.go @@ -10,6 +10,7 @@ import ( "testing" "time" + relaylogger "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-cosmos/integration-tests/common" "github.com/smartcontractkit/chainlink-cosmos/integration-tests/gauntlet" "github.com/smartcontractkit/chainlink-cosmos/ops/utils" @@ -17,7 +18,6 @@ import ( "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/params" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/testutil" - relaylogger "github.com/smartcontractkit/chainlink-relay/pkg/logger" // "github.com/smartcontractkit/chainlink/integration-tests/actions" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2/types" diff --git a/ops/localenv/main.go b/ops/localenv/main.go index 11d3cdf84..dc9f64a4f 100644 --- a/ops/localenv/main.go +++ b/ops/localenv/main.go @@ -13,7 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-cosmos/ops/utils" ) -// TODO: consider extracting entire file to `chainlink-relay/ops` or into a separate CLI tool +// TODO: consider extracting entire file to `chainlink-common/ops` or into a separate CLI tool // this simply runs underlying functions but does not import them // PODMAN: diff --git a/pkg/cosmos/adapters/chain.go b/pkg/cosmos/adapters/chain.go index f9244f4cf..c23eb620a 100644 --- a/pkg/cosmos/adapters/chain.go +++ b/pkg/cosmos/adapters/chain.go @@ -1,7 +1,7 @@ package adapters import ( - "github.com/smartcontractkit/chainlink-relay/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" diff --git a/pkg/cosmos/adapters/cosmwasm/contract_cache.go b/pkg/cosmos/adapters/cosmwasm/contract_cache.go index f86d688d6..4e4a0aaa1 100644 --- a/pkg/cosmos/adapters/cosmwasm/contract_cache.go +++ b/pkg/cosmos/adapters/cosmwasm/contract_cache.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "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" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" diff --git a/pkg/cosmos/adapters/cosmwasm/contract_reader.go b/pkg/cosmos/adapters/cosmwasm/contract_reader.go index b7f7b03c6..a8e4b61a3 100644 --- a/pkg/cosmos/adapters/cosmwasm/contract_reader.go +++ b/pkg/cosmos/adapters/cosmwasm/contract_reader.go @@ -12,7 +12,7 @@ import ( cosmosSDK "github.com/cosmos/cosmos-sdk/types" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" diff --git a/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go b/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go index 024c518ba..66bcdbf10 100644 --- a/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go +++ b/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go @@ -7,7 +7,7 @@ import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" cosmosSDK "github.com/cosmos/cosmos-sdk/types" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" diff --git a/pkg/cosmos/adapters/cosmwasm/relay.go b/pkg/cosmos/adapters/cosmwasm/relay.go index f3ada01bd..6d59c7131 100644 --- a/pkg/cosmos/adapters/cosmwasm/relay.go +++ b/pkg/cosmos/adapters/cosmwasm/relay.go @@ -6,9 +6,9 @@ import ( cosmosSDK "github.com/cosmos/cosmos-sdk/types" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "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/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" diff --git a/pkg/cosmos/adapters/injective/relay.go b/pkg/cosmos/adapters/injective/relay.go index 19e50e4ea..7348c0682 100644 --- a/pkg/cosmos/adapters/injective/relay.go +++ b/pkg/cosmos/adapters/injective/relay.go @@ -6,9 +6,9 @@ import ( tmtypes "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" cosmosSDK "github.com/cosmos/cosmos-sdk/types" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "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/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" diff --git a/pkg/cosmos/adapters/injective/transmitter.go b/pkg/cosmos/adapters/injective/transmitter.go index 94dd52dbf..e3bc8fe9b 100644 --- a/pkg/cosmos/adapters/injective/transmitter.go +++ b/pkg/cosmos/adapters/injective/transmitter.go @@ -6,7 +6,7 @@ import ( cosmosSDK "github.com/cosmos/cosmos-sdk/types" "github.com/smartcontractkit/libocr/offchainreporting2/types" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters/injective/median_report" diff --git a/pkg/cosmos/chain.go b/pkg/cosmos/chain.go index 7a890af40..3fd418026 100644 --- a/pkg/cosmos/chain.go +++ b/pkg/cosmos/chain.go @@ -22,11 +22,11 @@ import ( "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/txm" - "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" + "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" ) // defaultRequestTimeout is the default Cosmos client timeout. diff --git a/pkg/cosmos/client/client.go b/pkg/cosmos/client/client.go index ece69f282..54a4b6f7e 100644 --- a/pkg/cosmos/client/client.go +++ b/pkg/cosmos/client/client.go @@ -9,7 +9,7 @@ import ( "time" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/params" diff --git a/pkg/cosmos/client/client_test.go b/pkg/cosmos/client/client_test.go index 857d23ffd..01908bac7 100644 --- a/pkg/cosmos/client/client_test.go +++ b/pkg/cosmos/client/client_test.go @@ -17,7 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/params" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" ) func TestMain(m *testing.M) { diff --git a/pkg/cosmos/client/gas_price_estimator.go b/pkg/cosmos/client/gas_price_estimator.go index 24c5a2c17..3ef007948 100644 --- a/pkg/cosmos/client/gas_price_estimator.go +++ b/pkg/cosmos/client/gas_price_estimator.go @@ -4,8 +4,8 @@ import ( "fmt" "math/big" - "github.com/smartcontractkit/chainlink-relay/pkg/fee" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/fee" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "go.uber.org/multierr" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/pkg/cosmos/client/gas_price_estimator_test.go b/pkg/cosmos/client/gas_price_estimator_test.go index 57d3ca463..5c5678d93 100644 --- a/pkg/cosmos/client/gas_price_estimator_test.go +++ b/pkg/cosmos/client/gas_price_estimator_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "go.uber.org/zap" diff --git a/pkg/cosmos/config/config.go b/pkg/cosmos/config/config.go index e57d4ee1d..974e354c8 100644 --- a/pkg/cosmos/config/config.go +++ b/pkg/cosmos/config/config.go @@ -11,8 +11,7 @@ import ( "github.com/shopspring/decimal" "go.uber.org/multierr" - "github.com/smartcontractkit/chainlink-relay/pkg/config" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" @@ -82,16 +81,16 @@ type configSet struct { type Chain struct { Bech32Prefix *string - BlockRate *utils.Duration + BlockRate *config.Duration BlocksUntilTxTimeout *int64 - ConfirmPollPeriod *utils.Duration + ConfirmPollPeriod *config.Duration FallbackGasPrice *decimal.Decimal GasToken *string GasLimitMultiplier *decimal.Decimal MaxMsgsPerBatch *int64 - OCR2CachePollPeriod *utils.Duration - OCR2CacheTTL *utils.Duration - TxMsgTimeout *utils.Duration + OCR2CachePollPeriod *config.Duration + OCR2CacheTTL *config.Duration + TxMsgTimeout *config.Duration } func (c *Chain) SetDefaults() { @@ -99,13 +98,13 @@ func (c *Chain) SetDefaults() { c.Bech32Prefix = &defaultConfigSet.Bech32Prefix } if c.BlockRate == nil { - c.BlockRate = utils.MustNewDuration(defaultConfigSet.BlockRate) + c.BlockRate = config.MustNewDuration(defaultConfigSet.BlockRate) } if c.BlocksUntilTxTimeout == nil { c.BlocksUntilTxTimeout = &defaultConfigSet.BlocksUntilTxTimeout } if c.ConfirmPollPeriod == nil { - c.ConfirmPollPeriod = utils.MustNewDuration(defaultConfigSet.ConfirmPollPeriod) + c.ConfirmPollPeriod = config.MustNewDuration(defaultConfigSet.ConfirmPollPeriod) } if c.FallbackGasPrice == nil { d := decimal.NewFromBigInt(defaultConfigSet.FallbackGasPrice.BigInt(), -sdk.Precision) @@ -122,19 +121,19 @@ func (c *Chain) SetDefaults() { c.MaxMsgsPerBatch = &defaultConfigSet.MaxMsgsPerBatch } if c.OCR2CachePollPeriod == nil { - c.OCR2CachePollPeriod = utils.MustNewDuration(defaultConfigSet.OCR2CachePollPeriod) + c.OCR2CachePollPeriod = config.MustNewDuration(defaultConfigSet.OCR2CachePollPeriod) } if c.OCR2CacheTTL == nil { - c.OCR2CacheTTL = utils.MustNewDuration(defaultConfigSet.OCR2CacheTTL) + c.OCR2CacheTTL = config.MustNewDuration(defaultConfigSet.OCR2CacheTTL) } if c.TxMsgTimeout == nil { - c.TxMsgTimeout = utils.MustNewDuration(defaultConfigSet.TxMsgTimeout) + c.TxMsgTimeout = config.MustNewDuration(defaultConfigSet.TxMsgTimeout) } } type Node struct { Name *string - TendermintURL *utils.URL + TendermintURL *config.URL } func (n *Node) ValidateConfig() (err error) { diff --git a/pkg/cosmos/config/config_test.go b/pkg/cosmos/config/config_test.go index 3275d41a4..fab08f296 100644 --- a/pkg/cosmos/config/config_test.go +++ b/pkg/cosmos/config/config_test.go @@ -8,8 +8,8 @@ import ( "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" ) func Test_sdkDecFromDecimal(t *testing.T) { @@ -62,7 +62,7 @@ func TestCosmosConfig_GetNode(t *testing.T) { Nodes: []*Node{ &Node{ Name: ptr("node"), - TendermintURL: &utils.URL{}, + TendermintURL: &config.URL{}, }, }}, want: db.Node{ diff --git a/pkg/cosmos/relay.go b/pkg/cosmos/relay.go index 8bb7590ac..c6d325a99 100644 --- a/pkg/cosmos/relay.go +++ b/pkg/cosmos/relay.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - "github.com/smartcontractkit/chainlink-relay/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters/cosmwasm" diff --git a/pkg/cosmos/txm/keystore_adapter.go b/pkg/cosmos/txm/keystore_adapter.go index 5b6d5116e..f7a82441a 100644 --- a/pkg/cosmos/txm/keystore_adapter.go +++ b/pkg/cosmos/txm/keystore_adapter.go @@ -13,7 +13,7 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/ripemd160" //nolint: staticcheck - "github.com/smartcontractkit/chainlink-relay/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/loop" ) type accountInfo struct { diff --git a/pkg/cosmos/txm/orm.go b/pkg/cosmos/txm/orm.go index b70d93ea8..a6fe95924 100644 --- a/pkg/cosmos/txm/orm.go +++ b/pkg/cosmos/txm/orm.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/smartcontractkit/chainlink-relay/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" diff --git a/pkg/cosmos/txm/orm_test.go b/pkg/cosmos/txm/orm_test.go index 26c457a08..3a2e4f65b 100644 --- a/pkg/cosmos/txm/orm_test.go +++ b/pkg/cosmos/txm/orm_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cosmosdb "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" - "github.com/smartcontractkit/chainlink-relay/pkg/utils/tests" ) func TestORM(t *testing.T) { diff --git a/pkg/cosmos/txm/txm.go b/pkg/cosmos/txm/txm.go index 2513aa40e..d19a7898e 100644 --- a/pkg/cosmos/txm/txm.go +++ b/pkg/cosmos/txm/txm.go @@ -24,10 +24,10 @@ import ( "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" - "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/utils" + "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/utils" ) var ( diff --git a/pkg/cosmos/txm/txm_internal_test.go b/pkg/cosmos/txm/txm_internal_test.go index 999f80b1d..ac0ec1e6a 100644 --- a/pkg/cosmos/txm/txm_internal_test.go +++ b/pkg/cosmos/txm/txm_internal_test.go @@ -18,9 +18,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" - "github.com/smartcontractkit/chainlink-relay/pkg/utils" - "github.com/smartcontractkit/chainlink-relay/pkg/utils/tests" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client/mocks" diff --git a/pkg/monitoring/chain_reader.go b/pkg/monitoring/chain_reader.go index ba679c5ba..eedb48e35 100644 --- a/pkg/monitoring/chain_reader.go +++ b/pkg/monitoring/chain_reader.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" txtypes "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "go.uber.org/ratelimit" pkgClient "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" diff --git a/pkg/monitoring/config.go b/pkg/monitoring/config.go index 49952e756..6a47dd9c2 100644 --- a/pkg/monitoring/config.go +++ b/pkg/monitoring/config.go @@ -8,7 +8,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) // CosmosConfig contains configuration for connecting to a cosmos RPC client. diff --git a/pkg/monitoring/exporter_prometheus.go b/pkg/monitoring/exporter_prometheus.go index 1a0219687..4590a08d4 100644 --- a/pkg/monitoring/exporter_prometheus.go +++ b/pkg/monitoring/exporter_prometheus.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) // NewPrometheusExporterFactory builds an implementation of the Exporter for prometheus. diff --git a/pkg/monitoring/feed_config.go b/pkg/monitoring/feed_config.go index ef83e029e..88c002f05 100644 --- a/pkg/monitoring/feed_config.go +++ b/pkg/monitoring/feed_config.go @@ -7,7 +7,7 @@ import ( "math/big" sdk "github.com/cosmos/cosmos-sdk/types" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) // CosmosFeedConfig holds data extracted from the RDD diff --git a/pkg/monitoring/metrics.go b/pkg/monitoring/metrics.go index 85f8a33df..d1fdfcf45 100644 --- a/pkg/monitoring/metrics.go +++ b/pkg/monitoring/metrics.go @@ -3,7 +3,7 @@ package monitoring 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" ) // Metrics is an interface for prometheus metrics. Makes testing easier. diff --git a/pkg/monitoring/node_config.go b/pkg/monitoring/node_config.go index 6f2824d3e..0ab43a7e8 100644 --- a/pkg/monitoring/node_config.go +++ b/pkg/monitoring/node_config.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" "github.com/smartcontractkit/libocr/offchainreporting2/types" ) diff --git a/pkg/monitoring/proxy_monitoring_test.go b/pkg/monitoring/proxy_monitoring_test.go index 9c6e9d307..be9df4cd0 100644 --- a/pkg/monitoring/proxy_monitoring_test.go +++ b/pkg/monitoring/proxy_monitoring_test.go @@ -7,7 +7,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/monitoring/source_envelope.go b/pkg/monitoring/source_envelope.go index 1ef3726e0..9ce2f8c0e 100644 --- a/pkg/monitoring/source_envelope.go +++ b/pkg/monitoring/source_envelope.go @@ -12,7 +12,7 @@ import ( "sync" "time" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" "github.com/smartcontractkit/libocr/offchainreporting2/types" "go.uber.org/multierr" diff --git a/pkg/monitoring/source_envelope_test.go b/pkg/monitoring/source_envelope_test.go index cb31e8432..175e2d45d 100644 --- a/pkg/monitoring/source_envelope_test.go +++ b/pkg/monitoring/source_envelope_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" "github.com/smartcontractkit/chainlink-cosmos/pkg/monitoring/fcdclient" fcdclientmocks "github.com/smartcontractkit/chainlink-cosmos/pkg/monitoring/fcdclient/mocks" diff --git a/pkg/monitoring/source_proxy.go b/pkg/monitoring/source_proxy.go index 4738c5746..f884285eb 100644 --- a/pkg/monitoring/source_proxy.go +++ b/pkg/monitoring/source_proxy.go @@ -6,7 +6,7 @@ import ( "fmt" "math/big" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" ) // ProxyData is a subset of the data returned by the Cosmos feed proxy contract's "latest_round_data" method. diff --git a/pkg/monitoring/source_txresults.go b/pkg/monitoring/source_txresults.go index ceef14025..5ed5feeba 100644 --- a/pkg/monitoring/source_txresults.go +++ b/pkg/monitoring/source_txresults.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" "github.com/smartcontractkit/chainlink-cosmos/pkg/monitoring/fcdclient" ) diff --git a/pkg/monitoring/source_txresults_test.go b/pkg/monitoring/source_txresults_test.go index 25d85f3f8..4dfb061ac 100644 --- a/pkg/monitoring/source_txresults_test.go +++ b/pkg/monitoring/source_txresults_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + relayMonitoring "github.com/smartcontractkit/chainlink-common/pkg/monitoring" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/pkg/monitoring/testutils.go b/pkg/monitoring/testutils.go index f8eeb0acf..6c79b1b85 100644 --- a/pkg/monitoring/testutils.go +++ b/pkg/monitoring/testutils.go @@ -9,8 +9,8 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "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