From f16fd6b37edd98c2baf9b52df49bd0801b98a8f4 Mon Sep 17 00:00:00 2001 From: mpetrun5 Date: Fri, 29 Sep 2023 17:19:05 +0200 Subject: [PATCH] Move modules related to transactions to transactor module --- chains/evm/{ => transactor}/gas/gas-pricer.go | 0 chains/evm/{ => transactor}/gas/london.go | 0 chains/evm/{ => transactor}/gas/london_test.go | 0 chains/evm/{ => transactor}/gas/static.go | 0 chains/evm/{ => transactor}/gas/static_test.go | 0 chains/evm/transactor/monitored/monitored.go | 2 +- chains/evm/transactor/monitored/monitored_test.go | 2 +- chains/evm/transactor/signAndSend/signAndSend.go | 2 +- chains/evm/transactor/signAndSend/signAndSend_test.go | 2 +- chains/evm/{ => transactor}/transaction/transaction.go | 0 chains/evm/{ => transactor}/transaction/transaction_test.go | 0 {logger => observability}/logger.go | 2 +- {opentelemetry => observability}/metrics.go | 2 +- {lvldb => store/lvldb}/lvldb.go | 0 14 files changed, 6 insertions(+), 6 deletions(-) rename chains/evm/{ => transactor}/gas/gas-pricer.go (100%) rename chains/evm/{ => transactor}/gas/london.go (100%) rename chains/evm/{ => transactor}/gas/london_test.go (100%) rename chains/evm/{ => transactor}/gas/static.go (100%) rename chains/evm/{ => transactor}/gas/static_test.go (100%) rename chains/evm/{ => transactor}/transaction/transaction.go (100%) rename chains/evm/{ => transactor}/transaction/transaction_test.go (100%) rename {logger => observability}/logger.go (94%) rename {opentelemetry => observability}/metrics.go (99%) rename {lvldb => store/lvldb}/lvldb.go (100%) diff --git a/chains/evm/gas/gas-pricer.go b/chains/evm/transactor/gas/gas-pricer.go similarity index 100% rename from chains/evm/gas/gas-pricer.go rename to chains/evm/transactor/gas/gas-pricer.go diff --git a/chains/evm/gas/london.go b/chains/evm/transactor/gas/london.go similarity index 100% rename from chains/evm/gas/london.go rename to chains/evm/transactor/gas/london.go diff --git a/chains/evm/gas/london_test.go b/chains/evm/transactor/gas/london_test.go similarity index 100% rename from chains/evm/gas/london_test.go rename to chains/evm/transactor/gas/london_test.go diff --git a/chains/evm/gas/static.go b/chains/evm/transactor/gas/static.go similarity index 100% rename from chains/evm/gas/static.go rename to chains/evm/transactor/gas/static.go diff --git a/chains/evm/gas/static_test.go b/chains/evm/transactor/gas/static_test.go similarity index 100% rename from chains/evm/gas/static_test.go rename to chains/evm/transactor/gas/static_test.go diff --git a/chains/evm/transactor/monitored/monitored.go b/chains/evm/transactor/monitored/monitored.go index 70a67d50..e958d227 100644 --- a/chains/evm/transactor/monitored/monitored.go +++ b/chains/evm/transactor/monitored/monitored.go @@ -11,8 +11,8 @@ import ( "github.com/rs/zerolog/log" "github.com/ChainSafe/sygma-core/chains/evm/client" - "github.com/ChainSafe/sygma-core/chains/evm/transaction" "github.com/ChainSafe/sygma-core/chains/evm/transactor" + "github.com/ChainSafe/sygma-core/chains/evm/transactor/transaction" ) type GasPricer interface { diff --git a/chains/evm/transactor/monitored/monitored_test.go b/chains/evm/transactor/monitored/monitored_test.go index ba4a5c80..5603d4bc 100644 --- a/chains/evm/transactor/monitored/monitored_test.go +++ b/chains/evm/transactor/monitored/monitored_test.go @@ -8,10 +8,10 @@ import ( "time" mock_calls "github.com/ChainSafe/sygma-core/chains/evm/mock" - "github.com/ChainSafe/sygma-core/chains/evm/transaction" "github.com/ChainSafe/sygma-core/chains/evm/transactor" mock_transactor "github.com/ChainSafe/sygma-core/chains/evm/transactor/mock" "github.com/ChainSafe/sygma-core/chains/evm/transactor/monitored" + "github.com/ChainSafe/sygma-core/chains/evm/transactor/transaction" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/golang/mock/gomock" diff --git a/chains/evm/transactor/signAndSend/signAndSend.go b/chains/evm/transactor/signAndSend/signAndSend.go index 6ab68098..10531017 100644 --- a/chains/evm/transactor/signAndSend/signAndSend.go +++ b/chains/evm/transactor/signAndSend/signAndSend.go @@ -5,8 +5,8 @@ import ( "math/big" "github.com/ChainSafe/sygma-core/chains/evm/client" - "github.com/ChainSafe/sygma-core/chains/evm/transaction" "github.com/ChainSafe/sygma-core/chains/evm/transactor" + "github.com/ChainSafe/sygma-core/chains/evm/transactor/transaction" "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog/log" ) diff --git a/chains/evm/transactor/signAndSend/signAndSend_test.go b/chains/evm/transactor/signAndSend/signAndSend_test.go index 9625d2f1..739e6dc1 100644 --- a/chains/evm/transactor/signAndSend/signAndSend_test.go +++ b/chains/evm/transactor/signAndSend/signAndSend_test.go @@ -5,10 +5,10 @@ import ( "testing" mock_calls "github.com/ChainSafe/sygma-core/chains/evm/mock" - "github.com/ChainSafe/sygma-core/chains/evm/transaction" "github.com/ChainSafe/sygma-core/chains/evm/transactor" mock_transactor "github.com/ChainSafe/sygma-core/chains/evm/transactor/mock" "github.com/ChainSafe/sygma-core/chains/evm/transactor/signAndSend" + "github.com/ChainSafe/sygma-core/chains/evm/transactor/transaction" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/golang/mock/gomock" diff --git a/chains/evm/transaction/transaction.go b/chains/evm/transactor/transaction/transaction.go similarity index 100% rename from chains/evm/transaction/transaction.go rename to chains/evm/transactor/transaction/transaction.go diff --git a/chains/evm/transaction/transaction_test.go b/chains/evm/transactor/transaction/transaction_test.go similarity index 100% rename from chains/evm/transaction/transaction_test.go rename to chains/evm/transactor/transaction/transaction_test.go diff --git a/logger/logger.go b/observability/logger.go similarity index 94% rename from logger/logger.go rename to observability/logger.go index d1832286..49cca965 100644 --- a/logger/logger.go +++ b/observability/logger.go @@ -1,4 +1,4 @@ -package logger +package observability import ( "io" diff --git a/opentelemetry/metrics.go b/observability/metrics.go similarity index 99% rename from opentelemetry/metrics.go rename to observability/metrics.go index f3c92352..0d3d4397 100644 --- a/opentelemetry/metrics.go +++ b/observability/metrics.go @@ -1,4 +1,4 @@ -package opentelemetry +package observability import ( "context" diff --git a/lvldb/lvldb.go b/store/lvldb/lvldb.go similarity index 100% rename from lvldb/lvldb.go rename to store/lvldb/lvldb.go