From 4eb3810ddfdb5227ec1afc53af2374732eeb3fce Mon Sep 17 00:00:00 2001 From: peter <1674920+peterbitfly@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:10:48 +0200 Subject: [PATCH] (BIDS-64) update imports --- cache/redis_cache.go | 3 +- cache/tiered_cache.go | 3 +- cmd/blobindexer/blobindexer.go | 9 +++--- cmd/bundle/main.go | 3 +- cmd/eth1indexer/main.go | 15 +++++---- cmd/ethstore-exporter/main.go | 11 ++++--- cmd/explorer/main.go | 32 ++++++++++--------- cmd/frontend-data-updater/main.go | 17 +++++----- cmd/migrations/bigtable/main.go | 13 ++++---- .../commands/validator_stats_partition.go | 3 +- cmd/misc/main.go | 19 +++++------ cmd/node-jobs-processor/main.go | 11 ++++--- cmd/notification-collector/main.go | 20 ++++++------ cmd/notification-sender/main.go | 18 ++++++----- cmd/rewards-exporter/main.go | 13 ++++---- cmd/signatures/main.go | 13 ++++---- cmd/statistics/main.go | 17 +++++----- cmd/user-service/main.go | 16 ++++++---- db/bigtable.go | 5 +-- db/bigtable_common.go | 5 +-- db/bigtable_eth1.go | 15 +++++---- db/bigtable_init.go | 3 +- db/db.go | 9 +++--- db/ens.go | 7 ++-- db/frontend.go | 7 ++-- db/node_jobs.go | 5 +-- db/statistics.go | 13 ++++---- db/stripe.go | 5 +-- db/subscriptions.go | 5 +-- erc20/erc20.go | 3 +- eth1data/eth1data.go | 13 ++++---- ethClients/ethClients.go | 3 +- exporter/appsubscription_oracle.go | 7 ++-- exporter/blobs.go | 7 ++-- exporter/eth1.go | 9 +++--- exporter/ethstore.go | 9 +++--- exporter/exporter.go | 9 +++--- exporter/pubkey_tags.go | 5 +-- exporter/relays.go | 7 ++-- exporter/rocketpool.go | 4 +-- exporter/slot_exporter.go | 9 +++--- exporter/ssv.go | 5 +-- exporter/sync_committees.go | 9 +++--- exporter/sync_committees_count.go | 5 +-- handlers/404.go | 3 +- handlers/ad_configuration.go | 9 +++--- handlers/advertisewithus.go | 9 +++--- handlers/api.go | 13 ++++---- handlers/api_eth1.go | 11 ++++--- handlers/auth.go | 11 ++++--- handlers/base.go | 3 +- handlers/broadcast.go | 11 ++++--- handlers/burn.go | 9 +++--- handlers/calculator.go | 9 +++--- handlers/charts.go | 9 +++--- handlers/common.go | 11 ++++--- handlers/confirmation.go | 5 +-- handlers/correlations.go | 7 ++-- handlers/dashboard.go | 13 ++++---- handlers/ens.go | 9 +++--- handlers/ensSearch.go | 5 +-- handlers/epoch.go | 11 ++++--- handlers/epochs.go | 11 ++++--- handlers/eth1Account.go | 11 ++++--- handlers/eth1Block.go | 13 ++++---- handlers/eth1Blocks.go | 11 ++++--- handlers/eth1Deposits.go | 11 ++++--- handlers/eth1Token.go | 11 ++++--- handlers/eth1Transactions.go | 11 ++++--- handlers/eth1tx.go | 13 ++++---- handlers/eth2Deposits.go | 7 ++-- handlers/ethClientsServices.go | 9 +++--- handlers/ethstore.go | 7 ++-- handlers/explorer_configuration.go | 11 ++++--- handlers/gasnow.go | 11 ++++--- handlers/gitcoinfeed.go | 3 +- handlers/graffitiwall.go | 9 +++--- handlers/imprint.go | 5 +-- handlers/index.go | 9 +++--- handlers/launch_metrics.go | 5 +-- handlers/mempoolView.go | 9 +++--- handlers/mobilepage.go | 7 ++-- handlers/modals.go | 7 ++-- handlers/monitoring.go | 3 +- handlers/pageData.go | 13 ++++---- handlers/pools.go | 9 +++--- handlers/pools_rocketpool.go | 9 +++--- handlers/pricing.go | 11 ++++--- handlers/relays.go | 7 ++-- handlers/search.go | 9 +++--- handlers/slot.go | 11 ++++--- handlers/slot_finder.go | 3 +- handlers/slots.go | 11 ++++--- handlers/stakingServices.go | 7 ++-- handlers/stripe.go | 9 +++--- handlers/unitConverter.go | 3 +- handlers/user.go | 15 +++++---- handlers/validator.go | 11 ++++--- handlers/validatorRewards.go | 11 ++++--- handlers/validators.go | 13 ++++---- handlers/validators_leaderboard.go | 9 +++--- handlers/validators_slashings.go | 9 +++--- handlers/vis.go | 9 +++--- handlers/withdrawals.go | 11 ++++--- mail/mail.go | 9 +++--- metrics/metrics.go | 5 +-- notify/firebase.go | 3 +- price/price.go | 3 +- ratelimit/ratelimit.go | 7 ++-- rpc/erigon.go | 9 +++--- rpc/geth.go | 7 ++-- rpc/interfaces.go | 3 +- rpc/lighthouse.go | 5 +-- services/charts_updater.go | 13 ++++---- services/configuration.go | 5 +-- services/execution_layer.go | 7 ++-- services/gitcoin_feed_updater.go | 3 +- services/historic_prices.go | 9 +++--- services/monitoring.go | 5 +-- services/notifications.go | 15 +++++---- services/pubkeyCache.go | 3 +- services/rewards.go | 7 ++-- services/services.go | 13 ++++---- services/stats.go | 9 +++--- services/status.go | 7 ++-- templates/templates.go | 3 +- userService/stripe_email_updater.go | 5 +-- utils/eth1.go | 3 +- utils/eth_test.go | 3 +- utils/format.go | 5 +-- utils/utils.go | 7 ++-- 131 files changed, 634 insertions(+), 500 deletions(-) diff --git a/cache/redis_cache.go b/cache/redis_cache.go index 319f8f4834..ae8695f596 100644 --- a/cache/redis_cache.go +++ b/cache/redis_cache.go @@ -3,11 +3,12 @@ package cache import ( "context" "encoding/json" - "eth2-exporter/utils" "fmt" "strconv" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/go-redis/redis/v8" ) diff --git a/cache/tiered_cache.go b/cache/tiered_cache.go index 531c7bf837..815fa361b0 100644 --- a/cache/tiered_cache.go +++ b/cache/tiered_cache.go @@ -3,11 +3,12 @@ package cache import ( "context" "encoding/json" - "eth2-exporter/utils" "fmt" "strconv" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/coocood/freecache" "github.com/sirupsen/logrus" ) diff --git a/cmd/blobindexer/blobindexer.go b/cmd/blobindexer/blobindexer.go index dd6bcb807b..b026eb3419 100644 --- a/cmd/blobindexer/blobindexer.go +++ b/cmd/blobindexer/blobindexer.go @@ -1,13 +1,14 @@ package main import ( - "eth2-exporter/exporter" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" + "github.com/gobitfly/eth2-beaconchain-explorer/exporter" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/sirupsen/logrus" ) diff --git a/cmd/bundle/main.go b/cmd/bundle/main.go index 0c5e76ad25..bde003908d 100644 --- a/cmd/bundle/main.go +++ b/cmd/bundle/main.go @@ -2,13 +2,14 @@ package main import ( "crypto/md5" - "eth2-exporter/utils" "fmt" "log" "os" "path" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/evanw/esbuild/pkg/api" ) diff --git a/cmd/eth1indexer/main.go b/cmd/eth1indexer/main.go index 00529740d3..c98f128def 100644 --- a/cmd/eth1indexer/main.go +++ b/cmd/eth1indexer/main.go @@ -5,13 +5,6 @@ import ( "context" "encoding/hex" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/erc20" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "io" @@ -23,6 +16,14 @@ import ( "sync/atomic" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/erc20" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/coocood/freecache" "github.com/ethereum/go-ethereum/common" _ "github.com/jackc/pgx/v5/stdlib" diff --git a/cmd/ethstore-exporter/main.go b/cmd/ethstore-exporter/main.go index 49d56d8d22..9a9ebd4a80 100644 --- a/cmd/ethstore-exporter/main.go +++ b/cmd/ethstore-exporter/main.go @@ -1,16 +1,17 @@ package main import ( - "eth2-exporter/db" - "eth2-exporter/exporter" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "strconv" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/exporter" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + ethstore "github.com/gobitfly/eth.store" _ "github.com/jackc/pgx/v5/stdlib" "github.com/sirupsen/logrus" diff --git a/cmd/explorer/main.go b/cmd/explorer/main.go index a0b4785dbe..afe23b3e4b 100644 --- a/cmd/explorer/main.go +++ b/cmd/explorer/main.go @@ -4,20 +4,6 @@ import ( "context" "encoding/gob" "encoding/hex" - "eth2-exporter/cache" - "eth2-exporter/db" - ethclients "eth2-exporter/ethClients" - "eth2-exporter/exporter" - "eth2-exporter/handlers" - "eth2-exporter/metrics" - "eth2-exporter/price" - "eth2-exporter/ratelimit" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/static" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "math/big" @@ -26,13 +12,29 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + ethclients "github.com/gobitfly/eth2-beaconchain-explorer/ethClients" + "github.com/gobitfly/eth2-beaconchain-explorer/exporter" + "github.com/gobitfly/eth2-beaconchain-explorer/handlers" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/ratelimit" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/static" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + httpSwagger "github.com/swaggo/http-swagger" "github.com/sirupsen/logrus" - _ "eth2-exporter/docs" _ "net/http/pprof" + _ "github.com/gobitfly/eth2-beaconchain-explorer/docs" + "github.com/gorilla/csrf" "github.com/gorilla/mux" _ "github.com/jackc/pgx/v5/stdlib" diff --git a/cmd/frontend-data-updater/main.go b/cmd/frontend-data-updater/main.go index c5ac77a1f7..131f163df6 100644 --- a/cmd/frontend-data-updater/main.go +++ b/cmd/frontend-data-updater/main.go @@ -1,18 +1,19 @@ package main import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "math/big" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + _ "github.com/jackc/pgx/v5/stdlib" "github.com/sirupsen/logrus" diff --git a/cmd/migrations/bigtable/main.go b/cmd/migrations/bigtable/main.go index 897bc768ab..dd5627b13a 100644 --- a/cmd/migrations/bigtable/main.go +++ b/cmd/migrations/bigtable/main.go @@ -1,17 +1,18 @@ package main import ( - "eth2-exporter/db" - "eth2-exporter/exporter" - "eth2-exporter/rpc" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "math/big" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/exporter" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" ) diff --git a/cmd/misc/commands/validator_stats_partition.go b/cmd/misc/commands/validator_stats_partition.go index 0a538220f6..8c55938e0a 100644 --- a/cmd/misc/commands/validator_stats_partition.go +++ b/cmd/misc/commands/validator_stats_partition.go @@ -1,13 +1,14 @@ package commands import ( - "eth2-exporter/db" "flag" "fmt" "math" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/jmoiron/sqlx" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/cmd/misc/main.go b/cmd/misc/main.go index 33924098d9..da5ee0e610 100644 --- a/cmd/misc/main.go +++ b/cmd/misc/main.go @@ -7,15 +7,6 @@ import ( "database/sql" "encoding/base64" "encoding/json" - "eth2-exporter/cmd/misc/commands" - "eth2-exporter/db" - "eth2-exporter/exporter" - "eth2-exporter/ratelimit" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "fmt" "math" "math/big" @@ -25,6 +16,16 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cmd/misc/commands" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/exporter" + "github.com/gobitfly/eth2-beaconchain-explorer/ratelimit" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/coocood/freecache" "github.com/ethereum/go-ethereum/common" _ "github.com/jackc/pgx/v5/stdlib" diff --git a/cmd/node-jobs-processor/main.go b/cmd/node-jobs-processor/main.go index e653bcf5bf..93bb767015 100644 --- a/cmd/node-jobs-processor/main.go +++ b/cmd/node-jobs-processor/main.go @@ -1,15 +1,16 @@ package main import ( - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + _ "github.com/jackc/pgx/v5/stdlib" "github.com/sirupsen/logrus" diff --git a/cmd/notification-collector/main.go b/cmd/notification-collector/main.go index ca746d0128..bcd4d3faf4 100644 --- a/cmd/notification-collector/main.go +++ b/cmd/notification-collector/main.go @@ -1,25 +1,27 @@ package main import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "net/http" "strings" "sync" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/sirupsen/logrus" - _ "eth2-exporter/docs" _ "net/http/pprof" + _ "github.com/gobitfly/eth2-beaconchain-explorer/docs" + _ "github.com/jackc/pgx/v5/stdlib" ) diff --git a/cmd/notification-sender/main.go b/cmd/notification-sender/main.go index 58df1561ce..02ce691062 100644 --- a/cmd/notification-sender/main.go +++ b/cmd/notification-sender/main.go @@ -1,24 +1,26 @@ package main import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "net/http" "strings" "sync" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/sirupsen/logrus" - _ "eth2-exporter/docs" _ "net/http/pprof" + _ "github.com/gobitfly/eth2-beaconchain-explorer/docs" + _ "github.com/jackc/pgx/v5/stdlib" ) diff --git a/cmd/rewards-exporter/main.go b/cmd/rewards-exporter/main.go index d36a9446db..5cccff70c9 100644 --- a/cmd/rewards-exporter/main.go +++ b/cmd/rewards-exporter/main.go @@ -1,17 +1,18 @@ package main import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "sync/atomic" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + eth_rewards "github.com/gobitfly/eth-rewards" "github.com/gobitfly/eth-rewards/beacon" _ "github.com/jackc/pgx/v5/stdlib" diff --git a/cmd/signatures/main.go b/cmd/signatures/main.go index 7c3657e4e8..db3737886a 100644 --- a/cmd/signatures/main.go +++ b/cmd/signatures/main.go @@ -2,18 +2,19 @@ package main import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "io" "net/http" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + _ "github.com/jackc/pgx/v5/stdlib" "github.com/sirupsen/logrus" diff --git a/cmd/statistics/main.go b/cmd/statistics/main.go index e69047b99a..7e84bae18b 100644 --- a/cmd/statistics/main.go +++ b/cmd/statistics/main.go @@ -1,14 +1,6 @@ package main import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "math/big" @@ -16,6 +8,15 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + _ "github.com/jackc/pgx/v5/stdlib" "github.com/sirupsen/logrus" ) diff --git a/cmd/user-service/main.go b/cmd/user-service/main.go index 4619572e47..e0afd26626 100644 --- a/cmd/user-service/main.go +++ b/cmd/user-service/main.go @@ -1,22 +1,24 @@ package main import ( - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/types" - "eth2-exporter/userService" - "eth2-exporter/utils" - "eth2-exporter/version" "flag" "fmt" "net/http" "sync" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/userService" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/sirupsen/logrus" - _ "eth2-exporter/docs" _ "net/http/pprof" + _ "github.com/gobitfly/eth2-beaconchain-explorer/docs" + _ "github.com/jackc/pgx/v5/stdlib" ) diff --git a/db/bigtable.go b/db/bigtable.go index 774fd6dcad..8098835f4a 100644 --- a/db/bigtable.go +++ b/db/bigtable.go @@ -3,8 +3,6 @@ package db import ( "context" "encoding/binary" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math" "os" @@ -14,6 +12,9 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + gcp_bigtable "cloud.google.com/go/bigtable" "github.com/go-redis/redis/v8" itypes "github.com/gobitfly/eth-rewards/types" diff --git a/db/bigtable_common.go b/db/bigtable_common.go index 129dc7e02a..4d643b20c6 100644 --- a/db/bigtable_common.go +++ b/db/bigtable_common.go @@ -2,13 +2,14 @@ package db import ( "context" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "sort" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + gcp_bigtable "cloud.google.com/go/bigtable" "github.com/sirupsen/logrus" ) diff --git a/db/bigtable_eth1.go b/db/bigtable_eth1.go index b7a0c937b8..c7ce31c15b 100644 --- a/db/bigtable_eth1.go +++ b/db/bigtable_eth1.go @@ -6,13 +6,6 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/cache" - "eth2-exporter/erc1155" - "eth2-exporter/erc20" - "eth2-exporter/erc721" - "eth2-exporter/rpc" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "log" "math/big" @@ -21,6 +14,14 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/erc1155" + "github.com/gobitfly/eth2-beaconchain-explorer/erc20" + "github.com/gobitfly/eth2-beaconchain-explorer/erc721" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "strconv" gcp_bigtable "cloud.google.com/go/bigtable" diff --git a/db/bigtable_init.go b/db/bigtable_init.go index d11a496416..fa15ab03c9 100644 --- a/db/bigtable_init.go +++ b/db/bigtable_init.go @@ -2,10 +2,11 @@ package db import ( "context" - "eth2-exporter/utils" "fmt" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + gcp_bigtable "cloud.google.com/go/bigtable" ) diff --git a/db/db.go b/db/db.go index 0b25ee83dd..a4204c052f 100644 --- a/db/db.go +++ b/db/db.go @@ -6,9 +6,6 @@ import ( "embed" "encoding/hex" "errors" - "eth2-exporter/metrics" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math/big" "net" @@ -18,6 +15,10 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" "github.com/jmoiron/sqlx" "github.com/lib/pq" @@ -26,7 +27,7 @@ import ( ethpb "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1" "github.com/sirupsen/logrus" - "eth2-exporter/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" "github.com/jackc/pgx/v5/pgxpool" ) diff --git a/db/ens.go b/db/ens.go index 6629d8f5ff..2b3844ccd7 100644 --- a/db/ens.go +++ b/db/ens.go @@ -5,15 +5,16 @@ import ( "context" "database/sql" "encoding/hex" - "eth2-exporter/ens" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "log" "strings" "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/ens" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + gcp_bigtable "cloud.google.com/go/bigtable" "golang.org/x/sync/errgroup" diff --git a/db/frontend.go b/db/frontend.go index bef3dec352..75944e4c41 100644 --- a/db/frontend.go +++ b/db/frontend.go @@ -5,13 +5,14 @@ import ( "database/sql" "encoding/hex" "errors" - "eth2-exporter/cache" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/jmoiron/sqlx" "github.com/lib/pq" "golang.org/x/crypto/bcrypt" diff --git a/db/node_jobs.go b/db/node_jobs.go index de515e1d37..93630778e4 100644 --- a/db/node_jobs.go +++ b/db/node_jobs.go @@ -3,14 +3,15 @@ package db import ( "bytes" "database/sql" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "io" "net/http" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/attestantio/go-eth2-client/spec/capella" "github.com/google/uuid" "github.com/lib/pq" diff --git a/db/statistics.go b/db/statistics.go index e0c202fe6c..dae72ac5a8 100644 --- a/db/statistics.go +++ b/db/statistics.go @@ -3,18 +3,19 @@ package db import ( "context" "database/sql" - "eth2-exporter/cache" - "eth2-exporter/metrics" - "eth2-exporter/price" - "eth2-exporter/rpc" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math/big" "strings" "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/stdlib" diff --git a/db/stripe.go b/db/stripe.go index 53b6e00b79..63ce4106dc 100644 --- a/db/stripe.go +++ b/db/stripe.go @@ -3,10 +3,11 @@ package db import ( "database/sql" "encoding/json" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // StripeRemoveCustomer removes the stripe customer and sets all subscriptions to inactive diff --git a/db/subscriptions.go b/db/subscriptions.go index f71b20b56a..3c8c66be91 100644 --- a/db/subscriptions.go +++ b/db/subscriptions.go @@ -3,12 +3,13 @@ package db import ( "database/sql" "encoding/hex" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/jmoiron/sqlx" "github.com/lib/pq" "github.com/pkg/errors" diff --git a/erc20/erc20.go b/erc20/erc20.go index c6660327d0..793b2e9453 100644 --- a/erc20/erc20.go +++ b/erc20/erc20.go @@ -2,12 +2,13 @@ package erc20 import ( "encoding/json" - "eth2-exporter/utils" "fmt" "math/big" "os" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/shopspring/decimal" "github.com/sirupsen/logrus" diff --git a/eth1data/eth1data.go b/eth1data/eth1data.go index d4c18b3b3b..0b491f04bc 100644 --- a/eth1data/eth1data.go +++ b/eth1data/eth1data.go @@ -5,17 +5,18 @@ import ( "context" "encoding/hex" "errors" - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math/big" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/ethClients/ethClients.go b/ethClients/ethClients.go index 5b981eaf9e..4f8a281bb9 100644 --- a/ethClients/ethClients.go +++ b/ethClients/ethClients.go @@ -2,7 +2,6 @@ package ethclients import ( "encoding/json" - "eth2-exporter/utils" "fmt" "html/template" "net/http" @@ -11,6 +10,8 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/sirupsen/logrus" ) diff --git a/exporter/appsubscription_oracle.go b/exporter/appsubscription_oracle.go index bef2158e59..b47798150e 100644 --- a/exporter/appsubscription_oracle.go +++ b/exporter/appsubscription_oracle.go @@ -3,15 +3,16 @@ package exporter import ( "context" "encoding/base64" - "eth2-exporter/db" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math" "os" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/Gurpartap/storekit-go" "github.com/awa/go-iap/appstore" "github.com/awa/go-iap/appstore/api" diff --git a/exporter/blobs.go b/exporter/blobs.go index 8bedb11533..d520e1b0b5 100644 --- a/exporter/blobs.go +++ b/exporter/blobs.go @@ -6,15 +6,16 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/metrics" - "eth2-exporter/utils" - "eth2-exporter/version" "fmt" "net/http" "strings" "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/aws/aws-sdk-go-v2/aws" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" "github.com/aws/aws-sdk-go-v2/credentials" diff --git a/exporter/eth1.go b/exporter/eth1.go index adb6bd403a..8f590cfdd9 100644 --- a/exporter/eth1.go +++ b/exporter/eth1.go @@ -3,15 +3,16 @@ package exporter import ( "context" "database/sql" - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math/big" "regexp" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/exporter/ethstore.go b/exporter/ethstore.go index 42173f3018..af6b48c980 100644 --- a/exporter/ethstore.go +++ b/exporter/ethstore.go @@ -2,16 +2,17 @@ package exporter import ( "context" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "sort" "strconv" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + ethstore "github.com/gobitfly/eth.store" "github.com/jmoiron/sqlx" "github.com/shopspring/decimal" diff --git a/exporter/exporter.go b/exporter/exporter.go index 29cc1787f1..5eb072f014 100644 --- a/exporter/exporter.go +++ b/exporter/exporter.go @@ -1,12 +1,13 @@ package exporter import ( - "eth2-exporter/db" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/utils" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/sirupsen/logrus" ) diff --git a/exporter/pubkey_tags.go b/exporter/pubkey_tags.go index b3ec3a157e..1c7947a75f 100644 --- a/exporter/pubkey_tags.go +++ b/exporter/pubkey_tags.go @@ -1,9 +1,10 @@ package exporter import ( - "eth2-exporter/db" - "eth2-exporter/metrics" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" ) func UpdatePubkeyTag() { diff --git a/exporter/relays.go b/exporter/relays.go index 5f1b80b4ca..8bf5a533d7 100644 --- a/exporter/relays.go +++ b/exporter/relays.go @@ -3,15 +3,16 @@ package exporter import ( "database/sql" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math" "net/http" "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/sirupsen/logrus" ) diff --git a/exporter/rocketpool.go b/exporter/rocketpool.go index 64e6185c25..bbf77cbe21 100644 --- a/exporter/rocketpool.go +++ b/exporter/rocketpool.go @@ -11,8 +11,8 @@ import ( "sync" "time" - "eth2-exporter/db" - "eth2-exporter/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" diff --git a/exporter/slot_exporter.go b/exporter/slot_exporter.go index 3dd22e63c6..94e002a161 100644 --- a/exporter/slot_exporter.go +++ b/exporter/slot_exporter.go @@ -3,15 +3,16 @@ package exporter import ( "bytes" "database/sql" - "eth2-exporter/db" - "eth2-exporter/rpc" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "strconv" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/jmoiron/sqlx" "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" diff --git a/exporter/ssv.go b/exporter/ssv.go index 6eef1fe7ed..fa74ea9daa 100644 --- a/exporter/ssv.go +++ b/exporter/ssv.go @@ -3,12 +3,13 @@ package exporter import ( "encoding/hex" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/utils" "fmt" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/websocket" "github.com/sirupsen/logrus" ) diff --git a/exporter/sync_committees.go b/exporter/sync_committees.go index 3f04286db5..52d79848ac 100644 --- a/exporter/sync_committees.go +++ b/exporter/sync_committees.go @@ -1,15 +1,16 @@ package exporter import ( - "eth2-exporter/db" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/utils" "fmt" "strconv" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/jmoiron/sqlx" "github.com/sirupsen/logrus" ) diff --git a/exporter/sync_committees_count.go b/exporter/sync_committees_count.go index 0ff2c84502..f80a374b28 100644 --- a/exporter/sync_committees_count.go +++ b/exporter/sync_committees_count.go @@ -1,11 +1,12 @@ package exporter import ( - "eth2-exporter/db" - "eth2-exporter/utils" "fmt" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/sirupsen/logrus" ) diff --git a/handlers/404.go b/handlers/404.go index 985620e9c7..a36a321302 100644 --- a/handlers/404.go +++ b/handlers/404.go @@ -2,11 +2,12 @@ package handlers import ( "errors" - "eth2-exporter/templates" "io/fs" "net/http" "path" "strings" + + "github.com/gobitfly/eth2-beaconchain-explorer/templates" ) type customFileServer struct { diff --git a/handlers/ad_configuration.go b/handlers/ad_configuration.go index e16da11510..1fd6eca5d6 100644 --- a/handlers/ad_configuration.go +++ b/handlers/ad_configuration.go @@ -1,13 +1,14 @@ package handlers import ( - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" "strconv" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/google/uuid" "github.com/gorilla/csrf" ) diff --git a/handlers/advertisewithus.go b/handlers/advertisewithus.go index 3fe3385632..bdfb32d1d4 100644 --- a/handlers/advertisewithus.go +++ b/handlers/advertisewithus.go @@ -1,13 +1,14 @@ package handlers import ( - "eth2-exporter/mail" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/mail" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) func AdvertiseWithUs(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/api.go b/handlers/api.go index 9de4589f6e..156ff57759 100644 --- a/handlers/api.go +++ b/handlers/api.go @@ -8,12 +8,6 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/db" - "eth2-exporter/exporter" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "io" "math/big" @@ -25,6 +19,13 @@ import ( "sync/atomic" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/exporter" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" gorillacontext "github.com/gorilla/context" "github.com/gorilla/mux" diff --git a/handlers/api_eth1.go b/handlers/api_eth1.go index 79cf0f3234..7036022423 100644 --- a/handlers/api_eth1.go +++ b/handlers/api_eth1.go @@ -3,11 +3,6 @@ package handlers import ( "encoding/hex" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math/big" "net/http" @@ -16,6 +11,12 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" "github.com/gorilla/mux" "github.com/lib/pq" diff --git a/handlers/auth.go b/handlers/auth.go index 135a2024b5..dd0f29d887 100644 --- a/handlers/auth.go +++ b/handlers/auth.go @@ -3,15 +3,16 @@ package handlers import ( "database/sql" "errors" - "eth2-exporter/db" - "eth2-exporter/mail" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/mail" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "net/http" "github.com/gorilla/csrf" diff --git a/handlers/base.go b/handlers/base.go index a082dccd3d..22f8eaae33 100644 --- a/handlers/base.go +++ b/handlers/base.go @@ -2,10 +2,11 @@ package handlers import ( "encoding/json" - "eth2-exporter/utils" "fmt" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/context" ) diff --git a/handlers/broadcast.go b/handlers/broadcast.go index 7792857f25..572e03d9c4 100644 --- a/handlers/broadcast.go +++ b/handlers/broadcast.go @@ -3,14 +3,15 @@ package handlers import ( "database/sql" "errors" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/mux" ) diff --git a/handlers/burn.go b/handlers/burn.go index 60700433c5..888c2cb2de 100644 --- a/handlers/burn.go +++ b/handlers/burn.go @@ -2,11 +2,12 @@ package handlers import ( "encoding/json" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/utils" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) func Burn(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/calculator.go b/handlers/calculator.go index b41a752c10..dd0856158c 100644 --- a/handlers/calculator.go +++ b/handlers/calculator.go @@ -1,11 +1,12 @@ package handlers import ( - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // StakingCalculator renders stakingCalculatorTemplate diff --git a/handlers/charts.go b/handlers/charts.go index e5fba0ba22..102b11da41 100644 --- a/handlers/charts.go +++ b/handlers/charts.go @@ -2,14 +2,15 @@ package handlers import ( "encoding/json" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/mux" ) diff --git a/handlers/common.go b/handlers/common.go index 6e0ae2ca0e..0d899859a6 100644 --- a/handlers/common.go +++ b/handlers/common.go @@ -5,11 +5,6 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math" @@ -21,6 +16,12 @@ import ( "syscall" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" "github.com/gorilla/mux" utilMath "github.com/protolambda/zrnt/eth2/util/math" diff --git a/handlers/confirmation.go b/handlers/confirmation.go index bf8e5c10c3..29de07f3d8 100644 --- a/handlers/confirmation.go +++ b/handlers/confirmation.go @@ -1,9 +1,10 @@ package handlers import ( - "eth2-exporter/templates" - "eth2-exporter/utils" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // Will return the confirmation page diff --git a/handlers/correlations.go b/handlers/correlations.go index fcdad98df8..ce74f522ac 100644 --- a/handlers/correlations.go +++ b/handlers/correlations.go @@ -2,9 +2,10 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" "net/http" "time" diff --git a/handlers/dashboard.go b/handlers/dashboard.go index f80fd7f5cd..84fe844092 100644 --- a/handlers/dashboard.go +++ b/handlers/dashboard.go @@ -6,12 +6,6 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math" @@ -20,6 +14,13 @@ import ( "sort" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "strconv" "strings" diff --git a/handlers/ens.go b/handlers/ens.go index 76a60dd0c3..d91db920e7 100644 --- a/handlers/ens.go +++ b/handlers/ens.go @@ -3,15 +3,16 @@ package handlers import ( "encoding/json" "errors" - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" "github.com/gorilla/mux" ) diff --git a/handlers/ensSearch.go b/handlers/ensSearch.go index 612929f56c..97bdff7385 100644 --- a/handlers/ensSearch.go +++ b/handlers/ensSearch.go @@ -1,10 +1,11 @@ package handlers import ( - "eth2-exporter/templates" - "eth2-exporter/types" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gorilla/mux" ) diff --git a/handlers/epoch.go b/handlers/epoch.go index 5792588463..f192563b75 100644 --- a/handlers/epoch.go +++ b/handlers/epoch.go @@ -3,17 +3,18 @@ package handlers import ( "database/sql" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math" "net/http" "strconv" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/mux" ) diff --git a/handlers/epochs.go b/handlers/epochs.go index 690a9f4a6a..0dbfd42fac 100644 --- a/handlers/epochs.go +++ b/handlers/epochs.go @@ -2,14 +2,15 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" "strconv" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // Epochs will return the epochs using a go template diff --git a/handlers/eth1Account.go b/handlers/eth1Account.go index db4a64ef91..291766102f 100644 --- a/handlers/eth1Account.go +++ b/handlers/eth1Account.go @@ -3,17 +3,18 @@ package handlers import ( "context" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/eth1data" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "net/http" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/eth1data" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" "github.com/gorilla/mux" "golang.org/x/sync/errgroup" diff --git a/handlers/eth1Block.go b/handlers/eth1Block.go index 4ed73ce392..39b644cdc1 100644 --- a/handlers/eth1Block.go +++ b/handlers/eth1Block.go @@ -2,18 +2,19 @@ package handlers import ( "database/sql" - "eth2-exporter/db" - "eth2-exporter/rpc" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math/big" "net/http" "strconv" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/consensus/misc/eip4844" "github.com/gorilla/mux" ) diff --git a/handlers/eth1Blocks.go b/handlers/eth1Blocks.go index b735dbe80e..488beaa4b0 100644 --- a/handlers/eth1Blocks.go +++ b/handlers/eth1Blocks.go @@ -2,11 +2,6 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math" @@ -14,6 +9,12 @@ import ( "net/http" "strconv" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/golang/protobuf/ptypes/timestamp" "github.com/shopspring/decimal" "github.com/sirupsen/logrus" diff --git a/handlers/eth1Deposits.go b/handlers/eth1Deposits.go index 689a8125b9..46fb8fe252 100644 --- a/handlers/eth1Deposits.go +++ b/handlers/eth1Deposits.go @@ -2,14 +2,15 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" "strconv" "strings" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // Deposits will return information about deposits using a go template diff --git a/handlers/eth1Token.go b/handlers/eth1Token.go index 9645e9bb93..4b5387889e 100644 --- a/handlers/eth1Token.go +++ b/handlers/eth1Token.go @@ -2,17 +2,18 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math/big" "net/http" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" "github.com/gorilla/mux" "github.com/shopspring/decimal" diff --git a/handlers/eth1Transactions.go b/handlers/eth1Transactions.go index 02dddbe066..8bb88b5e1c 100644 --- a/handlers/eth1Transactions.go +++ b/handlers/eth1Transactions.go @@ -2,17 +2,18 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math/big" "net/http" "strconv" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "golang.org/x/sync/errgroup" ) diff --git a/handlers/eth1tx.go b/handlers/eth1tx.go index 13d1d37d29..5dfad52f8f 100644 --- a/handlers/eth1tx.go +++ b/handlers/eth1tx.go @@ -4,17 +4,18 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/db" - "eth2-exporter/eth1data" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "net/http" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/eth1data" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/gorilla/mux" diff --git a/handlers/eth2Deposits.go b/handlers/eth2Deposits.go index a7d608b10b..da0910a6cd 100644 --- a/handlers/eth2Deposits.go +++ b/handlers/eth2Deposits.go @@ -2,12 +2,13 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" "strconv" "strings" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // Eth2Deposits will return information about deposits using a go template diff --git a/handlers/ethClientsServices.go b/handlers/ethClientsServices.go index 8410b8ae8d..d5ec956602 100644 --- a/handlers/ethClientsServices.go +++ b/handlers/ethClientsServices.go @@ -1,12 +1,13 @@ package handlers import ( - "eth2-exporter/db" - ethclients "eth2-exporter/ethClients" - "eth2-exporter/templates" - "eth2-exporter/types" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + ethclients "github.com/gobitfly/eth2-beaconchain-explorer/ethClients" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gorilla/csrf" ) diff --git a/handlers/ethstore.go b/handlers/ethstore.go index 4eec66acd7..5cdb20e18e 100644 --- a/handlers/ethstore.go +++ b/handlers/ethstore.go @@ -1,10 +1,11 @@ package handlers import ( - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" ) func EthStore(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/explorer_configuration.go b/handlers/explorer_configuration.go index 57058936f1..acc1312e6b 100644 --- a/handlers/explorer_configuration.go +++ b/handlers/explorer_configuration.go @@ -1,14 +1,15 @@ package handlers import ( - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/csrf" ) diff --git a/handlers/gasnow.go b/handlers/gasnow.go index 51b26bc179..9f25350aa6 100644 --- a/handlers/gasnow.go +++ b/handlers/gasnow.go @@ -2,15 +2,16 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/utils" "fmt" "net/http" "sort" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // Will return the gas now page diff --git a/handlers/gitcoinfeed.go b/handlers/gitcoinfeed.go index 3e8ff05cb9..fe2f052966 100644 --- a/handlers/gitcoinfeed.go +++ b/handlers/gitcoinfeed.go @@ -2,8 +2,9 @@ package handlers import ( "encoding/json" - "eth2-exporter/services" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/services" ) func GitcoinFeed(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/graffitiwall.go b/handlers/graffitiwall.go index ad11f4dea4..9f6f1b5634 100644 --- a/handlers/graffitiwall.go +++ b/handlers/graffitiwall.go @@ -1,11 +1,12 @@ package handlers import ( - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) func Graffitiwall(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/imprint.go b/handlers/imprint.go index 4c2e30504c..cd4cb1e613 100644 --- a/handlers/imprint.go +++ b/handlers/imprint.go @@ -1,10 +1,11 @@ package handlers import ( - "eth2-exporter/templates" - "eth2-exporter/utils" "html/template" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) var imprintTemplate *template.Template diff --git a/handlers/index.go b/handlers/index.go index 16ab259491..5db2c7b3a8 100644 --- a/handlers/index.go +++ b/handlers/index.go @@ -2,13 +2,14 @@ package handlers import ( "encoding/json" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // Index will return the main "index" page using a go template diff --git a/handlers/launch_metrics.go b/handlers/launch_metrics.go index 8bd1339ff4..eb0b8c0124 100644 --- a/handlers/launch_metrics.go +++ b/handlers/launch_metrics.go @@ -2,10 +2,11 @@ package handlers import ( "encoding/json" - "eth2-exporter/services" - "eth2-exporter/utils" "fmt" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // var currentEpoch uint64 diff --git a/handlers/mempoolView.go b/handlers/mempoolView.go index 2f2817c17b..60cacce790 100644 --- a/handlers/mempoolView.go +++ b/handlers/mempoolView.go @@ -1,13 +1,14 @@ package handlers import ( - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "math/big" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/common" ) diff --git a/handlers/mobilepage.go b/handlers/mobilepage.go index 2ac857a3ce..b8f10972f8 100644 --- a/handlers/mobilepage.go +++ b/handlers/mobilepage.go @@ -1,10 +1,11 @@ package handlers import ( - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) func MobilePage(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/modals.go b/handlers/modals.go index 71deff4f95..54317977cd 100644 --- a/handlers/modals.go +++ b/handlers/modals.go @@ -3,15 +3,16 @@ package handlers import ( "context" "encoding/hex" - "eth2-exporter/db" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" "strconv" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "golang.org/x/sync/errgroup" ) diff --git a/handlers/monitoring.go b/handlers/monitoring.go index 62cefc8681..2e3e9b9bea 100644 --- a/handlers/monitoring.go +++ b/handlers/monitoring.go @@ -3,10 +3,11 @@ package handlers import ( "database/sql" "errors" - "eth2-exporter/db" "fmt" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gorilla/mux" ) diff --git a/handlers/pageData.go b/handlers/pageData.go index 81f7a3d25b..e5bdd355ac 100644 --- a/handlers/pageData.go +++ b/handlers/pageData.go @@ -3,16 +3,17 @@ package handlers import ( "context" "errors" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/types" - "eth2-exporter/utils" - "eth2-exporter/version" "fmt" "net/http" "strings" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" ) var layoutTemplateFiles = []string{ diff --git a/handlers/pools.go b/handlers/pools.go index 0c1b653f91..0d1e43f4c5 100644 --- a/handlers/pools.go +++ b/handlers/pools.go @@ -1,13 +1,14 @@ package handlers import ( - // "eth2-exporter/db" + // "github.com/gobitfly/eth2-beaconchain-explorer/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" "fmt" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" // "strings" ) diff --git a/handlers/pools_rocketpool.go b/handlers/pools_rocketpool.go index ce468107c2..707a352792 100644 --- a/handlers/pools_rocketpool.go +++ b/handlers/pools_rocketpool.go @@ -3,15 +3,16 @@ package handlers import ( "bytes" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "net/http" "strconv" "strings" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // PoolsRocketpool returns the rocketpool using a go template diff --git a/handlers/pricing.go b/handlers/pricing.go index 342c5dc912..f322586a93 100644 --- a/handlers/pricing.go +++ b/handlers/pricing.go @@ -2,15 +2,16 @@ package handlers import ( "database/sql" - "eth2-exporter/db" - "eth2-exporter/mail" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "net/http" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/mail" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/csrf" ) diff --git a/handlers/relays.go b/handlers/relays.go index 36b3d1da8e..7ef989444e 100644 --- a/handlers/relays.go +++ b/handlers/relays.go @@ -1,10 +1,11 @@ package handlers import ( - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" ) func Relays(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/search.go b/handlers/search.go index 1bd49dad91..9a26833ec3 100644 --- a/handlers/search.go +++ b/handlers/search.go @@ -4,16 +4,17 @@ import ( "database/sql" "encoding/hex" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" "regexp" "strconv" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/mux" "github.com/lib/pq" ) diff --git a/handlers/slot.go b/handlers/slot.go index 82004c9b70..0e0f1133c6 100644 --- a/handlers/slot.go +++ b/handlers/slot.go @@ -4,11 +4,6 @@ import ( "database/sql" "encoding/hex" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math" @@ -18,6 +13,12 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/juliangruber/go-intersect" "github.com/lib/pq" diff --git a/handlers/slot_finder.go b/handlers/slot_finder.go index 404b5102dc..3281bb3f78 100644 --- a/handlers/slot_finder.go +++ b/handlers/slot_finder.go @@ -1,8 +1,9 @@ package handlers import ( - "eth2-exporter/templates" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/templates" ) // Will return the slot finder page diff --git a/handlers/slots.go b/handlers/slots.go index 4b32dd370f..f5a5f09c6a 100644 --- a/handlers/slots.go +++ b/handlers/slots.go @@ -3,11 +3,6 @@ package handlers import ( "context" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "net/http" @@ -15,6 +10,12 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/lib/pq" ) diff --git a/handlers/stakingServices.go b/handlers/stakingServices.go index 757a3f0aaa..f7170e2335 100644 --- a/handlers/stakingServices.go +++ b/handlers/stakingServices.go @@ -1,10 +1,11 @@ package handlers import ( - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) func StakingServices(w http.ResponseWriter, r *http.Request) { diff --git a/handlers/stripe.go b/handlers/stripe.go index 3059cc6006..a118439feb 100644 --- a/handlers/stripe.go +++ b/handlers/stripe.go @@ -4,16 +4,17 @@ import ( "bytes" "database/sql" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/mail" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "io" "net/http" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/mail" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/sirupsen/logrus" "github.com/stripe/stripe-go/v72" portalsession "github.com/stripe/stripe-go/v72/billingportal/session" diff --git a/handlers/unitConverter.go b/handlers/unitConverter.go index 9dee44b099..e5f16eba81 100644 --- a/handlers/unitConverter.go +++ b/handlers/unitConverter.go @@ -1,8 +1,9 @@ package handlers import ( - "eth2-exporter/templates" "net/http" + + "github.com/gobitfly/eth2-beaconchain-explorer/templates" ) // UnitConverter renders unitConverter template diff --git a/handlers/user.go b/handlers/user.go index bb6ca2010f..25ebb1587f 100644 --- a/handlers/user.go +++ b/handlers/user.go @@ -4,13 +4,6 @@ import ( "database/sql" "encoding/hex" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/mail" - "eth2-exporter/ratelimit" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "io" @@ -20,6 +13,14 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/mail" + "github.com/gobitfly/eth2-beaconchain-explorer/ratelimit" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + ctxt "context" "github.com/gorilla/context" diff --git a/handlers/validator.go b/handlers/validator.go index f988f542b0..a10db320e3 100644 --- a/handlers/validator.go +++ b/handlers/validator.go @@ -5,11 +5,6 @@ import ( "database/sql" "encoding/hex" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math" @@ -19,6 +14,12 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/crypto" "github.com/lib/pq" diff --git a/handlers/validatorRewards.go b/handlers/validatorRewards.go index b7c630296a..90a8503f76 100644 --- a/handlers/validatorRewards.go +++ b/handlers/validatorRewards.go @@ -2,11 +2,6 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "net/http" @@ -15,6 +10,12 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gorilla/csrf" ) diff --git a/handlers/validators.go b/handlers/validators.go index 1faf52e176..0598374676 100644 --- a/handlers/validators.go +++ b/handlers/validators.go @@ -2,18 +2,19 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/price" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html" "net/http" "regexp" "strconv" "strings" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) type states struct { diff --git a/handlers/validators_leaderboard.go b/handlers/validators_leaderboard.go index bdcdf85a68..8d6274543b 100644 --- a/handlers/validators_leaderboard.go +++ b/handlers/validators_leaderboard.go @@ -2,14 +2,15 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" "strconv" "strings" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // ValidatorsLeaderboard returns the validator-leaderboard using a go template diff --git a/handlers/validators_slashings.go b/handlers/validators_slashings.go index c3c36797e2..067859e968 100644 --- a/handlers/validators_slashings.go +++ b/handlers/validators_slashings.go @@ -2,13 +2,14 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "net/http" "strconv" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/juliangruber/go-intersect" ) diff --git a/handlers/vis.go b/handlers/vis.go index a21364dc4c..3f7b58d223 100644 --- a/handlers/vis.go +++ b/handlers/vis.go @@ -2,15 +2,16 @@ package handlers import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math" "net/http" "strconv" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) // Vis returns the visualizations using a go template diff --git a/handlers/withdrawals.go b/handlers/withdrawals.go index 01ac65a6ca..791ad0e270 100644 --- a/handlers/withdrawals.go +++ b/handlers/withdrawals.go @@ -3,11 +3,6 @@ package handlers import ( "context" "encoding/json" - "eth2-exporter/db" - "eth2-exporter/services" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math/big" @@ -16,6 +11,12 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/services" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "golang.org/x/sync/errgroup" ) diff --git a/mail/mail.go b/mail/mail.go index 65fec7b244..5374a59f2b 100644 --- a/mail/mail.go +++ b/mail/mail.go @@ -3,14 +3,15 @@ package mail import ( "bytes" "context" - "eth2-exporter/db" - "eth2-exporter/templates" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/smtp" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/templates" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/mailgun/mailgun-go/v4" "github.com/sirupsen/logrus" ) diff --git a/metrics/metrics.go b/metrics/metrics.go index 8577fe18c0..c21e5e42f8 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -2,8 +2,6 @@ package metrics import ( "database/sql" - "eth2-exporter/utils" - "eth2-exporter/version" "net/http" "net/http/pprof" "regexp" @@ -11,6 +9,9 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" + "github.com/gorilla/mux" "github.com/jmoiron/sqlx" "github.com/prometheus/client_golang/prometheus" diff --git a/notify/firebase.go b/notify/firebase.go index a2b4eab708..509cda0d64 100644 --- a/notify/firebase.go +++ b/notify/firebase.go @@ -2,10 +2,11 @@ package notify import ( "context" - "eth2-exporter/utils" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + firebase "firebase.google.com/go" "firebase.google.com/go/messaging" "github.com/sirupsen/logrus" diff --git a/price/price.go b/price/price.go index 20a4b585af..699bc74cab 100644 --- a/price/price.go +++ b/price/price.go @@ -2,13 +2,14 @@ package price import ( "context" - "eth2-exporter/contracts/chainlink_feed" "fmt" "strings" "sync" "sync/atomic" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/contracts/chainlink_feed" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" diff --git a/ratelimit/ratelimit.go b/ratelimit/ratelimit.go index b42bb45fde..8348c4532d 100644 --- a/ratelimit/ratelimit.go +++ b/ratelimit/ratelimit.go @@ -3,9 +3,6 @@ package ratelimit import ( "context" "database/sql" - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/utils" "fmt" "net" "net/http" @@ -15,6 +12,10 @@ import ( "sync/atomic" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/go-redis/redis/v8" "github.com/gorilla/mux" "github.com/sirupsen/logrus" diff --git a/rpc/erigon.go b/rpc/erigon.go index c00902e08c..0257790a8b 100644 --- a/rpc/erigon.go +++ b/rpc/erigon.go @@ -3,15 +3,16 @@ package rpc import ( "context" "encoding/hex" - "eth2-exporter/contracts/oneinchoracle" - "eth2-exporter/erc20" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "math/big" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/contracts/oneinchoracle" + "github.com/gobitfly/eth2-beaconchain-explorer/erc20" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/davecgh/go-spew/spew" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/rpc/geth.go b/rpc/geth.go index 2bb1145ccc..0a43234525 100644 --- a/rpc/geth.go +++ b/rpc/geth.go @@ -3,14 +3,15 @@ package rpc import ( "context" "encoding/hex" - "eth2-exporter/contracts/oneinchoracle" - "eth2-exporter/erc20" - "eth2-exporter/types" "fmt" "math/big" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/contracts/oneinchoracle" + "github.com/gobitfly/eth2-beaconchain-explorer/erc20" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/rpc/interfaces.go b/rpc/interfaces.go index 7417d85a68..de5c6d68a0 100644 --- a/rpc/interfaces.go +++ b/rpc/interfaces.go @@ -1,9 +1,10 @@ package rpc import ( - "eth2-exporter/types" "math/big" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/sirupsen/logrus" ) diff --git a/rpc/lighthouse.go b/rpc/lighthouse.go index 3183f7d43d..313b45786d 100644 --- a/rpc/lighthouse.go +++ b/rpc/lighthouse.go @@ -5,8 +5,6 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "io" "math" @@ -17,6 +15,9 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/donovanhide/eventsource" gtypes "github.com/ethereum/go-ethereum/core/types" "golang.org/x/sync/errgroup" diff --git a/services/charts_updater.go b/services/charts_updater.go index 1e6da9127e..3dbacffadb 100644 --- a/services/charts_updater.go +++ b/services/charts_updater.go @@ -1,12 +1,6 @@ package services import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/rpc" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "hash/fnv" "html/template" @@ -15,6 +9,13 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/rpc" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/aybabtme/uniplot/histogram" ) diff --git a/services/configuration.go b/services/configuration.go index cf1fbff4bb..566e80e8e4 100644 --- a/services/configuration.go +++ b/services/configuration.go @@ -1,9 +1,10 @@ package services import ( - "eth2-exporter/db" - "eth2-exporter/types" "fmt" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" ) const ( diff --git a/services/execution_layer.go b/services/execution_layer.go index 53833b4f62..30c87d617e 100644 --- a/services/execution_layer.go +++ b/services/execution_layer.go @@ -1,12 +1,13 @@ package services import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/utils" "fmt" "sync" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) const latestBlockNumberCacheKey = "latestEth1BlockNumber" diff --git a/services/gitcoin_feed_updater.go b/services/gitcoin_feed_updater.go index eb980b8518..83d4fdcf27 100644 --- a/services/gitcoin_feed_updater.go +++ b/services/gitcoin_feed_updater.go @@ -2,10 +2,11 @@ package services import ( "encoding/json" - "eth2-exporter/utils" "net/http" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "sync" ) diff --git a/services/historic_prices.go b/services/historic_prices.go index ae8a312164..bac2e71803 100644 --- a/services/historic_prices.go +++ b/services/historic_prices.go @@ -2,13 +2,14 @@ package services import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/metrics" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "net/http" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) func StartHistoricPriceService() { diff --git a/services/monitoring.go b/services/monitoring.go index b678a0034e..a8c3bde977 100644 --- a/services/monitoring.go +++ b/services/monitoring.go @@ -3,14 +3,15 @@ package services import ( "context" "database/sql" - "eth2-exporter/db" - "eth2-exporter/utils" "fmt" "net/http" "strings" "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/go-redis/redis/v8" ) diff --git a/services/notifications.go b/services/notifications.go index 79dff9809e..5cac8a26b6 100644 --- a/services/notifications.go +++ b/services/notifications.go @@ -9,13 +9,6 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/db" - ethclients "eth2-exporter/ethClients" - "eth2-exporter/mail" - "eth2-exporter/metrics" - "eth2-exporter/notify" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html" "html/template" @@ -27,6 +20,14 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + ethclients "github.com/gobitfly/eth2-beaconchain-explorer/ethClients" + "github.com/gobitfly/eth2-beaconchain-explorer/mail" + "github.com/gobitfly/eth2-beaconchain-explorer/metrics" + "github.com/gobitfly/eth2-beaconchain-explorer/notify" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + gcp_bigtable "cloud.google.com/go/bigtable" "firebase.google.com/go/messaging" "github.com/ethereum/go-ethereum/common" diff --git a/services/pubkeyCache.go b/services/pubkeyCache.go index d93f1e7606..e5cce3c36e 100644 --- a/services/pubkeyCache.go +++ b/services/pubkeyCache.go @@ -1,11 +1,12 @@ package services import ( - "eth2-exporter/db" "fmt" "os" "strconv" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/syndtr/goleveldb/leveldb" ) diff --git a/services/rewards.go b/services/rewards.go index 2250d2da88..62708a9e94 100644 --- a/services/rewards.go +++ b/services/rewards.go @@ -2,14 +2,15 @@ package services import ( "bytes" - "eth2-exporter/db" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "sort" "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/jung-kurt/gofpdf" "github.com/lib/pq" "golang.org/x/text/language" diff --git a/services/services.go b/services/services.go index d3377bbda3..56fd372b15 100644 --- a/services/services.go +++ b/services/services.go @@ -4,12 +4,6 @@ import ( "database/sql" "encoding/hex" "encoding/json" - "eth2-exporter/cache" - "eth2-exporter/db" - ethclients "eth2-exporter/ethClients" - "eth2-exporter/price" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "html/template" "math" @@ -19,6 +13,13 @@ import ( "sync" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + ethclients "github.com/gobitfly/eth2-beaconchain-explorer/ethClients" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + itypes "github.com/gobitfly/eth-rewards/types" "github.com/shopspring/decimal" diff --git a/services/stats.go b/services/stats.go index 760390461d..6c0b30092b 100644 --- a/services/stats.go +++ b/services/stats.go @@ -1,13 +1,14 @@ package services import ( - "eth2-exporter/cache" - "eth2-exporter/db" - "eth2-exporter/types" - "eth2-exporter/utils" "fmt" "sync" "time" + + "github.com/gobitfly/eth2-beaconchain-explorer/cache" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" ) func statsUpdater(wg *sync.WaitGroup) { diff --git a/services/status.go b/services/status.go index ab7cd969bf..915557086e 100644 --- a/services/status.go +++ b/services/status.go @@ -2,10 +2,11 @@ package services import ( "encoding/json" - "eth2-exporter/db" - "eth2-exporter/utils" - "eth2-exporter/version" "os" + + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/version" ) // Report the status of a particular service, will add current Pid and executable name diff --git a/templates/templates.go b/templates/templates.go index a8621f9d11..8795641aaa 100644 --- a/templates/templates.go +++ b/templates/templates.go @@ -2,7 +2,6 @@ package templates import ( "embed" - "eth2-exporter/utils" "fmt" "html/template" "io/fs" @@ -10,6 +9,8 @@ import ( "strings" "sync" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/sirupsen/logrus" ) diff --git a/userService/stripe_email_updater.go b/userService/stripe_email_updater.go index fcff5e2355..28e4832251 100644 --- a/userService/stripe_email_updater.go +++ b/userService/stripe_email_updater.go @@ -2,14 +2,15 @@ package userService import ( "bytes" - "eth2-exporter/db" - "eth2-exporter/utils" "fmt" "io" "net/http" "net/url" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/lib/pq" ) diff --git a/utils/eth1.go b/utils/eth1.go index 4118bb8ff1..3e3b736c6c 100644 --- a/utils/eth1.go +++ b/utils/eth1.go @@ -4,12 +4,13 @@ import ( "bytes" "encoding/base64" "encoding/hex" - "eth2-exporter/types" "fmt" "html/template" "math/big" "strings" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/shopspring/decimal" diff --git a/utils/eth_test.go b/utils/eth_test.go index 2491630c7f..853e7ddf22 100644 --- a/utils/eth_test.go +++ b/utils/eth_test.go @@ -2,9 +2,10 @@ package utils import ( "encoding/json" - "eth2-exporter/types" "testing" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + capella "github.com/attestantio/go-eth2-client/spec/capella" "github.com/attestantio/go-eth2-client/spec/phase0" ) diff --git a/utils/format.go b/utils/format.go index 42c009f086..3c53ec12ad 100644 --- a/utils/format.go +++ b/utils/format.go @@ -5,8 +5,6 @@ import ( "database/sql" "encoding/base64" "encoding/hex" - "eth2-exporter/price" - "eth2-exporter/types" "fmt" "html" "html/template" @@ -18,6 +16,9 @@ import ( "strings" "time" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "github.com/prysmaticlabs/go-bitfield" "github.com/shopspring/decimal" "github.com/sirupsen/logrus" diff --git a/utils/utils.go b/utils/utils.go index 626dd80bc4..37b56058ec 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -11,9 +11,6 @@ import ( "encoding/hex" "encoding/json" "errors" - "eth2-exporter/config" - "eth2-exporter/price" - "eth2-exporter/types" "fmt" "html/template" "image/color" @@ -34,6 +31,10 @@ import ( "time" "unicode/utf8" + "github.com/gobitfly/eth2-beaconchain-explorer/config" + "github.com/gobitfly/eth2-beaconchain-explorer/price" + "github.com/gobitfly/eth2-beaconchain-explorer/types" + "golang.org/x/text/cases" "golang.org/x/text/language" "golang.org/x/text/message"