From da844b0b8347cca5b3b4cc267c500711cb385648 Mon Sep 17 00:00:00 2001 From: Ian Norden Date: Wed, 29 Jan 2020 13:00:07 -0600 Subject: [PATCH] reorg pkg/ to prepare to support chains other than ethereumm --- cmd/coldImport.go | 6 ++--- cmd/contractWatcher.go | 4 ++-- cmd/fullSync.go | 8 +++---- cmd/headerSync.go | 8 +++---- cmd/root.go | 2 +- cmd/streamEthSubscribe.go | 2 +- integration_test/contract_test.go | 2 +- .../contract_watcher_full_transformer_test.go | 14 ++++++------ ...ct_watcher_header_sync_transformer_test.go | 14 ++++++------ integration_test/geth_blockchain_test.go | 6 ++--- integration_test/poller_test.go | 14 ++++++------ libraries/shared/chunker/log_chunker.go | 2 +- libraries/shared/chunker/log_chunker_test.go | 2 +- libraries/shared/factories/event/converter.go | 4 ++-- .../shared/factories/event/repository.go | 2 +- .../shared/factories/event/repository_test.go | 6 ++--- .../shared/factories/event/transformer.go | 4 ++-- .../factories/event/transformer_test.go | 4 ++-- .../shared/factories/storage/keys_loader.go | 2 +- .../shared/factories/storage/keys_lookup.go | 2 +- .../factories/storage/keys_lookup_test.go | 2 +- .../shared/factories/storage/repository.go | 2 +- .../shared/factories/storage/transformer.go | 2 +- .../factories/storage/transformer_test.go | 2 +- .../fetcher/csv_tail_storage_fetcher_test.go | 2 +- .../fetcher/geth_rpc_storage_fetcher_test.go | 2 +- libraries/shared/fetcher/log_fetcher.go | 2 +- libraries/shared/fetcher/log_fetcher_test.go | 4 ++-- libraries/shared/logs/delegator.go | 4 ++-- libraries/shared/logs/delegator_test.go | 4 ++-- libraries/shared/logs/extractor.go | 4 ++-- libraries/shared/logs/extractor_test.go | 4 ++-- libraries/shared/mocks/event_converter.go | 4 ++-- libraries/shared/mocks/event_repository.go | 2 +- libraries/shared/mocks/event_transformer.go | 6 ++--- libraries/shared/mocks/log_fetcher.go | 2 +- libraries/shared/mocks/storage_keys_loader.go | 2 +- libraries/shared/mocks/storage_keys_lookup.go | 2 +- libraries/shared/mocks/storage_repository.go | 2 +- libraries/shared/mocks/storage_transformer.go | 2 +- .../shared/repository/address_repository.go | 2 +- .../repository/address_repository_test.go | 4 ++-- libraries/shared/storage/storage_queue.go | 2 +- .../shared/storage/storage_queue_test.go | 4 ++-- libraries/shared/storage/utils/diff_test.go | 2 +- .../shared/streamer/statediff_streamer.go | 2 +- .../streamer/statediff_streamer_test.go | 2 +- .../shared/streamer/super_node_streamer.go | 2 +- libraries/shared/test_data/test_helpers.go | 6 ++--- libraries/shared/transactions/syncer.go | 8 +++---- libraries/shared/transactions/syncer_test.go | 4 ++-- .../transformer/contract_transformer.go | 4 ++-- .../shared/transformer/event_transformer.go | 4 ++-- .../shared/transformer/storage_transformer.go | 2 +- .../transformer/super_node_transformer.go | 4 ++-- libraries/shared/watcher/contract_watcher.go | 4 ++-- libraries/shared/watcher/event_watcher.go | 6 ++--- .../shared/watcher/event_watcher_test.go | 2 +- libraries/shared/watcher/storage_watcher.go | 6 ++--- .../shared/watcher/storage_watcher_test.go | 4 ++-- pkg/eth/blockchain.go | 2 +- pkg/eth/blockchain_test.go | 4 ++-- pkg/eth/cold_import/importer.go | 4 ++-- pkg/eth/cold_import/importer_test.go | 4 ++-- pkg/eth/cold_import/node_builder.go | 4 ++-- pkg/eth/cold_import/node_builder_test.go | 2 +- .../full/converter/converter.go | 8 +++---- .../full/converter/converter_suite_test.go | 0 .../full/converter/converter_test.go | 10 ++++----- .../full/retriever/block_retriever.go | 2 +- .../full/retriever/block_retriever_test.go | 12 +++++----- .../full/retriever/retriever_suite_test.go | 0 .../full/transformer/transformer.go | 22 +++++++++---------- .../transformer/transformer_suite_test.go | 0 .../full/transformer/transformer_test.go | 16 +++++++------- .../header/converter/converter.go | 4 ++-- .../header/converter/converter_suite_test.go | 0 .../header/converter/converter_test.go | 10 ++++----- .../header/fetcher/fetcher.go | 2 +- .../header/fetcher/fetcher_suite_test.go | 0 .../header/fetcher/fetcher_test.go | 6 ++--- .../header/repository/header_repository.go | 4 ++-- .../repository/header_repository_test.go | 12 +++++----- .../repository/repository_suite_test.go | 0 .../header/retriever/block_retriever.go | 2 +- .../header/retriever/block_retriever_test.go | 10 ++++----- .../header/retriever/retriever_suite_test.go | 0 .../header/transformer/transformer.go | 22 +++++++++---------- .../transformer/transformer_suite_test.go | 0 .../header/transformer/transformer_test.go | 14 ++++++------ .../shared/constants/constants.go | 6 ++--- .../shared/constants/interface.go | 0 .../shared/contract/contract.go | 6 ++--- .../shared/contract/contract_suite_test.go | 0 .../shared/contract/contract_test.go | 8 +++---- .../shared/fetcher/fetcher.go | 2 +- .../shared/getter/getter_suite_test.go | 0 .../shared/getter/getter_test.go | 4 ++-- .../shared/getter/interface_getter.go | 6 ++--- .../shared/helpers/helpers.go | 2 +- .../shared/helpers/test_helpers/database.go | 12 +++++----- .../helpers/test_helpers/mocks/entities.go | 6 ++--- .../helpers/test_helpers/mocks/parser.go | 4 ++-- .../shared/helpers/test_helpers/test_data.go | 2 +- .../contract_watcher/shared/parser/parser.go | 4 ++-- .../shared/parser/parser_suite_test.go | 0 .../shared/parser/parser_test.go | 8 +++---- .../contract_watcher/shared/poller/poller.go | 10 ++++----- .../shared/repository/event_repository.go | 4 ++-- .../repository/event_repository_test.go | 22 +++++++++---------- .../shared/repository/method_repository.go | 4 ++-- .../repository/method_repository_test.go | 12 +++++----- .../repository/repository_suite_test.go | 0 .../shared/retriever/address_retriever.go | 6 ++--- .../retriever/address_retriever_test.go | 18 +++++++-------- .../shared/retriever/retriever_suite_test.go | 0 .../contract_watcher/shared/types/event.go | 0 .../contract_watcher/shared/types/method.go | 0 .../contract_watcher/shared/types/mode.go | 0 .../cold_db/transaction_converter.go | 2 +- pkg/eth/converters/common/block_converter.go | 2 +- .../converters/common/block_converter_test.go | 2 +- pkg/eth/converters/common/block_rewards.go | 2 +- .../common/full_sync_log_converter.go | 2 +- .../common/full_sync_log_converter_test.go | 2 +- pkg/eth/converters/common/header_converter.go | 2 +- .../common/header_converter_test.go | 2 +- .../converters/common/receipt_converter.go | 2 +- .../common/receipt_converter_test.go | 2 +- .../common/transaction_converter.go | 2 +- .../converters/rpc/transaction_converter.go | 2 +- .../rpc/transaction_converter_test.go | 4 ++-- pkg/{ => eth}/core/block.go | 0 pkg/{ => eth}/core/blockchain.go | 0 pkg/{ => eth}/core/contract.go | 0 pkg/{ => eth}/core/eth_client.go | 0 pkg/{ => eth}/core/header.go | 0 pkg/{ => eth}/core/log.go | 0 pkg/{ => eth}/core/node_info.go | 0 pkg/{ => eth}/core/receipts.go | 0 pkg/{ => eth}/core/rpc_client.go | 0 pkg/{ => eth}/core/topics.go | 0 pkg/{ => eth}/core/transaction.go | 0 pkg/{ => eth}/core/uncle.go | 0 pkg/{ => eth}/core/watched_event_log.go | 0 pkg/{ => eth}/crypto/crypto_suite_test.go | 0 pkg/{ => eth}/crypto/parser.go | 0 pkg/{ => eth}/crypto/parser_test.go | 2 +- pkg/{ => eth}/datastore/errors.go | 0 pkg/{ => eth}/datastore/ethereum/config.go | 0 pkg/{ => eth}/datastore/ethereum/database.go | 2 +- .../datastore/ethereum/level/database.go | 0 .../ethereum/level/database_reader.go | 0 .../datastore/ethereum/level/database_test.go | 4 ++-- .../ethereum/level/level_suite_test.go | 0 pkg/{ => eth}/datastore/postgres/errors.go | 0 pkg/{ => eth}/datastore/postgres/postgres.go | 2 +- .../datastore/postgres/postgres_suite_test.go | 0 .../datastore/postgres/postgres_test.go | 6 ++--- .../postgres/repositories/block_repository.go | 6 ++--- .../repositories/block_repository_test.go | 10 ++++----- .../checked_headers_repository.go | 4 ++-- .../checked_headers_repository_test.go | 10 ++++----- .../repositories/checked_logs_repository.go | 2 +- .../checked_logs_repository_test.go | 8 +++---- .../repositories/contract_repository.go | 6 ++--- .../repositories/contract_repository_test.go | 8 +++---- .../repositories/full_sync_log_repository.go | 4 ++-- .../full_sync_log_repository_test.go | 10 ++++----- .../full_sync_receipt_repository.go | 6 ++--- .../full_sync_receipt_repository_test.go | 10 ++++----- .../repositories/header_repository.go | 4 ++-- .../repositories/header_repository_test.go | 6 ++--- .../header_sync_log_repository.go | 4 ++-- .../header_sync_log_repository_test.go | 8 +++---- .../header_sync_receipt_repository.go | 2 +- .../header_sync_receipt_repository_test.go | 6 ++--- .../repositories/log_filter_repository.go | 6 ++--- .../log_filter_repository_test.go | 10 ++++----- .../repositories/repositories_suite_test.go | 0 .../repositories/storage_diff_repository.go | 2 +- .../storage_diff_repository_test.go | 4 ++-- .../repositories/watched_events_repository.go | 4 ++-- .../watched_events_repository_test.go | 10 ++++----- pkg/{ => eth}/datastore/repository.go | 4 ++-- .../fakes/checked_logs_repository.go | 0 pkg/{ => eth}/fakes/data.go | 2 +- pkg/{ => eth}/fakes/mock_block_repository.go | 2 +- pkg/{ => eth}/fakes/mock_blockchain.go | 2 +- .../fakes/mock_checked_headers_repository.go | 2 +- pkg/{ => eth}/fakes/mock_crypto_parser.go | 0 pkg/{ => eth}/fakes/mock_eth_client.go | 0 pkg/{ => eth}/fakes/mock_ethereum_database.go | 0 pkg/{ => eth}/fakes/mock_filter_repository.go | 2 +- pkg/{ => eth}/fakes/mock_fs_reader.go | 0 .../fakes/mock_full_sync_block_retriever.go | 0 pkg/{ => eth}/fakes/mock_header_repository.go | 2 +- .../fakes/mock_header_sync_block_retriever.go | 0 .../mock_header_sync_header_repository.go | 2 +- .../fakes/mock_header_sync_log_repository.go | 2 +- .../fakes/mock_level_database_reader.go | 0 pkg/{ => eth}/fakes/mock_parser.go | 2 +- pkg/{ => eth}/fakes/mock_poller.go | 2 +- .../fakes/mock_receipt_repository.go | 2 +- pkg/{ => eth}/fakes/mock_rpc_client.go | 2 +- .../fakes/mock_storage_diff_repository.go | 0 pkg/{ => eth}/fakes/mock_tailer.go | 0 .../fakes/mock_transaction_converter.go | 2 +- .../fakes/mock_transaction_syncer.go | 0 pkg/{ => eth}/filters/filter_query.go | 2 +- pkg/{ => eth}/filters/filter_test.go | 4 ++-- .../filters/query_builder_suite_test.go | 0 pkg/{ => eth}/history/block_validator.go | 4 ++-- pkg/{ => eth}/history/block_validator_test.go | 4 ++-- pkg/{ => eth}/history/header_validator.go | 4 ++-- .../history/header_validator_test.go | 4 ++-- pkg/{ => eth}/history/history_suite_test.go | 0 pkg/{ => eth}/history/populate_blocks.go | 4 ++-- pkg/{ => eth}/history/populate_blocks_test.go | 4 ++-- pkg/{ => eth}/history/populate_headers.go | 6 ++--- .../history/populate_headers_test.go | 4 ++-- pkg/{ => eth}/history/validation_window.go | 2 +- .../history/validation_window_test.go | 4 ++-- pkg/eth/node/node.go | 2 +- pkg/eth/node/node_test.go | 4 ++-- pkg/eth/testing/helpers.go | 2 +- pkg/super_node/api.go | 2 +- pkg/super_node/config/config.go | 4 ++-- pkg/super_node/constructors.go | 4 ++-- pkg/super_node/eth/backend.go | 2 +- pkg/super_node/eth/indexer.go | 2 +- pkg/super_node/eth/indexer_test.go | 2 +- pkg/super_node/eth/mocks/retriever.go | 2 +- pkg/super_node/eth/retriever.go | 2 +- pkg/super_node/eth/retriever_test.go | 2 +- pkg/super_node/eth/streamer.go | 2 +- pkg/super_node/eth/test_helpers.go | 4 ++-- pkg/super_node/service.go | 4 ++-- test_config/test_config.go | 6 ++--- utils/utils.go | 4 ++-- 240 files changed, 440 insertions(+), 440 deletions(-) rename pkg/{ => eth}/contract_watcher/full/converter/converter.go (92%) rename pkg/{ => eth}/contract_watcher/full/converter/converter_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/full/converter/converter_test.go (89%) rename pkg/{ => eth}/contract_watcher/full/retriever/block_retriever.go (98%) rename pkg/{ => eth}/contract_watcher/full/retriever/block_retriever_test.go (95%) rename pkg/{ => eth}/contract_watcher/full/retriever/retriever_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/full/transformer/transformer.go (91%) rename pkg/{ => eth}/contract_watcher/full/transformer/transformer_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/full/transformer/transformer_test.go (82%) rename pkg/{ => eth}/contract_watcher/header/converter/converter.go (98%) rename pkg/{ => eth}/contract_watcher/header/converter/converter_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/header/converter/converter_test.go (94%) rename pkg/{ => eth}/contract_watcher/header/fetcher/fetcher.go (97%) rename pkg/{ => eth}/contract_watcher/header/fetcher/fetcher_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/header/fetcher/fetcher_test.go (92%) rename pkg/{ => eth}/contract_watcher/header/repository/header_repository.go (98%) rename pkg/{ => eth}/contract_watcher/header/repository/header_repository_test.go (96%) rename pkg/{ => eth}/contract_watcher/header/repository/repository_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/header/retriever/block_retriever.go (96%) rename pkg/{ => eth}/contract_watcher/header/retriever/block_retriever_test.go (86%) rename pkg/{ => eth}/contract_watcher/header/retriever/retriever_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/header/transformer/transformer.go (94%) rename pkg/{ => eth}/contract_watcher/header/transformer/transformer_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/header/transformer/transformer_test.go (88%) rename pkg/{ => eth}/contract_watcher/shared/constants/constants.go (99%) rename pkg/{ => eth}/contract_watcher/shared/constants/interface.go (100%) rename pkg/{ => eth}/contract_watcher/shared/contract/contract.go (97%) rename pkg/{ => eth}/contract_watcher/shared/contract/contract_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/shared/contract/contract_test.go (95%) rename pkg/{ => eth}/contract_watcher/shared/fetcher/fetcher.go (98%) rename pkg/{ => eth}/contract_watcher/shared/getter/getter_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/shared/getter/getter_test.go (93%) rename pkg/{ => eth}/contract_watcher/shared/getter/interface_getter.go (95%) rename pkg/{ => eth}/contract_watcher/shared/helpers/helpers.go (97%) rename pkg/{ => eth}/contract_watcher/shared/helpers/test_helpers/database.go (95%) rename pkg/{ => eth}/contract_watcher/shared/helpers/test_helpers/mocks/entities.go (98%) rename pkg/{ => eth}/contract_watcher/shared/helpers/test_helpers/mocks/parser.go (96%) rename pkg/{ => eth}/contract_watcher/shared/helpers/test_helpers/test_data.go (96%) rename pkg/{ => eth}/contract_watcher/shared/parser/parser.go (97%) rename pkg/{ => eth}/contract_watcher/shared/parser/parser_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/shared/parser/parser_test.go (95%) rename pkg/{ => eth}/contract_watcher/shared/poller/poller.go (96%) rename pkg/{ => eth}/contract_watcher/shared/repository/event_repository.go (98%) rename pkg/{ => eth}/contract_watcher/shared/repository/event_repository_test.go (93%) rename pkg/{ => eth}/contract_watcher/shared/repository/method_repository.go (98%) rename pkg/{ => eth}/contract_watcher/shared/repository/method_repository_test.go (94%) rename pkg/{ => eth}/contract_watcher/shared/repository/repository_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/shared/retriever/address_retriever.go (94%) rename pkg/{ => eth}/contract_watcher/shared/retriever/address_retriever_test.go (84%) rename pkg/{ => eth}/contract_watcher/shared/retriever/retriever_suite_test.go (100%) rename pkg/{ => eth}/contract_watcher/shared/types/event.go (100%) rename pkg/{ => eth}/contract_watcher/shared/types/method.go (100%) rename pkg/{ => eth}/contract_watcher/shared/types/mode.go (100%) rename pkg/{ => eth}/core/block.go (100%) rename pkg/{ => eth}/core/blockchain.go (100%) rename pkg/{ => eth}/core/contract.go (100%) rename pkg/{ => eth}/core/eth_client.go (100%) rename pkg/{ => eth}/core/header.go (100%) rename pkg/{ => eth}/core/log.go (100%) rename pkg/{ => eth}/core/node_info.go (100%) rename pkg/{ => eth}/core/receipts.go (100%) rename pkg/{ => eth}/core/rpc_client.go (100%) rename pkg/{ => eth}/core/topics.go (100%) rename pkg/{ => eth}/core/transaction.go (100%) rename pkg/{ => eth}/core/uncle.go (100%) rename pkg/{ => eth}/core/watched_event_log.go (100%) rename pkg/{ => eth}/crypto/crypto_suite_test.go (100%) rename pkg/{ => eth}/crypto/parser.go (100%) rename pkg/{ => eth}/crypto/parser_test.go (96%) rename pkg/{ => eth}/datastore/errors.go (100%) rename pkg/{ => eth}/datastore/ethereum/config.go (100%) rename pkg/{ => eth}/datastore/ethereum/database.go (95%) rename pkg/{ => eth}/datastore/ethereum/level/database.go (100%) rename pkg/{ => eth}/datastore/ethereum/level/database_reader.go (100%) rename pkg/{ => eth}/datastore/ethereum/level/database_test.go (96%) rename pkg/{ => eth}/datastore/ethereum/level/level_suite_test.go (100%) rename pkg/{ => eth}/datastore/postgres/errors.go (100%) rename pkg/{ => eth}/datastore/postgres/postgres.go (97%) rename pkg/{ => eth}/datastore/postgres/postgres_suite_test.go (100%) rename pkg/{ => eth}/datastore/postgres/postgres_test.go (96%) rename pkg/{ => eth}/datastore/postgres/repositories/block_repository.go (98%) rename pkg/{ => eth}/datastore/postgres/repositories/block_repository_test.go (98%) rename pkg/{ => eth}/datastore/postgres/repositories/checked_headers_repository.go (95%) rename pkg/{ => eth}/datastore/postgres/repositories/checked_headers_repository_test.go (97%) rename pkg/{ => eth}/datastore/postgres/repositories/checked_logs_repository.go (97%) rename pkg/{ => eth}/datastore/postgres/repositories/checked_logs_repository_test.go (95%) rename pkg/{ => eth}/datastore/postgres/repositories/contract_repository.go (94%) rename pkg/{ => eth}/datastore/postgres/repositories/contract_repository_test.go (94%) rename pkg/{ => eth}/datastore/postgres/repositories/full_sync_log_repository.go (96%) rename pkg/{ => eth}/datastore/postgres/repositories/full_sync_log_repository_test.go (96%) rename pkg/{ => eth}/datastore/postgres/repositories/full_sync_receipt_repository.go (96%) rename pkg/{ => eth}/datastore/postgres/repositories/full_sync_receipt_repository_test.go (95%) rename pkg/{ => eth}/datastore/postgres/repositories/header_repository.go (98%) rename pkg/{ => eth}/datastore/postgres/repositories/header_repository_test.go (98%) rename pkg/{ => eth}/datastore/postgres/repositories/header_sync_log_repository.go (97%) rename pkg/{ => eth}/datastore/postgres/repositories/header_sync_log_repository_test.go (96%) rename pkg/{ => eth}/datastore/postgres/repositories/header_sync_receipt_repository.go (97%) rename pkg/{ => eth}/datastore/postgres/repositories/header_sync_receipt_repository_test.go (95%) rename pkg/{ => eth}/datastore/postgres/repositories/log_filter_repository.go (93%) rename pkg/{ => eth}/datastore/postgres/repositories/log_filter_repository_test.go (93%) rename pkg/{ => eth}/datastore/postgres/repositories/repositories_suite_test.go (100%) rename pkg/{ => eth}/datastore/postgres/repositories/storage_diff_repository.go (96%) rename pkg/{ => eth}/datastore/postgres/repositories/storage_diff_repository_test.go (95%) rename pkg/{ => eth}/datastore/postgres/repositories/watched_events_repository.go (93%) rename pkg/{ => eth}/datastore/postgres/repositories/watched_events_repository_test.go (95%) rename pkg/{ => eth}/datastore/repository.go (96%) rename pkg/{ => eth}/fakes/checked_logs_repository.go (100%) rename pkg/{ => eth}/fakes/data.go (98%) rename pkg/{ => eth}/fakes/mock_block_repository.go (99%) rename pkg/{ => eth}/fakes/mock_blockchain.go (99%) rename pkg/{ => eth}/fakes/mock_checked_headers_repository.go (97%) rename pkg/{ => eth}/fakes/mock_crypto_parser.go (100%) rename pkg/{ => eth}/fakes/mock_eth_client.go (100%) rename pkg/{ => eth}/fakes/mock_ethereum_database.go (100%) rename pkg/{ => eth}/fakes/mock_filter_repository.go (94%) rename pkg/{ => eth}/fakes/mock_fs_reader.go (100%) rename pkg/{ => eth}/fakes/mock_full_sync_block_retriever.go (100%) rename pkg/{ => eth}/fakes/mock_header_repository.go (98%) rename pkg/{ => eth}/fakes/mock_header_sync_block_retriever.go (100%) rename pkg/{ => eth}/fakes/mock_header_sync_header_repository.go (95%) rename pkg/{ => eth}/fakes/mock_header_sync_log_repository.go (96%) rename pkg/{ => eth}/fakes/mock_level_database_reader.go (100%) rename pkg/{ => eth}/fakes/mock_parser.go (95%) rename pkg/{ => eth}/fakes/mock_poller.go (94%) rename pkg/{ => eth}/fakes/mock_receipt_repository.go (98%) rename pkg/{ => eth}/fakes/mock_rpc_client.go (99%) rename pkg/{ => eth}/fakes/mock_storage_diff_repository.go (100%) rename pkg/{ => eth}/fakes/mock_tailer.go (100%) rename pkg/{ => eth}/fakes/mock_transaction_converter.go (97%) rename pkg/{ => eth}/fakes/mock_transaction_syncer.go (100%) rename pkg/{ => eth}/filters/filter_query.go (97%) rename pkg/{ => eth}/filters/filter_test.go (98%) rename pkg/{ => eth}/filters/query_builder_suite_test.go (100%) rename pkg/{ => eth}/history/block_validator.go (95%) rename pkg/{ => eth}/history/block_validator_test.go (94%) rename pkg/{ => eth}/history/header_validator.go (94%) rename pkg/{ => eth}/history/header_validator_test.go (94%) rename pkg/{ => eth}/history/history_suite_test.go (100%) rename pkg/{ => eth}/history/populate_blocks.go (95%) rename pkg/{ => eth}/history/populate_blocks_test.go (96%) rename pkg/{ => eth}/history/populate_headers.go (92%) rename pkg/{ => eth}/history/populate_headers_test.go (95%) rename pkg/{ => eth}/history/validation_window.go (97%) rename pkg/{ => eth}/history/validation_window_test.go (93%) diff --git a/cmd/coldImport.go b/cmd/coldImport.go index 3e4bc79d..a98ac0b4 100644 --- a/cmd/coldImport.go +++ b/cmd/coldImport.go @@ -20,9 +20,9 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "github.com/vulcanize/vulcanizedb/pkg/crypto" - "github.com/vulcanize/vulcanizedb/pkg/datastore/ethereum" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/crypto" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/ethereum" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/pkg/eth/cold_import" "github.com/vulcanize/vulcanizedb/pkg/eth/converters/cold_db" vulcCommon "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" diff --git a/cmd/contractWatcher.go b/cmd/contractWatcher.go index b8ff58ab..ce46092e 100644 --- a/cmd/contractWatcher.go +++ b/cmd/contractWatcher.go @@ -25,8 +25,8 @@ import ( st "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" "github.com/vulcanize/vulcanizedb/pkg/config" - ft "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/transformer" - ht "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/transformer" + ft "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/transformer" + ht "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/transformer" "github.com/vulcanize/vulcanizedb/utils" ) diff --git a/cmd/fullSync.go b/cmd/fullSync.go index 783cab3f..379ba74d 100644 --- a/cmd/fullSync.go +++ b/cmd/fullSync.go @@ -22,10 +22,10 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" "github.com/vulcanize/vulcanizedb/utils" ) diff --git a/cmd/headerSync.go b/cmd/headerSync.go index d2be71a4..22b384cc 100644 --- a/cmd/headerSync.go +++ b/cmd/headerSync.go @@ -22,11 +22,11 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/pkg/eth" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" "github.com/vulcanize/vulcanizedb/utils" ) diff --git a/cmd/root.go b/cmd/root.go index 8b4698e8..3e9dc2cc 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -29,7 +29,7 @@ import ( "github.com/spf13/viper" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" "github.com/vulcanize/vulcanizedb/pkg/eth" "github.com/vulcanize/vulcanizedb/pkg/eth/client" vRpc "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" diff --git a/cmd/streamEthSubscribe.go b/cmd/streamEthSubscribe.go index 75eab893..cbc8021a 100644 --- a/cmd/streamEthSubscribe.go +++ b/cmd/streamEthSubscribe.go @@ -29,7 +29,7 @@ import ( "github.com/spf13/viper" "github.com/vulcanize/vulcanizedb/libraries/shared/streamer" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" "github.com/vulcanize/vulcanizedb/pkg/eth/client" "github.com/vulcanize/vulcanizedb/pkg/super_node" "github.com/vulcanize/vulcanizedb/pkg/super_node/config" diff --git a/integration_test/contract_test.go b/integration_test/contract_test.go index 99972456..5e423ada 100644 --- a/integration_test/contract_test.go +++ b/integration_test/contract_test.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" "github.com/vulcanize/vulcanizedb/pkg/eth" "github.com/vulcanize/vulcanizedb/pkg/eth/client" rpc2 "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" diff --git a/integration_test/contract_watcher_full_transformer_test.go b/integration_test/contract_watcher_full_transformer_test.go index 0a606c43..0f035b5d 100644 --- a/integration_test/contract_watcher_full_transformer_test.go +++ b/integration_test/contract_watcher_full_transformer_test.go @@ -27,13 +27,13 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/transformer" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/transformer" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) var _ = Describe("contractWatcher full transformer", func() { diff --git a/integration_test/contract_watcher_header_sync_transformer_test.go b/integration_test/contract_watcher_header_sync_transformer_test.go index 08030134..1c816518 100644 --- a/integration_test/contract_watcher_header_sync_transformer_test.go +++ b/integration_test/contract_watcher_header_sync_transformer_test.go @@ -25,13 +25,13 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/transformer" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/transformer" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) var _ = Describe("contractWatcher headerSync transformer", func() { diff --git a/integration_test/geth_blockchain_test.go b/integration_test/geth_blockchain_test.go index be4e1f75..a2bb6b6c 100644 --- a/integration_test/geth_blockchain_test.go +++ b/integration_test/geth_blockchain_test.go @@ -23,13 +23,13 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" "github.com/vulcanize/vulcanizedb/pkg/eth" "github.com/vulcanize/vulcanizedb/pkg/eth/client" rpc2 "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" "github.com/vulcanize/vulcanizedb/pkg/eth/node" - "github.com/vulcanize/vulcanizedb/pkg/fakes" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/integration_test/poller_test.go b/integration_test/poller_test.go index 73f69e7f..386fc837 100644 --- a/integration_test/poller_test.go +++ b/integration_test/poller_test.go @@ -23,13 +23,13 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/poller" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/poller" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) var _ = Describe("Poller", func() { diff --git a/libraries/shared/chunker/log_chunker.go b/libraries/shared/chunker/log_chunker.go index 67771ab6..e1042e8b 100644 --- a/libraries/shared/chunker/log_chunker.go +++ b/libraries/shared/chunker/log_chunker.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type Chunker interface { diff --git a/libraries/shared/chunker/log_chunker_test.go b/libraries/shared/chunker/log_chunker_test.go index 40bc78bc..011bc7ed 100644 --- a/libraries/shared/chunker/log_chunker_test.go +++ b/libraries/shared/chunker/log_chunker_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" chunk "github.com/vulcanize/vulcanizedb/libraries/shared/chunker" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) var _ = Describe("Log chunker", func() { diff --git a/libraries/shared/factories/event/converter.go b/libraries/shared/factories/event/converter.go index ba159e51..48438f5e 100644 --- a/libraries/shared/factories/event/converter.go +++ b/libraries/shared/factories/event/converter.go @@ -17,8 +17,8 @@ package event import ( - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // Converter transforms log data into general InsertionModels the Repository can persist__ diff --git a/libraries/shared/factories/event/repository.go b/libraries/shared/factories/event/repository.go index a4bb5b3e..72c039bb 100644 --- a/libraries/shared/factories/event/repository.go +++ b/libraries/shared/factories/event/repository.go @@ -24,7 +24,7 @@ import ( "github.com/vulcanize/vulcanizedb/utils" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const SetLogTransformedQuery = `UPDATE public.header_sync_logs SET transformed = true WHERE id = $1` diff --git a/libraries/shared/factories/event/repository_test.go b/libraries/shared/factories/event/repository_test.go index 10f3c0e9..436bbb1e 100644 --- a/libraries/shared/factories/event/repository_test.go +++ b/libraries/shared/factories/event/repository_test.go @@ -24,9 +24,9 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/factories/event" "github.com/vulcanize/vulcanizedb/libraries/shared/test_data" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/libraries/shared/factories/event/transformer.go b/libraries/shared/factories/event/transformer.go index d7597d65..77699b1b 100644 --- a/libraries/shared/factories/event/transformer.go +++ b/libraries/shared/factories/event/transformer.go @@ -19,8 +19,8 @@ package event import ( "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type Transformer struct { diff --git a/libraries/shared/factories/event/transformer_test.go b/libraries/shared/factories/event/transformer_test.go index dad7d138..1f799106 100644 --- a/libraries/shared/factories/event/transformer_test.go +++ b/libraries/shared/factories/event/transformer_test.go @@ -25,8 +25,8 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/mocks" "github.com/vulcanize/vulcanizedb/libraries/shared/test_data" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Transformer", func() { diff --git a/libraries/shared/factories/storage/keys_loader.go b/libraries/shared/factories/storage/keys_loader.go index 1b6efdbb..e74470e8 100644 --- a/libraries/shared/factories/storage/keys_loader.go +++ b/libraries/shared/factories/storage/keys_loader.go @@ -19,7 +19,7 @@ package storage import ( "github.com/ethereum/go-ethereum/common" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type KeysLoader interface { diff --git a/libraries/shared/factories/storage/keys_lookup.go b/libraries/shared/factories/storage/keys_lookup.go index 1c641c20..88ac3b65 100644 --- a/libraries/shared/factories/storage/keys_lookup.go +++ b/libraries/shared/factories/storage/keys_lookup.go @@ -19,7 +19,7 @@ package storage import ( "github.com/ethereum/go-ethereum/common" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type KeysLookup interface { diff --git a/libraries/shared/factories/storage/keys_lookup_test.go b/libraries/shared/factories/storage/keys_lookup_test.go index 6a77b164..cc9d7cf9 100644 --- a/libraries/shared/factories/storage/keys_lookup_test.go +++ b/libraries/shared/factories/storage/keys_lookup_test.go @@ -24,7 +24,7 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/factories/storage" "github.com/vulcanize/vulcanizedb/libraries/shared/mocks" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/libraries/shared/factories/storage/repository.go b/libraries/shared/factories/storage/repository.go index be8f7b12..68877656 100644 --- a/libraries/shared/factories/storage/repository.go +++ b/libraries/shared/factories/storage/repository.go @@ -18,7 +18,7 @@ package storage import ( "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type Repository interface { diff --git a/libraries/shared/factories/storage/transformer.go b/libraries/shared/factories/storage/transformer.go index 006c0e68..85d1cd9a 100644 --- a/libraries/shared/factories/storage/transformer.go +++ b/libraries/shared/factories/storage/transformer.go @@ -20,7 +20,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type Transformer struct { diff --git a/libraries/shared/factories/storage/transformer_test.go b/libraries/shared/factories/storage/transformer_test.go index 644d15d8..4c51d2e6 100644 --- a/libraries/shared/factories/storage/transformer_test.go +++ b/libraries/shared/factories/storage/transformer_test.go @@ -25,7 +25,7 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/factories/storage" "github.com/vulcanize/vulcanizedb/libraries/shared/mocks" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Storage transformer", func() { diff --git a/libraries/shared/fetcher/csv_tail_storage_fetcher_test.go b/libraries/shared/fetcher/csv_tail_storage_fetcher_test.go index 6a13d28b..48337308 100644 --- a/libraries/shared/fetcher/csv_tail_storage_fetcher_test.go +++ b/libraries/shared/fetcher/csv_tail_storage_fetcher_test.go @@ -27,7 +27,7 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/fetcher" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Csv Tail Storage Fetcher", func() { diff --git a/libraries/shared/fetcher/geth_rpc_storage_fetcher_test.go b/libraries/shared/fetcher/geth_rpc_storage_fetcher_test.go index 9244f38b..4e5b9d8f 100644 --- a/libraries/shared/fetcher/geth_rpc_storage_fetcher_test.go +++ b/libraries/shared/fetcher/geth_rpc_storage_fetcher_test.go @@ -27,7 +27,7 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/fetcher" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" "github.com/vulcanize/vulcanizedb/libraries/shared/test_data" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) type MockStoragediffStreamer struct { diff --git a/libraries/shared/fetcher/log_fetcher.go b/libraries/shared/fetcher/log_fetcher.go index 18c7aa0f..8c1ad2bb 100644 --- a/libraries/shared/fetcher/log_fetcher.go +++ b/libraries/shared/fetcher/log_fetcher.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type ILogFetcher interface { diff --git a/libraries/shared/fetcher/log_fetcher_test.go b/libraries/shared/fetcher/log_fetcher_test.go index 8f9b36a7..e305f981 100644 --- a/libraries/shared/fetcher/log_fetcher_test.go +++ b/libraries/shared/fetcher/log_fetcher_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/fetcher" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("LogFetcher", func() { diff --git a/libraries/shared/logs/delegator.go b/libraries/shared/logs/delegator.go index 35b31601..22b3da75 100644 --- a/libraries/shared/logs/delegator.go +++ b/libraries/shared/logs/delegator.go @@ -22,8 +22,8 @@ import ( "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/libraries/shared/chunker" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" ) var ( diff --git a/libraries/shared/logs/delegator_test.go b/libraries/shared/logs/delegator_test.go index 9a56e831..898c4918 100644 --- a/libraries/shared/logs/delegator_test.go +++ b/libraries/shared/logs/delegator_test.go @@ -27,8 +27,8 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/logs" "github.com/vulcanize/vulcanizedb/libraries/shared/mocks" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Log delegator", func() { diff --git a/libraries/shared/logs/extractor.go b/libraries/shared/logs/extractor.go index 89f5dec6..2e78c861 100644 --- a/libraries/shared/logs/extractor.go +++ b/libraries/shared/logs/extractor.go @@ -25,8 +25,8 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/fetcher" "github.com/vulcanize/vulcanizedb/libraries/shared/transactions" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" ) var ( diff --git a/libraries/shared/logs/extractor_test.go b/libraries/shared/logs/extractor_test.go index 954baf29..09971383 100644 --- a/libraries/shared/logs/extractor_test.go +++ b/libraries/shared/logs/extractor_test.go @@ -27,8 +27,8 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/logs" "github.com/vulcanize/vulcanizedb/libraries/shared/mocks" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Log extractor", func() { diff --git a/libraries/shared/mocks/event_converter.go b/libraries/shared/mocks/event_converter.go index 31b96d99..eeb65dce 100644 --- a/libraries/shared/mocks/event_converter.go +++ b/libraries/shared/mocks/event_converter.go @@ -18,8 +18,8 @@ package mocks import ( "github.com/vulcanize/vulcanizedb/libraries/shared/factories/event" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type MockConverter struct { diff --git a/libraries/shared/mocks/event_repository.go b/libraries/shared/mocks/event_repository.go index 7b6a8a45..c69c8a38 100644 --- a/libraries/shared/mocks/event_repository.go +++ b/libraries/shared/mocks/event_repository.go @@ -18,7 +18,7 @@ package mocks import ( "github.com/vulcanize/vulcanizedb/libraries/shared/factories/event" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type MockEventRepository struct { diff --git a/libraries/shared/mocks/event_transformer.go b/libraries/shared/mocks/event_transformer.go index 9a8c5e08..dc5ee4e3 100644 --- a/libraries/shared/mocks/event_transformer.go +++ b/libraries/shared/mocks/event_transformer.go @@ -18,9 +18,9 @@ package mocks import ( "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) type MockEventTransformer struct { diff --git a/libraries/shared/mocks/log_fetcher.go b/libraries/shared/mocks/log_fetcher.go index 049a1fbf..bb01fec3 100644 --- a/libraries/shared/mocks/log_fetcher.go +++ b/libraries/shared/mocks/log_fetcher.go @@ -19,7 +19,7 @@ package mocks import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockLogFetcher struct { diff --git a/libraries/shared/mocks/storage_keys_loader.go b/libraries/shared/mocks/storage_keys_loader.go index 4b2c0812..a76b9507 100644 --- a/libraries/shared/mocks/storage_keys_loader.go +++ b/libraries/shared/mocks/storage_keys_loader.go @@ -19,7 +19,7 @@ package mocks import ( "github.com/ethereum/go-ethereum/common" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type MockStorageKeysLoader struct { diff --git a/libraries/shared/mocks/storage_keys_lookup.go b/libraries/shared/mocks/storage_keys_lookup.go index 033e68c8..29b9445c 100644 --- a/libraries/shared/mocks/storage_keys_lookup.go +++ b/libraries/shared/mocks/storage_keys_lookup.go @@ -19,7 +19,7 @@ package mocks import ( "github.com/ethereum/go-ethereum/common" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type MockStorageKeysLookup struct { diff --git a/libraries/shared/mocks/storage_repository.go b/libraries/shared/mocks/storage_repository.go index acf36076..872492dd 100644 --- a/libraries/shared/mocks/storage_repository.go +++ b/libraries/shared/mocks/storage_repository.go @@ -18,7 +18,7 @@ package mocks import ( "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type MockStorageRepository struct { diff --git a/libraries/shared/mocks/storage_transformer.go b/libraries/shared/mocks/storage_transformer.go index 217d990b..d81cfdf3 100644 --- a/libraries/shared/mocks/storage_transformer.go +++ b/libraries/shared/mocks/storage_transformer.go @@ -21,7 +21,7 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // MockStorageTransformer for tests diff --git a/libraries/shared/repository/address_repository.go b/libraries/shared/repository/address_repository.go index 4b17d583..eb02ddba 100644 --- a/libraries/shared/repository/address_repository.go +++ b/libraries/shared/repository/address_repository.go @@ -33,7 +33,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/jmoiron/sqlx" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const getOrCreateAddressQuery = `WITH addressId AS ( diff --git a/libraries/shared/repository/address_repository_test.go b/libraries/shared/repository/address_repository_test.go index 7e1c8b16..bbe8b8d7 100644 --- a/libraries/shared/repository/address_repository_test.go +++ b/libraries/shared/repository/address_repository_test.go @@ -25,8 +25,8 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/repository" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/libraries/shared/storage/storage_queue.go b/libraries/shared/storage/storage_queue.go index bb83a905..4de5a818 100644 --- a/libraries/shared/storage/storage_queue.go +++ b/libraries/shared/storage/storage_queue.go @@ -18,7 +18,7 @@ package storage import ( "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type IStorageQueue interface { diff --git a/libraries/shared/storage/storage_queue_test.go b/libraries/shared/storage/storage_queue_test.go index 2978437c..076b18aa 100644 --- a/libraries/shared/storage/storage_queue_test.go +++ b/libraries/shared/storage/storage_queue_test.go @@ -22,8 +22,8 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/storage" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/libraries/shared/storage/utils/diff_test.go b/libraries/shared/storage/utils/diff_test.go index 1c530a7c..32e6b437 100644 --- a/libraries/shared/storage/utils/diff_test.go +++ b/libraries/shared/storage/utils/diff_test.go @@ -27,7 +27,7 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" "github.com/vulcanize/vulcanizedb/libraries/shared/test_data" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Storage row parsing", func() { diff --git a/libraries/shared/streamer/statediff_streamer.go b/libraries/shared/streamer/statediff_streamer.go index 458cb2b7..7ba3abea 100644 --- a/libraries/shared/streamer/statediff_streamer.go +++ b/libraries/shared/streamer/statediff_streamer.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/statediff" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // Streamer is the interface for streaming a statediff subscription diff --git a/libraries/shared/streamer/statediff_streamer_test.go b/libraries/shared/streamer/statediff_streamer_test.go index ef00a459..c92afd41 100644 --- a/libraries/shared/streamer/statediff_streamer_test.go +++ b/libraries/shared/streamer/statediff_streamer_test.go @@ -20,7 +20,7 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/streamer" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("StateDiff Streamer", func() { diff --git a/libraries/shared/streamer/super_node_streamer.go b/libraries/shared/streamer/super_node_streamer.go index 56fe34a4..df9708c5 100644 --- a/libraries/shared/streamer/super_node_streamer.go +++ b/libraries/shared/streamer/super_node_streamer.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/vulcanize/vulcanizedb/pkg/super_node" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // ISuperNodeStreamer is the interface for streaming SuperNodePayloads from a vulcanizeDB super node diff --git a/libraries/shared/test_data/test_helpers.go b/libraries/shared/test_data/test_helpers.go index b819635e..4caeabdc 100644 --- a/libraries/shared/test_data/test_helpers.go +++ b/libraries/shared/test_data/test_helpers.go @@ -6,9 +6,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) // Create a header sync log to reference in an event, returning inserted header sync log diff --git a/libraries/shared/transactions/syncer.go b/libraries/shared/transactions/syncer.go index fb7b4e07..b8c30148 100644 --- a/libraries/shared/transactions/syncer.go +++ b/libraries/shared/transactions/syncer.go @@ -19,10 +19,10 @@ package transactions import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) type ITransactionsSyncer interface { diff --git a/libraries/shared/transactions/syncer_test.go b/libraries/shared/transactions/syncer_test.go index 736f5108..e0f79275 100644 --- a/libraries/shared/transactions/syncer_test.go +++ b/libraries/shared/transactions/syncer_test.go @@ -21,8 +21,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/transactions" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/libraries/shared/transformer/contract_transformer.go b/libraries/shared/transformer/contract_transformer.go index 14b8ab97..1fc39416 100644 --- a/libraries/shared/transformer/contract_transformer.go +++ b/libraries/shared/transformer/contract_transformer.go @@ -18,8 +18,8 @@ package transformer import ( "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type ContractTransformer interface { diff --git a/libraries/shared/transformer/event_transformer.go b/libraries/shared/transformer/event_transformer.go index c3dca5ff..19d271f3 100644 --- a/libraries/shared/transformer/event_transformer.go +++ b/libraries/shared/transformer/event_transformer.go @@ -18,8 +18,8 @@ package transformer import ( "github.com/ethereum/go-ethereum/common" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type EventTransformer interface { diff --git a/libraries/shared/transformer/storage_transformer.go b/libraries/shared/transformer/storage_transformer.go index 3ee7a168..6811a37b 100644 --- a/libraries/shared/transformer/storage_transformer.go +++ b/libraries/shared/transformer/storage_transformer.go @@ -19,7 +19,7 @@ package transformer import ( "github.com/ethereum/go-ethereum/common" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type StorageTransformer interface { diff --git a/libraries/shared/transformer/super_node_transformer.go b/libraries/shared/transformer/super_node_transformer.go index ceec9874..fa5eac55 100644 --- a/libraries/shared/transformer/super_node_transformer.go +++ b/libraries/shared/transformer/super_node_transformer.go @@ -17,8 +17,8 @@ package transformer import ( - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/super_node" ) diff --git a/libraries/shared/watcher/contract_watcher.go b/libraries/shared/watcher/contract_watcher.go index 3c56124d..e942466b 100644 --- a/libraries/shared/watcher/contract_watcher.go +++ b/libraries/shared/watcher/contract_watcher.go @@ -26,8 +26,8 @@ import ( "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type ContractWatcher struct { diff --git a/libraries/shared/watcher/event_watcher.go b/libraries/shared/watcher/event_watcher.go index 7ab70897..02ca7d7e 100644 --- a/libraries/shared/watcher/event_watcher.go +++ b/libraries/shared/watcher/event_watcher.go @@ -27,9 +27,9 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/logs" "github.com/vulcanize/vulcanizedb/libraries/shared/transactions" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) const NoNewDataPause = time.Second * 7 diff --git a/libraries/shared/watcher/event_watcher_test.go b/libraries/shared/watcher/event_watcher_test.go index 9315684b..ba2a1ff3 100644 --- a/libraries/shared/watcher/event_watcher_test.go +++ b/libraries/shared/watcher/event_watcher_test.go @@ -26,7 +26,7 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/mocks" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" "github.com/vulcanize/vulcanizedb/libraries/shared/watcher" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var errExecuteClosed = errors.New("this error means the mocks were finished executing") diff --git a/libraries/shared/watcher/storage_watcher.go b/libraries/shared/watcher/storage_watcher.go index 39e93357..3ec3cf84 100644 --- a/libraries/shared/watcher/storage_watcher.go +++ b/libraries/shared/watcher/storage_watcher.go @@ -27,9 +27,9 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/storage" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) type IStorageWatcher interface { diff --git a/libraries/shared/watcher/storage_watcher_test.go b/libraries/shared/watcher/storage_watcher_test.go index a54b45e6..c6bc4625 100644 --- a/libraries/shared/watcher/storage_watcher_test.go +++ b/libraries/shared/watcher/storage_watcher_test.go @@ -33,8 +33,8 @@ import ( "github.com/vulcanize/vulcanizedb/libraries/shared/test_data" "github.com/vulcanize/vulcanizedb/libraries/shared/transformer" "github.com/vulcanize/vulcanizedb/libraries/shared/watcher" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/eth/blockchain.go b/pkg/eth/blockchain.go index da88b191..fa539906 100644 --- a/pkg/eth/blockchain.go +++ b/pkg/eth/blockchain.go @@ -29,9 +29,9 @@ import ( "github.com/sirupsen/logrus" "golang.org/x/net/context" - "github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/eth/client" vulcCommon "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) var ErrEmptyHeader = errors.New("empty header returned over RPC") diff --git a/pkg/eth/blockchain_test.go b/pkg/eth/blockchain_test.go index 3c2ba916..ac39bb5a 100644 --- a/pkg/eth/blockchain_test.go +++ b/pkg/eth/blockchain_test.go @@ -28,9 +28,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - vulcCore "github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/eth" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + vulcCore "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Geth blockchain", func() { diff --git a/pkg/eth/cold_import/importer.go b/pkg/eth/cold_import/importer.go index 4d5eab77..5248356a 100644 --- a/pkg/eth/cold_import/importer.go +++ b/pkg/eth/cold_import/importer.go @@ -17,9 +17,9 @@ package cold_import import ( - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/ethereum" "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/ethereum" ) type ColdImporter struct { diff --git a/pkg/eth/cold_import/importer_test.go b/pkg/eth/cold_import/importer_test.go index 705cee90..030f7703 100644 --- a/pkg/eth/cold_import/importer_test.go +++ b/pkg/eth/cold_import/importer_test.go @@ -20,10 +20,10 @@ import ( "github.com/ethereum/go-ethereum/core/types" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/pkg/eth/cold_import" vulcCommon "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Geth cold importer", func() { diff --git a/pkg/eth/cold_import/node_builder.go b/pkg/eth/cold_import/node_builder.go index 4c7028fc..667d6200 100644 --- a/pkg/eth/cold_import/node_builder.go +++ b/pkg/eth/cold_import/node_builder.go @@ -21,8 +21,8 @@ import ( "strings" "github.com/ethereum/go-ethereum/common" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/crypto" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/crypto" "github.com/vulcanize/vulcanizedb/pkg/fs" ) diff --git a/pkg/eth/cold_import/node_builder_test.go b/pkg/eth/cold_import/node_builder_test.go index 8c3730c5..1b33e52b 100644 --- a/pkg/eth/cold_import/node_builder_test.go +++ b/pkg/eth/cold_import/node_builder_test.go @@ -23,7 +23,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/pkg/eth/cold_import" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Cold importer node builder", func() { diff --git a/pkg/contract_watcher/full/converter/converter.go b/pkg/eth/contract_watcher/full/converter/converter.go similarity index 92% rename from pkg/contract_watcher/full/converter/converter.go rename to pkg/eth/contract_watcher/full/converter/converter.go index 5d47199b..0b231276 100644 --- a/pkg/contract_watcher/full/converter/converter.go +++ b/pkg/eth/contract_watcher/full/converter/converter.go @@ -25,10 +25,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // ConverterInterface is used to convert watched event logs to diff --git a/pkg/contract_watcher/full/converter/converter_suite_test.go b/pkg/eth/contract_watcher/full/converter/converter_suite_test.go similarity index 100% rename from pkg/contract_watcher/full/converter/converter_suite_test.go rename to pkg/eth/contract_watcher/full/converter/converter_suite_test.go diff --git a/pkg/contract_watcher/full/converter/converter_test.go b/pkg/eth/contract_watcher/full/converter/converter_test.go similarity index 89% rename from pkg/contract_watcher/full/converter/converter_test.go rename to pkg/eth/contract_watcher/full/converter/converter_test.go index 864a53a2..9d820e64 100644 --- a/pkg/contract_watcher/full/converter/converter_test.go +++ b/pkg/eth/contract_watcher/full/converter/converter_test.go @@ -21,11 +21,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/converter" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/converter" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" ) var _ = Describe("Converter", func() { diff --git a/pkg/contract_watcher/full/retriever/block_retriever.go b/pkg/eth/contract_watcher/full/retriever/block_retriever.go similarity index 98% rename from pkg/contract_watcher/full/retriever/block_retriever.go rename to pkg/eth/contract_watcher/full/retriever/block_retriever.go index da3529cb..30424dea 100644 --- a/pkg/contract_watcher/full/retriever/block_retriever.go +++ b/pkg/eth/contract_watcher/full/retriever/block_retriever.go @@ -20,7 +20,7 @@ import ( "database/sql" "github.com/vulcanize/vulcanizedb/libraries/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // BlockRetriever is used to retrieve the first block for a given contract and the most recent block diff --git a/pkg/contract_watcher/full/retriever/block_retriever_test.go b/pkg/eth/contract_watcher/full/retriever/block_retriever_test.go similarity index 95% rename from pkg/contract_watcher/full/retriever/block_retriever_test.go rename to pkg/eth/contract_watcher/full/retriever/block_retriever_test.go index adf55bf9..290f5746 100644 --- a/pkg/contract_watcher/full/retriever/block_retriever_test.go +++ b/pkg/eth/contract_watcher/full/retriever/block_retriever_test.go @@ -23,12 +23,12 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/retriever" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/retriever" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) var _ = Describe("Block Retriever", func() { diff --git a/pkg/contract_watcher/full/retriever/retriever_suite_test.go b/pkg/eth/contract_watcher/full/retriever/retriever_suite_test.go similarity index 100% rename from pkg/contract_watcher/full/retriever/retriever_suite_test.go rename to pkg/eth/contract_watcher/full/retriever/retriever_suite_test.go diff --git a/pkg/contract_watcher/full/transformer/transformer.go b/pkg/eth/contract_watcher/full/transformer/transformer.go similarity index 91% rename from pkg/contract_watcher/full/transformer/transformer.go rename to pkg/eth/contract_watcher/full/transformer/transformer.go index 005c1fc7..d3e6a576 100644 --- a/pkg/contract_watcher/full/transformer/transformer.go +++ b/pkg/eth/contract_watcher/full/transformer/transformer.go @@ -22,17 +22,17 @@ import ( "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/converter" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/retriever" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/parser" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/poller" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/converter" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/retriever" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/parser" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/poller" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) // Transformer is the top level struct for transforming watched contract data diff --git a/pkg/contract_watcher/full/transformer/transformer_suite_test.go b/pkg/eth/contract_watcher/full/transformer/transformer_suite_test.go similarity index 100% rename from pkg/contract_watcher/full/transformer/transformer_suite_test.go rename to pkg/eth/contract_watcher/full/transformer/transformer_suite_test.go diff --git a/pkg/contract_watcher/full/transformer/transformer_test.go b/pkg/eth/contract_watcher/full/transformer/transformer_test.go similarity index 82% rename from pkg/contract_watcher/full/transformer/transformer_test.go rename to pkg/eth/contract_watcher/full/transformer/transformer_test.go index 5c493c37..ea5104b4 100644 --- a/pkg/contract_watcher/full/transformer/transformer_test.go +++ b/pkg/eth/contract_watcher/full/transformer/transformer_test.go @@ -23,14 +23,14 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/retriever" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/transformer" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/parser" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/poller" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/retriever" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/transformer" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/parser" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/poller" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Transformer", func() { diff --git a/pkg/contract_watcher/header/converter/converter.go b/pkg/eth/contract_watcher/header/converter/converter.go similarity index 98% rename from pkg/contract_watcher/header/converter/converter.go rename to pkg/eth/contract_watcher/header/converter/converter.go index 5e263ed2..534451df 100644 --- a/pkg/contract_watcher/header/converter/converter.go +++ b/pkg/eth/contract_watcher/header/converter/converter.go @@ -27,8 +27,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" gethTypes "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" ) // ConverterInterface is the interface for converting geth logs to our custom log type diff --git a/pkg/contract_watcher/header/converter/converter_suite_test.go b/pkg/eth/contract_watcher/header/converter/converter_suite_test.go similarity index 100% rename from pkg/contract_watcher/header/converter/converter_suite_test.go rename to pkg/eth/contract_watcher/header/converter/converter_suite_test.go diff --git a/pkg/contract_watcher/header/converter/converter_test.go b/pkg/eth/contract_watcher/header/converter/converter_test.go similarity index 94% rename from pkg/contract_watcher/header/converter/converter_test.go rename to pkg/eth/contract_watcher/header/converter/converter_test.go index 9c7d6f68..154f5cb8 100644 --- a/pkg/contract_watcher/header/converter/converter_test.go +++ b/pkg/eth/contract_watcher/header/converter/converter_test.go @@ -22,11 +22,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/converter" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/converter" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" ) var _ = Describe("Converter", func() { diff --git a/pkg/contract_watcher/header/fetcher/fetcher.go b/pkg/eth/contract_watcher/header/fetcher/fetcher.go similarity index 97% rename from pkg/contract_watcher/header/fetcher/fetcher.go rename to pkg/eth/contract_watcher/header/fetcher/fetcher.go index afa9aade..2c250def 100644 --- a/pkg/contract_watcher/header/fetcher/fetcher.go +++ b/pkg/eth/contract_watcher/header/fetcher/fetcher.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // Fetcher is the fetching interface diff --git a/pkg/contract_watcher/header/fetcher/fetcher_suite_test.go b/pkg/eth/contract_watcher/header/fetcher/fetcher_suite_test.go similarity index 100% rename from pkg/contract_watcher/header/fetcher/fetcher_suite_test.go rename to pkg/eth/contract_watcher/header/fetcher/fetcher_suite_test.go diff --git a/pkg/contract_watcher/header/fetcher/fetcher_test.go b/pkg/eth/contract_watcher/header/fetcher/fetcher_test.go similarity index 92% rename from pkg/contract_watcher/header/fetcher/fetcher_test.go rename to pkg/eth/contract_watcher/header/fetcher/fetcher_test.go index d2c09a8f..1ffcdf2c 100644 --- a/pkg/contract_watcher/header/fetcher/fetcher_test.go +++ b/pkg/eth/contract_watcher/header/fetcher/fetcher_test.go @@ -22,9 +22,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/fetcher" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/fetcher" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Fetcher", func() { diff --git a/pkg/contract_watcher/header/repository/header_repository.go b/pkg/eth/contract_watcher/header/repository/header_repository.go similarity index 98% rename from pkg/contract_watcher/header/repository/header_repository.go rename to pkg/eth/contract_watcher/header/repository/header_repository.go index 14bb7d37..0330f6fc 100644 --- a/pkg/contract_watcher/header/repository/header_repository.go +++ b/pkg/eth/contract_watcher/header/repository/header_repository.go @@ -22,8 +22,8 @@ import ( "github.com/hashicorp/golang-lru" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const columnCacheSize = 1000 diff --git a/pkg/contract_watcher/header/repository/header_repository_test.go b/pkg/eth/contract_watcher/header/repository/header_repository_test.go similarity index 96% rename from pkg/contract_watcher/header/repository/header_repository_test.go rename to pkg/eth/contract_watcher/header/repository/header_repository_test.go index 42c4c61d..7c47a8c1 100644 --- a/pkg/contract_watcher/header/repository/header_repository_test.go +++ b/pkg/eth/contract_watcher/header/repository/header_repository_test.go @@ -22,12 +22,12 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) var _ = Describe("Repository", func() { diff --git a/pkg/contract_watcher/header/repository/repository_suite_test.go b/pkg/eth/contract_watcher/header/repository/repository_suite_test.go similarity index 100% rename from pkg/contract_watcher/header/repository/repository_suite_test.go rename to pkg/eth/contract_watcher/header/repository/repository_suite_test.go diff --git a/pkg/contract_watcher/header/retriever/block_retriever.go b/pkg/eth/contract_watcher/header/retriever/block_retriever.go similarity index 96% rename from pkg/contract_watcher/header/retriever/block_retriever.go rename to pkg/eth/contract_watcher/header/retriever/block_retriever.go index 8362d483..e2350b3d 100644 --- a/pkg/contract_watcher/header/retriever/block_retriever.go +++ b/pkg/eth/contract_watcher/header/retriever/block_retriever.go @@ -17,7 +17,7 @@ package retriever import ( - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // BlockRetriever is used to retrieve the first block for a given contract and the most recent block diff --git a/pkg/contract_watcher/header/retriever/block_retriever_test.go b/pkg/eth/contract_watcher/header/retriever/block_retriever_test.go similarity index 86% rename from pkg/contract_watcher/header/retriever/block_retriever_test.go rename to pkg/eth/contract_watcher/header/retriever/block_retriever_test.go index 0e0d4921..0406d8e5 100644 --- a/pkg/contract_watcher/header/retriever/block_retriever_test.go +++ b/pkg/eth/contract_watcher/header/retriever/block_retriever_test.go @@ -20,11 +20,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/retriever" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/retriever" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) var _ = Describe("Block Retriever", func() { diff --git a/pkg/contract_watcher/header/retriever/retriever_suite_test.go b/pkg/eth/contract_watcher/header/retriever/retriever_suite_test.go similarity index 100% rename from pkg/contract_watcher/header/retriever/retriever_suite_test.go rename to pkg/eth/contract_watcher/header/retriever/retriever_suite_test.go diff --git a/pkg/contract_watcher/header/transformer/transformer.go b/pkg/eth/contract_watcher/header/transformer/transformer.go similarity index 94% rename from pkg/contract_watcher/header/transformer/transformer.go rename to pkg/eth/contract_watcher/header/transformer/transformer.go index df1f4e56..bf18474d 100644 --- a/pkg/contract_watcher/header/transformer/transformer.go +++ b/pkg/eth/contract_watcher/header/transformer/transformer.go @@ -28,17 +28,17 @@ import ( "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/converter" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/fetcher" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/retriever" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/parser" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/poller" - srep "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/converter" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/fetcher" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/retriever" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/parser" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/poller" + srep "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // Transformer is the top level struct for transforming watched contract data diff --git a/pkg/contract_watcher/header/transformer/transformer_suite_test.go b/pkg/eth/contract_watcher/header/transformer/transformer_suite_test.go similarity index 100% rename from pkg/contract_watcher/header/transformer/transformer_suite_test.go rename to pkg/eth/contract_watcher/header/transformer/transformer_suite_test.go diff --git a/pkg/contract_watcher/header/transformer/transformer_test.go b/pkg/eth/contract_watcher/header/transformer/transformer_test.go similarity index 88% rename from pkg/contract_watcher/header/transformer/transformer_test.go rename to pkg/eth/contract_watcher/header/transformer/transformer_test.go index bd448000..478176f1 100644 --- a/pkg/contract_watcher/header/transformer/transformer_test.go +++ b/pkg/eth/contract_watcher/header/transformer/transformer_test.go @@ -22,13 +22,13 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/retriever" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/transformer" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/parser" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/poller" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/retriever" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/transformer" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/parser" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/poller" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Transformer", func() { diff --git a/pkg/contract_watcher/shared/constants/constants.go b/pkg/eth/contract_watcher/shared/constants/constants.go similarity index 99% rename from pkg/contract_watcher/shared/constants/constants.go rename to pkg/eth/contract_watcher/shared/constants/constants.go index b47d22ae..9e6855d9 100644 --- a/pkg/contract_watcher/shared/constants/constants.go +++ b/pkg/eth/contract_watcher/shared/constants/constants.go @@ -18,9 +18,9 @@ package constants import ( "github.com/ethereum/go-ethereum/common" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" ) // Event enums diff --git a/pkg/contract_watcher/shared/constants/interface.go b/pkg/eth/contract_watcher/shared/constants/interface.go similarity index 100% rename from pkg/contract_watcher/shared/constants/interface.go rename to pkg/eth/contract_watcher/shared/constants/interface.go diff --git a/pkg/contract_watcher/shared/contract/contract.go b/pkg/eth/contract_watcher/shared/contract/contract.go similarity index 97% rename from pkg/contract_watcher/shared/contract/contract.go rename to pkg/eth/contract_watcher/shared/contract/contract.go index 1bb5ce3d..ef9e9815 100644 --- a/pkg/contract_watcher/shared/contract/contract.go +++ b/pkg/eth/contract_watcher/shared/contract/contract.go @@ -23,9 +23,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" ) // Contract object to hold our contract data diff --git a/pkg/contract_watcher/shared/contract/contract_suite_test.go b/pkg/eth/contract_watcher/shared/contract/contract_suite_test.go similarity index 100% rename from pkg/contract_watcher/shared/contract/contract_suite_test.go rename to pkg/eth/contract_watcher/shared/contract/contract_suite_test.go diff --git a/pkg/contract_watcher/shared/contract/contract_test.go b/pkg/eth/contract_watcher/shared/contract/contract_test.go similarity index 95% rename from pkg/contract_watcher/shared/contract/contract_test.go rename to pkg/eth/contract_watcher/shared/contract/contract_test.go index 38a996ec..ee3ad7b8 100644 --- a/pkg/contract_watcher/shared/contract/contract_test.go +++ b/pkg/eth/contract_watcher/shared/contract/contract_test.go @@ -20,10 +20,10 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" ) var _ = Describe("Contract", func() { diff --git a/pkg/contract_watcher/shared/fetcher/fetcher.go b/pkg/eth/contract_watcher/shared/fetcher/fetcher.go similarity index 98% rename from pkg/contract_watcher/shared/fetcher/fetcher.go rename to pkg/eth/contract_watcher/shared/fetcher/fetcher.go index db4c6561..e9e4a035 100644 --- a/pkg/contract_watcher/shared/fetcher/fetcher.go +++ b/pkg/eth/contract_watcher/shared/fetcher/fetcher.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // Fetcher serves as the lower level data fetcher that calls the underlying diff --git a/pkg/contract_watcher/shared/getter/getter_suite_test.go b/pkg/eth/contract_watcher/shared/getter/getter_suite_test.go similarity index 100% rename from pkg/contract_watcher/shared/getter/getter_suite_test.go rename to pkg/eth/contract_watcher/shared/getter/getter_suite_test.go diff --git a/pkg/contract_watcher/shared/getter/getter_test.go b/pkg/eth/contract_watcher/shared/getter/getter_test.go similarity index 93% rename from pkg/contract_watcher/shared/getter/getter_test.go rename to pkg/eth/contract_watcher/shared/getter/getter_test.go index d28f10ac..e0cc5a60 100644 --- a/pkg/contract_watcher/shared/getter/getter_test.go +++ b/pkg/eth/contract_watcher/shared/getter/getter_test.go @@ -22,10 +22,10 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/getter" "github.com/vulcanize/vulcanizedb/pkg/eth" "github.com/vulcanize/vulcanizedb/pkg/eth/client" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/getter" rpc2 "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" "github.com/vulcanize/vulcanizedb/pkg/eth/node" "github.com/vulcanize/vulcanizedb/test_config" diff --git a/pkg/contract_watcher/shared/getter/interface_getter.go b/pkg/eth/contract_watcher/shared/getter/interface_getter.go similarity index 95% rename from pkg/contract_watcher/shared/getter/interface_getter.go rename to pkg/eth/contract_watcher/shared/getter/interface_getter.go index 273940e9..cf1d21d4 100644 --- a/pkg/contract_watcher/shared/getter/interface_getter.go +++ b/pkg/eth/contract_watcher/shared/getter/interface_getter.go @@ -19,9 +19,9 @@ package getter import ( "fmt" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/fetcher" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/fetcher" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // InterfaceGetter is used to derive the interface of a contract diff --git a/pkg/contract_watcher/shared/helpers/helpers.go b/pkg/eth/contract_watcher/shared/helpers/helpers.go similarity index 97% rename from pkg/contract_watcher/shared/helpers/helpers.go rename to pkg/eth/contract_watcher/shared/helpers/helpers.go index 6312210f..2f440003 100644 --- a/pkg/contract_watcher/shared/helpers/helpers.go +++ b/pkg/eth/contract_watcher/shared/helpers/helpers.go @@ -24,7 +24,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // ConvertToLog converts a watched event to a log diff --git a/pkg/contract_watcher/shared/helpers/test_helpers/database.go b/pkg/eth/contract_watcher/shared/helpers/test_helpers/database.go similarity index 95% rename from pkg/contract_watcher/shared/helpers/test_helpers/database.go rename to pkg/eth/contract_watcher/shared/helpers/test_helpers/database.go index cd1ed7c7..0ec368b1 100644 --- a/pkg/contract_watcher/shared/helpers/test_helpers/database.go +++ b/pkg/eth/contract_watcher/shared/helpers/test_helpers/database.go @@ -24,15 +24,15 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/pkg/eth" "github.com/vulcanize/vulcanizedb/pkg/eth/client" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" rpc2 "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/pkg/eth/node" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/contract_watcher/shared/helpers/test_helpers/mocks/entities.go b/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks/entities.go similarity index 98% rename from pkg/contract_watcher/shared/helpers/test_helpers/mocks/entities.go rename to pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks/entities.go index 27fa2173..92d460a0 100644 --- a/pkg/contract_watcher/shared/helpers/test_helpers/mocks/entities.go +++ b/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks/entities.go @@ -25,9 +25,9 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" ) var TransferBlock1 = core.Block{ diff --git a/pkg/contract_watcher/shared/helpers/test_helpers/mocks/parser.go b/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks/parser.go similarity index 96% rename from pkg/contract_watcher/shared/helpers/test_helpers/mocks/parser.go rename to pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks/parser.go index 96bc14f6..415ffbc5 100644 --- a/pkg/contract_watcher/shared/helpers/test_helpers/mocks/parser.go +++ b/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks/parser.go @@ -18,9 +18,9 @@ package mocks import ( "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/parser" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" "github.com/vulcanize/vulcanizedb/pkg/eth" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/parser" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" ) // Mock parser diff --git a/pkg/contract_watcher/shared/helpers/test_helpers/test_data.go b/pkg/eth/contract_watcher/shared/helpers/test_helpers/test_data.go similarity index 96% rename from pkg/contract_watcher/shared/helpers/test_helpers/test_data.go rename to pkg/eth/contract_watcher/shared/helpers/test_helpers/test_data.go index 5e35b607..f592f920 100644 --- a/pkg/contract_watcher/shared/helpers/test_helpers/test_data.go +++ b/pkg/eth/contract_watcher/shared/helpers/test_helpers/test_data.go @@ -20,7 +20,7 @@ import ( "strings" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" ) var ens = strings.ToLower(constants.EnsContractAddress) diff --git a/pkg/contract_watcher/shared/parser/parser.go b/pkg/eth/contract_watcher/shared/parser/parser.go similarity index 97% rename from pkg/contract_watcher/shared/parser/parser.go rename to pkg/eth/contract_watcher/shared/parser/parser.go index c55c82dd..56e9ba87 100644 --- a/pkg/contract_watcher/shared/parser/parser.go +++ b/pkg/eth/contract_watcher/shared/parser/parser.go @@ -22,9 +22,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" "github.com/vulcanize/vulcanizedb/pkg/eth" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" ) // Parser is used to fetch and parse contract ABIs diff --git a/pkg/contract_watcher/shared/parser/parser_suite_test.go b/pkg/eth/contract_watcher/shared/parser/parser_suite_test.go similarity index 100% rename from pkg/contract_watcher/shared/parser/parser_suite_test.go rename to pkg/eth/contract_watcher/shared/parser/parser_suite_test.go diff --git a/pkg/contract_watcher/shared/parser/parser_test.go b/pkg/eth/contract_watcher/shared/parser/parser_test.go similarity index 95% rename from pkg/contract_watcher/shared/parser/parser_test.go rename to pkg/eth/contract_watcher/shared/parser/parser_test.go index b76c9e15..49645c6b 100644 --- a/pkg/contract_watcher/shared/parser/parser_test.go +++ b/pkg/eth/contract_watcher/shared/parser/parser_test.go @@ -21,11 +21,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/parser" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" "github.com/vulcanize/vulcanizedb/pkg/eth" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/parser" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" ) var _ = Describe("Parser", func() { diff --git a/pkg/contract_watcher/shared/poller/poller.go b/pkg/eth/contract_watcher/shared/poller/poller.go similarity index 96% rename from pkg/contract_watcher/shared/poller/poller.go rename to pkg/eth/contract_watcher/shared/poller/poller.go index 38717377..9dc17b81 100644 --- a/pkg/contract_watcher/shared/poller/poller.go +++ b/pkg/eth/contract_watcher/shared/poller/poller.go @@ -26,11 +26,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // Poller is the interface for polling public contract methods diff --git a/pkg/contract_watcher/shared/repository/event_repository.go b/pkg/eth/contract_watcher/shared/repository/event_repository.go similarity index 98% rename from pkg/contract_watcher/shared/repository/event_repository.go rename to pkg/eth/contract_watcher/shared/repository/event_repository.go index ab5756df..bd67bbac 100644 --- a/pkg/contract_watcher/shared/repository/event_repository.go +++ b/pkg/eth/contract_watcher/shared/repository/event_repository.go @@ -24,8 +24,8 @@ import ( "github.com/hashicorp/golang-lru" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const ( diff --git a/pkg/contract_watcher/shared/repository/event_repository_test.go b/pkg/eth/contract_watcher/shared/repository/event_repository_test.go similarity index 93% rename from pkg/contract_watcher/shared/repository/event_repository_test.go rename to pkg/eth/contract_watcher/shared/repository/event_repository_test.go index 3f3560fa..4f5ff1b4 100644 --- a/pkg/contract_watcher/shared/repository/event_repository_test.go +++ b/pkg/eth/contract_watcher/shared/repository/event_repository_test.go @@ -26,17 +26,17 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - fc "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/converter" - lc "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/converter" - lr "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/header/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers/mocks" - sr "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + fc "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/converter" + lc "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/converter" + lr "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/header/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers/mocks" + sr "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) var _ = Describe("Repository", func() { diff --git a/pkg/contract_watcher/shared/repository/method_repository.go b/pkg/eth/contract_watcher/shared/repository/method_repository.go similarity index 98% rename from pkg/contract_watcher/shared/repository/method_repository.go rename to pkg/eth/contract_watcher/shared/repository/method_repository.go index c8776b67..3525b226 100644 --- a/pkg/contract_watcher/shared/repository/method_repository.go +++ b/pkg/eth/contract_watcher/shared/repository/method_repository.go @@ -24,8 +24,8 @@ import ( "github.com/hashicorp/golang-lru" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const methodCacheSize = 1000 diff --git a/pkg/contract_watcher/shared/repository/method_repository_test.go b/pkg/eth/contract_watcher/shared/repository/method_repository_test.go similarity index 94% rename from pkg/contract_watcher/shared/repository/method_repository_test.go rename to pkg/eth/contract_watcher/shared/repository/method_repository_test.go index 740a4ecf..89dea7fe 100644 --- a/pkg/contract_watcher/shared/repository/method_repository_test.go +++ b/pkg/eth/contract_watcher/shared/repository/method_repository_test.go @@ -23,12 +23,12 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) var _ = Describe("Repository", func() { diff --git a/pkg/contract_watcher/shared/repository/repository_suite_test.go b/pkg/eth/contract_watcher/shared/repository/repository_suite_test.go similarity index 100% rename from pkg/contract_watcher/shared/repository/repository_suite_test.go rename to pkg/eth/contract_watcher/shared/repository/repository_suite_test.go diff --git a/pkg/contract_watcher/shared/retriever/address_retriever.go b/pkg/eth/contract_watcher/shared/retriever/address_retriever.go similarity index 94% rename from pkg/contract_watcher/shared/retriever/address_retriever.go rename to pkg/eth/contract_watcher/shared/retriever/address_retriever.go index 8afb2b98..f4f35118 100644 --- a/pkg/contract_watcher/shared/retriever/address_retriever.go +++ b/pkg/eth/contract_watcher/shared/retriever/address_retriever.go @@ -23,9 +23,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // AddressRetriever is used to retrieve the addresses associated with a contract diff --git a/pkg/contract_watcher/shared/retriever/address_retriever_test.go b/pkg/eth/contract_watcher/shared/retriever/address_retriever_test.go similarity index 84% rename from pkg/contract_watcher/shared/retriever/address_retriever_test.go rename to pkg/eth/contract_watcher/shared/retriever/address_retriever_test.go index dc8f578e..6a83792c 100644 --- a/pkg/contract_watcher/shared/retriever/address_retriever_test.go +++ b/pkg/eth/contract_watcher/shared/retriever/address_retriever_test.go @@ -21,15 +21,15 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/full/converter" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/constants" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/helpers/test_helpers" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/retriever" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/full/converter" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/constants" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/helpers/test_helpers" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/repository" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/retriever" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) var mockEvent = core.WatchedEvent{ diff --git a/pkg/contract_watcher/shared/retriever/retriever_suite_test.go b/pkg/eth/contract_watcher/shared/retriever/retriever_suite_test.go similarity index 100% rename from pkg/contract_watcher/shared/retriever/retriever_suite_test.go rename to pkg/eth/contract_watcher/shared/retriever/retriever_suite_test.go diff --git a/pkg/contract_watcher/shared/types/event.go b/pkg/eth/contract_watcher/shared/types/event.go similarity index 100% rename from pkg/contract_watcher/shared/types/event.go rename to pkg/eth/contract_watcher/shared/types/event.go diff --git a/pkg/contract_watcher/shared/types/method.go b/pkg/eth/contract_watcher/shared/types/method.go similarity index 100% rename from pkg/contract_watcher/shared/types/method.go rename to pkg/eth/contract_watcher/shared/types/method.go diff --git a/pkg/contract_watcher/shared/types/mode.go b/pkg/eth/contract_watcher/shared/types/mode.go similarity index 100% rename from pkg/contract_watcher/shared/types/mode.go rename to pkg/eth/contract_watcher/shared/types/mode.go diff --git a/pkg/eth/converters/cold_db/transaction_converter.go b/pkg/eth/converters/cold_db/transaction_converter.go index fcf0b17f..16cf4ccb 100644 --- a/pkg/eth/converters/cold_db/transaction_converter.go +++ b/pkg/eth/converters/cold_db/transaction_converter.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" "golang.org/x/sync/errgroup" ) diff --git a/pkg/eth/converters/common/block_converter.go b/pkg/eth/converters/common/block_converter.go index 3133a2e4..35be241b 100644 --- a/pkg/eth/converters/common/block_converter.go +++ b/pkg/eth/converters/common/block_converter.go @@ -25,7 +25,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type BlockConverter struct { diff --git a/pkg/eth/converters/common/block_converter_test.go b/pkg/eth/converters/common/block_converter_test.go index f7466d64..ed73f95a 100644 --- a/pkg/eth/converters/common/block_converter_test.go +++ b/pkg/eth/converters/common/block_converter_test.go @@ -31,7 +31,7 @@ import ( vulcCommon "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Conversion of GethBlock to core.Block", func() { diff --git a/pkg/eth/converters/common/block_rewards.go b/pkg/eth/converters/common/block_rewards.go index c0f6aae6..ccd4838d 100644 --- a/pkg/eth/converters/common/block_rewards.go +++ b/pkg/eth/converters/common/block_rewards.go @@ -20,7 +20,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) func CalcBlockReward(block core.Block, uncles []*types.Header) *big.Int { diff --git a/pkg/eth/converters/common/full_sync_log_converter.go b/pkg/eth/converters/common/full_sync_log_converter.go index df6805d4..c7dc1871 100644 --- a/pkg/eth/converters/common/full_sync_log_converter.go +++ b/pkg/eth/converters/common/full_sync_log_converter.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) func ToFullSyncLogs(gethLogs []types.Log) []core.FullSyncLog { diff --git a/pkg/eth/converters/common/full_sync_log_converter_test.go b/pkg/eth/converters/common/full_sync_log_converter_test.go index 65eb7378..6ac4a0d7 100644 --- a/pkg/eth/converters/common/full_sync_log_converter_test.go +++ b/pkg/eth/converters/common/full_sync_log_converter_test.go @@ -25,8 +25,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" vulcCommon "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) var _ = Describe("Conversion of GethLog to core.FullSyncLog", func() { diff --git a/pkg/eth/converters/common/header_converter.go b/pkg/eth/converters/common/header_converter.go index c5b59ed8..0f2e0ff6 100644 --- a/pkg/eth/converters/common/header_converter.go +++ b/pkg/eth/converters/common/header_converter.go @@ -22,7 +22,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type HeaderConverter struct{} diff --git a/pkg/eth/converters/common/header_converter_test.go b/pkg/eth/converters/common/header_converter_test.go index 5123b74f..c87d2083 100644 --- a/pkg/eth/converters/common/header_converter_test.go +++ b/pkg/eth/converters/common/header_converter_test.go @@ -27,7 +27,7 @@ import ( . "github.com/onsi/gomega" common2 "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Block header converter", func() { diff --git a/pkg/eth/converters/common/receipt_converter.go b/pkg/eth/converters/common/receipt_converter.go index 880664bd..1db8942a 100644 --- a/pkg/eth/converters/common/receipt_converter.go +++ b/pkg/eth/converters/common/receipt_converter.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) func ToCoreReceipts(gethReceipts types.Receipts) ([]core.Receipt, error) { diff --git a/pkg/eth/converters/common/receipt_converter_test.go b/pkg/eth/converters/common/receipt_converter_test.go index c0bd33f5..42830326 100644 --- a/pkg/eth/converters/common/receipt_converter_test.go +++ b/pkg/eth/converters/common/receipt_converter_test.go @@ -25,8 +25,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" vulcCommon "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) var _ = Describe("Conversion of GethReceipt to core.Receipt", func() { diff --git a/pkg/eth/converters/common/transaction_converter.go b/pkg/eth/converters/common/transaction_converter.go index 0eb4e5ae..8d66dd3a 100644 --- a/pkg/eth/converters/common/transaction_converter.go +++ b/pkg/eth/converters/common/transaction_converter.go @@ -18,7 +18,7 @@ package common import ( "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type TransactionConverter interface { diff --git a/pkg/eth/converters/rpc/transaction_converter.go b/pkg/eth/converters/rpc/transaction_converter.go index 906536d5..b851f06a 100644 --- a/pkg/eth/converters/rpc/transaction_converter.go +++ b/pkg/eth/converters/rpc/transaction_converter.go @@ -31,8 +31,8 @@ import ( "github.com/ethereum/go-ethereum/rlp" "golang.org/x/sync/errgroup" - "github.com/vulcanize/vulcanizedb/pkg/core" vulcCommon "github.com/vulcanize/vulcanizedb/pkg/eth/converters/common" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type RPCTransactionConverter struct { diff --git a/pkg/eth/converters/rpc/transaction_converter_test.go b/pkg/eth/converters/rpc/transaction_converter_test.go index 930d01c6..004abbaa 100644 --- a/pkg/eth/converters/rpc/transaction_converter_test.go +++ b/pkg/eth/converters/rpc/transaction_converter_test.go @@ -19,9 +19,9 @@ package rpc_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("RPC transaction converter", func() { diff --git a/pkg/core/block.go b/pkg/eth/core/block.go similarity index 100% rename from pkg/core/block.go rename to pkg/eth/core/block.go diff --git a/pkg/core/blockchain.go b/pkg/eth/core/blockchain.go similarity index 100% rename from pkg/core/blockchain.go rename to pkg/eth/core/blockchain.go diff --git a/pkg/core/contract.go b/pkg/eth/core/contract.go similarity index 100% rename from pkg/core/contract.go rename to pkg/eth/core/contract.go diff --git a/pkg/core/eth_client.go b/pkg/eth/core/eth_client.go similarity index 100% rename from pkg/core/eth_client.go rename to pkg/eth/core/eth_client.go diff --git a/pkg/core/header.go b/pkg/eth/core/header.go similarity index 100% rename from pkg/core/header.go rename to pkg/eth/core/header.go diff --git a/pkg/core/log.go b/pkg/eth/core/log.go similarity index 100% rename from pkg/core/log.go rename to pkg/eth/core/log.go diff --git a/pkg/core/node_info.go b/pkg/eth/core/node_info.go similarity index 100% rename from pkg/core/node_info.go rename to pkg/eth/core/node_info.go diff --git a/pkg/core/receipts.go b/pkg/eth/core/receipts.go similarity index 100% rename from pkg/core/receipts.go rename to pkg/eth/core/receipts.go diff --git a/pkg/core/rpc_client.go b/pkg/eth/core/rpc_client.go similarity index 100% rename from pkg/core/rpc_client.go rename to pkg/eth/core/rpc_client.go diff --git a/pkg/core/topics.go b/pkg/eth/core/topics.go similarity index 100% rename from pkg/core/topics.go rename to pkg/eth/core/topics.go diff --git a/pkg/core/transaction.go b/pkg/eth/core/transaction.go similarity index 100% rename from pkg/core/transaction.go rename to pkg/eth/core/transaction.go diff --git a/pkg/core/uncle.go b/pkg/eth/core/uncle.go similarity index 100% rename from pkg/core/uncle.go rename to pkg/eth/core/uncle.go diff --git a/pkg/core/watched_event_log.go b/pkg/eth/core/watched_event_log.go similarity index 100% rename from pkg/core/watched_event_log.go rename to pkg/eth/core/watched_event_log.go diff --git a/pkg/crypto/crypto_suite_test.go b/pkg/eth/crypto/crypto_suite_test.go similarity index 100% rename from pkg/crypto/crypto_suite_test.go rename to pkg/eth/crypto/crypto_suite_test.go diff --git a/pkg/crypto/parser.go b/pkg/eth/crypto/parser.go similarity index 100% rename from pkg/crypto/parser.go rename to pkg/eth/crypto/parser.go diff --git a/pkg/crypto/parser_test.go b/pkg/eth/crypto/parser_test.go similarity index 96% rename from pkg/crypto/parser_test.go rename to pkg/eth/crypto/parser_test.go index b1576c42..73a148af 100644 --- a/pkg/crypto/parser_test.go +++ b/pkg/eth/crypto/parser_test.go @@ -19,7 +19,7 @@ package crypto_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/crypto" + "github.com/vulcanize/vulcanizedb/pkg/eth/crypto" ) var _ = Describe("Public key parser", func() { diff --git a/pkg/datastore/errors.go b/pkg/eth/datastore/errors.go similarity index 100% rename from pkg/datastore/errors.go rename to pkg/eth/datastore/errors.go diff --git a/pkg/datastore/ethereum/config.go b/pkg/eth/datastore/ethereum/config.go similarity index 100% rename from pkg/datastore/ethereum/config.go rename to pkg/eth/datastore/ethereum/config.go diff --git a/pkg/datastore/ethereum/database.go b/pkg/eth/datastore/ethereum/database.go similarity index 95% rename from pkg/datastore/ethereum/database.go rename to pkg/eth/datastore/ethereum/database.go index 6084975c..801e6047 100644 --- a/pkg/datastore/ethereum/database.go +++ b/pkg/eth/datastore/ethereum/database.go @@ -23,7 +23,7 @@ import ( "github.com/sirupsen/logrus" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/datastore/ethereum/level" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/ethereum/level" ) type Database interface { diff --git a/pkg/datastore/ethereum/level/database.go b/pkg/eth/datastore/ethereum/level/database.go similarity index 100% rename from pkg/datastore/ethereum/level/database.go rename to pkg/eth/datastore/ethereum/level/database.go diff --git a/pkg/datastore/ethereum/level/database_reader.go b/pkg/eth/datastore/ethereum/level/database_reader.go similarity index 100% rename from pkg/datastore/ethereum/level/database_reader.go rename to pkg/eth/datastore/ethereum/level/database_reader.go diff --git a/pkg/datastore/ethereum/level/database_test.go b/pkg/eth/datastore/ethereum/level/database_test.go similarity index 96% rename from pkg/datastore/ethereum/level/database_test.go rename to pkg/eth/datastore/ethereum/level/database_test.go index e8b1fe1a..0827828f 100644 --- a/pkg/datastore/ethereum/level/database_test.go +++ b/pkg/eth/datastore/ethereum/level/database_test.go @@ -20,8 +20,8 @@ import ( "github.com/ethereum/go-ethereum/common" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/datastore/ethereum/level" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/ethereum/level" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Level database", func() { diff --git a/pkg/datastore/ethereum/level/level_suite_test.go b/pkg/eth/datastore/ethereum/level/level_suite_test.go similarity index 100% rename from pkg/datastore/ethereum/level/level_suite_test.go rename to pkg/eth/datastore/ethereum/level/level_suite_test.go diff --git a/pkg/datastore/postgres/errors.go b/pkg/eth/datastore/postgres/errors.go similarity index 100% rename from pkg/datastore/postgres/errors.go rename to pkg/eth/datastore/postgres/errors.go diff --git a/pkg/datastore/postgres/postgres.go b/pkg/eth/datastore/postgres/postgres.go similarity index 97% rename from pkg/datastore/postgres/postgres.go rename to pkg/eth/datastore/postgres/postgres.go index 14a54536..26e5bf9c 100644 --- a/pkg/datastore/postgres/postgres.go +++ b/pkg/eth/datastore/postgres/postgres.go @@ -20,7 +20,7 @@ import ( "github.com/jmoiron/sqlx" _ "github.com/lib/pq" //postgres driver "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type DB struct { diff --git a/pkg/datastore/postgres/postgres_suite_test.go b/pkg/eth/datastore/postgres/postgres_suite_test.go similarity index 100% rename from pkg/datastore/postgres/postgres_suite_test.go rename to pkg/eth/datastore/postgres/postgres_suite_test.go diff --git a/pkg/datastore/postgres/postgres_test.go b/pkg/eth/datastore/postgres/postgres_test.go similarity index 96% rename from pkg/datastore/postgres/postgres_test.go rename to pkg/eth/datastore/postgres/postgres_test.go index 3fff5484..37621f7a 100644 --- a/pkg/datastore/postgres/postgres_test.go +++ b/pkg/eth/datastore/postgres/postgres_test.go @@ -27,9 +27,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/block_repository.go b/pkg/eth/datastore/postgres/repositories/block_repository.go similarity index 98% rename from pkg/datastore/postgres/repositories/block_repository.go rename to pkg/eth/datastore/postgres/repositories/block_repository.go index 36ced1ed..718af605 100644 --- a/pkg/datastore/postgres/repositories/block_repository.go +++ b/pkg/eth/datastore/postgres/repositories/block_repository.go @@ -23,9 +23,9 @@ import ( "github.com/jmoiron/sqlx" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const ( diff --git a/pkg/datastore/postgres/repositories/block_repository_test.go b/pkg/eth/datastore/postgres/repositories/block_repository_test.go similarity index 98% rename from pkg/datastore/postgres/repositories/block_repository_test.go rename to pkg/eth/datastore/postgres/repositories/block_repository_test.go index a9ba0344..975c8de7 100644 --- a/pkg/datastore/postgres/repositories/block_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/block_repository_test.go @@ -23,14 +23,14 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/checked_headers_repository.go b/pkg/eth/datastore/postgres/repositories/checked_headers_repository.go similarity index 95% rename from pkg/datastore/postgres/repositories/checked_headers_repository.go rename to pkg/eth/datastore/postgres/repositories/checked_headers_repository.go index 8eb4767f..14009c42 100644 --- a/pkg/datastore/postgres/repositories/checked_headers_repository.go +++ b/pkg/eth/datastore/postgres/repositories/checked_headers_repository.go @@ -17,8 +17,8 @@ package repositories import ( - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const ( diff --git a/pkg/datastore/postgres/repositories/checked_headers_repository_test.go b/pkg/eth/datastore/postgres/repositories/checked_headers_repository_test.go similarity index 97% rename from pkg/datastore/postgres/repositories/checked_headers_repository_test.go rename to pkg/eth/datastore/postgres/repositories/checked_headers_repository_test.go index bd5789be..b14eee17 100644 --- a/pkg/datastore/postgres/repositories/checked_headers_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/checked_headers_repository_test.go @@ -21,11 +21,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/checked_logs_repository.go b/pkg/eth/datastore/postgres/repositories/checked_logs_repository.go similarity index 97% rename from pkg/datastore/postgres/repositories/checked_logs_repository.go rename to pkg/eth/datastore/postgres/repositories/checked_logs_repository.go index b3f012cb..1fecdcf0 100644 --- a/pkg/datastore/postgres/repositories/checked_logs_repository.go +++ b/pkg/eth/datastore/postgres/repositories/checked_logs_repository.go @@ -18,7 +18,7 @@ package repositories import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type CheckedLogsRepository struct { diff --git a/pkg/datastore/postgres/repositories/checked_logs_repository_test.go b/pkg/eth/datastore/postgres/repositories/checked_logs_repository_test.go similarity index 95% rename from pkg/datastore/postgres/repositories/checked_logs_repository_test.go rename to pkg/eth/datastore/postgres/repositories/checked_logs_repository_test.go index 6bb9a8db..150d5803 100644 --- a/pkg/datastore/postgres/repositories/checked_logs_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/checked_logs_repository_test.go @@ -20,10 +20,10 @@ import ( "github.com/ethereum/go-ethereum/common" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/contract_repository.go b/pkg/eth/datastore/postgres/repositories/contract_repository.go similarity index 94% rename from pkg/datastore/postgres/repositories/contract_repository.go rename to pkg/eth/datastore/postgres/repositories/contract_repository.go index d198ecae..deed9184 100644 --- a/pkg/datastore/postgres/repositories/contract_repository.go +++ b/pkg/eth/datastore/postgres/repositories/contract_repository.go @@ -19,9 +19,9 @@ package repositories import ( "database/sql" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type ContractRepository struct { diff --git a/pkg/datastore/postgres/repositories/contract_repository_test.go b/pkg/eth/datastore/postgres/repositories/contract_repository_test.go similarity index 94% rename from pkg/datastore/postgres/repositories/contract_repository_test.go rename to pkg/eth/datastore/postgres/repositories/contract_repository_test.go index 4afdab20..9549c579 100644 --- a/pkg/datastore/postgres/repositories/contract_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/contract_repository_test.go @@ -21,10 +21,10 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/full_sync_log_repository.go b/pkg/eth/datastore/postgres/repositories/full_sync_log_repository.go similarity index 96% rename from pkg/datastore/postgres/repositories/full_sync_log_repository.go rename to pkg/eth/datastore/postgres/repositories/full_sync_log_repository.go index e907043a..cd01a0b1 100644 --- a/pkg/datastore/postgres/repositories/full_sync_log_repository.go +++ b/pkg/eth/datastore/postgres/repositories/full_sync_log_repository.go @@ -20,8 +20,8 @@ import ( "database/sql" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type FullSyncLogRepository struct { diff --git a/pkg/datastore/postgres/repositories/full_sync_log_repository_test.go b/pkg/eth/datastore/postgres/repositories/full_sync_log_repository_test.go similarity index 96% rename from pkg/datastore/postgres/repositories/full_sync_log_repository_test.go rename to pkg/eth/datastore/postgres/repositories/full_sync_log_repository_test.go index 15999607..99abc7cd 100644 --- a/pkg/datastore/postgres/repositories/full_sync_log_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/full_sync_log_repository_test.go @@ -19,14 +19,14 @@ package repositories_test import ( "sort" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/full_sync_receipt_repository.go b/pkg/eth/datastore/postgres/repositories/full_sync_receipt_repository.go similarity index 96% rename from pkg/datastore/postgres/repositories/full_sync_receipt_repository.go rename to pkg/eth/datastore/postgres/repositories/full_sync_receipt_repository.go index 015ee2f6..c3bb7fd5 100644 --- a/pkg/datastore/postgres/repositories/full_sync_receipt_repository.go +++ b/pkg/eth/datastore/postgres/repositories/full_sync_receipt_repository.go @@ -22,9 +22,9 @@ import ( "github.com/jmoiron/sqlx" "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/libraries/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type FullSyncReceiptRepository struct { diff --git a/pkg/datastore/postgres/repositories/full_sync_receipt_repository_test.go b/pkg/eth/datastore/postgres/repositories/full_sync_receipt_repository_test.go similarity index 95% rename from pkg/datastore/postgres/repositories/full_sync_receipt_repository_test.go rename to pkg/eth/datastore/postgres/repositories/full_sync_receipt_repository_test.go index ed84c381..37959080 100644 --- a/pkg/datastore/postgres/repositories/full_sync_receipt_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/full_sync_receipt_repository_test.go @@ -19,11 +19,11 @@ package repositories_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/header_repository.go b/pkg/eth/datastore/postgres/repositories/header_repository.go similarity index 98% rename from pkg/datastore/postgres/repositories/header_repository.go rename to pkg/eth/datastore/postgres/repositories/header_repository.go index 1ed931b9..89e63cf0 100644 --- a/pkg/datastore/postgres/repositories/header_repository.go +++ b/pkg/eth/datastore/postgres/repositories/header_repository.go @@ -23,8 +23,8 @@ import ( "github.com/jmoiron/sqlx" log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) var ErrValidHeaderExists = errors.New("valid header already exists") diff --git a/pkg/datastore/postgres/repositories/header_repository_test.go b/pkg/eth/datastore/postgres/repositories/header_repository_test.go similarity index 98% rename from pkg/datastore/postgres/repositories/header_repository_test.go rename to pkg/eth/datastore/postgres/repositories/header_repository_test.go index f059752a..e966bffe 100644 --- a/pkg/datastore/postgres/repositories/header_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/header_repository_test.go @@ -26,9 +26,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/header_sync_log_repository.go b/pkg/eth/datastore/postgres/repositories/header_sync_log_repository.go similarity index 97% rename from pkg/datastore/postgres/repositories/header_sync_log_repository.go rename to pkg/eth/datastore/postgres/repositories/header_sync_log_repository.go index 17d5113b..f5459820 100644 --- a/pkg/datastore/postgres/repositories/header_sync_log_repository.go +++ b/pkg/eth/datastore/postgres/repositories/header_sync_log_repository.go @@ -23,8 +23,8 @@ import ( "github.com/lib/pq" "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/libraries/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) const insertHeaderSyncLogQuery = `INSERT INTO header_sync_logs diff --git a/pkg/datastore/postgres/repositories/header_sync_log_repository_test.go b/pkg/eth/datastore/postgres/repositories/header_sync_log_repository_test.go similarity index 96% rename from pkg/datastore/postgres/repositories/header_sync_log_repository_test.go rename to pkg/eth/datastore/postgres/repositories/header_sync_log_repository_test.go index d2e6c579..70790a0e 100644 --- a/pkg/datastore/postgres/repositories/header_sync_log_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/header_sync_log_repository_test.go @@ -24,10 +24,10 @@ import ( . "github.com/onsi/gomega" repository2 "github.com/vulcanize/vulcanizedb/libraries/shared/repository" "github.com/vulcanize/vulcanizedb/libraries/shared/test_data" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/header_sync_receipt_repository.go b/pkg/eth/datastore/postgres/repositories/header_sync_receipt_repository.go similarity index 97% rename from pkg/datastore/postgres/repositories/header_sync_receipt_repository.go rename to pkg/eth/datastore/postgres/repositories/header_sync_receipt_repository.go index 787c2650..579c7e12 100644 --- a/pkg/datastore/postgres/repositories/header_sync_receipt_repository.go +++ b/pkg/eth/datastore/postgres/repositories/header_sync_receipt_repository.go @@ -20,7 +20,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/jmoiron/sqlx" "github.com/vulcanize/vulcanizedb/libraries/shared/repository" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type HeaderSyncReceiptRepository struct{} diff --git a/pkg/datastore/postgres/repositories/header_sync_receipt_repository_test.go b/pkg/eth/datastore/postgres/repositories/header_sync_receipt_repository_test.go similarity index 95% rename from pkg/datastore/postgres/repositories/header_sync_receipt_repository_test.go rename to pkg/eth/datastore/postgres/repositories/header_sync_receipt_repository_test.go index f88abdc0..9383391f 100644 --- a/pkg/datastore/postgres/repositories/header_sync_receipt_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/header_sync_receipt_repository_test.go @@ -25,9 +25,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/log_filter_repository.go b/pkg/eth/datastore/postgres/repositories/log_filter_repository.go similarity index 93% rename from pkg/datastore/postgres/repositories/log_filter_repository.go rename to pkg/eth/datastore/postgres/repositories/log_filter_repository.go index 705f721e..094c142c 100644 --- a/pkg/datastore/postgres/repositories/log_filter_repository.go +++ b/pkg/eth/datastore/postgres/repositories/log_filter_repository.go @@ -22,9 +22,9 @@ import ( "encoding/json" "errors" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" ) type FilterRepository struct { diff --git a/pkg/datastore/postgres/repositories/log_filter_repository_test.go b/pkg/eth/datastore/postgres/repositories/log_filter_repository_test.go similarity index 93% rename from pkg/datastore/postgres/repositories/log_filter_repository_test.go rename to pkg/eth/datastore/postgres/repositories/log_filter_repository_test.go index 69f9b8e2..4468e9d1 100644 --- a/pkg/datastore/postgres/repositories/log_filter_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/log_filter_repository_test.go @@ -19,11 +19,11 @@ package repositories_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/repositories_suite_test.go b/pkg/eth/datastore/postgres/repositories/repositories_suite_test.go similarity index 100% rename from pkg/datastore/postgres/repositories/repositories_suite_test.go rename to pkg/eth/datastore/postgres/repositories/repositories_suite_test.go diff --git a/pkg/datastore/postgres/repositories/storage_diff_repository.go b/pkg/eth/datastore/postgres/repositories/storage_diff_repository.go similarity index 96% rename from pkg/datastore/postgres/repositories/storage_diff_repository.go rename to pkg/eth/datastore/postgres/repositories/storage_diff_repository.go index c5c76e46..56a9dbc3 100644 --- a/pkg/datastore/postgres/repositories/storage_diff_repository.go +++ b/pkg/eth/datastore/postgres/repositories/storage_diff_repository.go @@ -20,7 +20,7 @@ import ( "database/sql" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) var ErrDuplicateDiff = sql.ErrNoRows diff --git a/pkg/datastore/postgres/repositories/storage_diff_repository_test.go b/pkg/eth/datastore/postgres/repositories/storage_diff_repository_test.go similarity index 95% rename from pkg/datastore/postgres/repositories/storage_diff_repository_test.go rename to pkg/eth/datastore/postgres/repositories/storage_diff_repository_test.go index d6577dec..96542e00 100644 --- a/pkg/datastore/postgres/repositories/storage_diff_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/storage_diff_repository_test.go @@ -24,8 +24,8 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" "github.com/vulcanize/vulcanizedb/libraries/shared/test_data" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/postgres/repositories/watched_events_repository.go b/pkg/eth/datastore/postgres/repositories/watched_events_repository.go similarity index 93% rename from pkg/datastore/postgres/repositories/watched_events_repository.go rename to pkg/eth/datastore/postgres/repositories/watched_events_repository.go index 7cda002b..93e51f25 100644 --- a/pkg/datastore/postgres/repositories/watched_events_repository.go +++ b/pkg/eth/datastore/postgres/repositories/watched_events_repository.go @@ -18,8 +18,8 @@ package repositories import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) type WatchedEventRepository struct { diff --git a/pkg/datastore/postgres/repositories/watched_events_repository_test.go b/pkg/eth/datastore/postgres/repositories/watched_events_repository_test.go similarity index 95% rename from pkg/datastore/postgres/repositories/watched_events_repository_test.go rename to pkg/eth/datastore/postgres/repositories/watched_events_repository_test.go index d639381e..3e83b24e 100644 --- a/pkg/datastore/postgres/repositories/watched_events_repository_test.go +++ b/pkg/eth/datastore/postgres/repositories/watched_events_repository_test.go @@ -20,11 +20,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/datastore/repository.go b/pkg/eth/datastore/repository.go similarity index 96% rename from pkg/datastore/repository.go rename to pkg/eth/datastore/repository.go index 51d4b8a1..6eb90757 100644 --- a/pkg/datastore/repository.go +++ b/pkg/eth/datastore/repository.go @@ -20,8 +20,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/jmoiron/sqlx" "github.com/vulcanize/vulcanizedb/libraries/shared/storage/utils" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" ) type AddressRepository interface { diff --git a/pkg/fakes/checked_logs_repository.go b/pkg/eth/fakes/checked_logs_repository.go similarity index 100% rename from pkg/fakes/checked_logs_repository.go rename to pkg/eth/fakes/checked_logs_repository.go diff --git a/pkg/fakes/data.go b/pkg/eth/fakes/data.go similarity index 98% rename from pkg/fakes/data.go rename to pkg/eth/fakes/data.go index ca143a2f..f24a95f0 100644 --- a/pkg/fakes/data.go +++ b/pkg/eth/fakes/data.go @@ -27,7 +27,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) var ( diff --git a/pkg/fakes/mock_block_repository.go b/pkg/eth/fakes/mock_block_repository.go similarity index 99% rename from pkg/fakes/mock_block_repository.go rename to pkg/eth/fakes/mock_block_repository.go index 79077528..ae93657d 100644 --- a/pkg/fakes/mock_block_repository.go +++ b/pkg/eth/fakes/mock_block_repository.go @@ -19,7 +19,7 @@ package fakes import ( . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockBlockRepository struct { diff --git a/pkg/fakes/mock_blockchain.go b/pkg/eth/fakes/mock_blockchain.go similarity index 99% rename from pkg/fakes/mock_blockchain.go rename to pkg/eth/fakes/mock_blockchain.go index 7c360cc7..2847c66c 100644 --- a/pkg/fakes/mock_blockchain.go +++ b/pkg/eth/fakes/mock_blockchain.go @@ -25,7 +25,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockBlockChain struct { diff --git a/pkg/fakes/mock_checked_headers_repository.go b/pkg/eth/fakes/mock_checked_headers_repository.go similarity index 97% rename from pkg/fakes/mock_checked_headers_repository.go rename to pkg/eth/fakes/mock_checked_headers_repository.go index 4ef6b9c7..fa5000af 100644 --- a/pkg/fakes/mock_checked_headers_repository.go +++ b/pkg/eth/fakes/mock_checked_headers_repository.go @@ -17,7 +17,7 @@ package fakes import ( - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockCheckedHeadersRepository struct { diff --git a/pkg/fakes/mock_crypto_parser.go b/pkg/eth/fakes/mock_crypto_parser.go similarity index 100% rename from pkg/fakes/mock_crypto_parser.go rename to pkg/eth/fakes/mock_crypto_parser.go diff --git a/pkg/fakes/mock_eth_client.go b/pkg/eth/fakes/mock_eth_client.go similarity index 100% rename from pkg/fakes/mock_eth_client.go rename to pkg/eth/fakes/mock_eth_client.go diff --git a/pkg/fakes/mock_ethereum_database.go b/pkg/eth/fakes/mock_ethereum_database.go similarity index 100% rename from pkg/fakes/mock_ethereum_database.go rename to pkg/eth/fakes/mock_ethereum_database.go diff --git a/pkg/fakes/mock_filter_repository.go b/pkg/eth/fakes/mock_filter_repository.go similarity index 94% rename from pkg/fakes/mock_filter_repository.go rename to pkg/eth/fakes/mock_filter_repository.go index c4cf221a..eb95a793 100644 --- a/pkg/fakes/mock_filter_repository.go +++ b/pkg/eth/fakes/mock_filter_repository.go @@ -16,7 +16,7 @@ package fakes -import "github.com/vulcanize/vulcanizedb/pkg/filters" +import "github.com/vulcanize/vulcanizedb/pkg/eth/filters" type MockFilterRepository struct { } diff --git a/pkg/fakes/mock_fs_reader.go b/pkg/eth/fakes/mock_fs_reader.go similarity index 100% rename from pkg/fakes/mock_fs_reader.go rename to pkg/eth/fakes/mock_fs_reader.go diff --git a/pkg/fakes/mock_full_sync_block_retriever.go b/pkg/eth/fakes/mock_full_sync_block_retriever.go similarity index 100% rename from pkg/fakes/mock_full_sync_block_retriever.go rename to pkg/eth/fakes/mock_full_sync_block_retriever.go diff --git a/pkg/fakes/mock_header_repository.go b/pkg/eth/fakes/mock_header_repository.go similarity index 98% rename from pkg/fakes/mock_header_repository.go rename to pkg/eth/fakes/mock_header_repository.go index 8f268146..e0002d96 100644 --- a/pkg/fakes/mock_header_repository.go +++ b/pkg/eth/fakes/mock_header_repository.go @@ -19,7 +19,7 @@ package fakes import ( . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockHeaderRepository struct { diff --git a/pkg/fakes/mock_header_sync_block_retriever.go b/pkg/eth/fakes/mock_header_sync_block_retriever.go similarity index 100% rename from pkg/fakes/mock_header_sync_block_retriever.go rename to pkg/eth/fakes/mock_header_sync_block_retriever.go diff --git a/pkg/fakes/mock_header_sync_header_repository.go b/pkg/eth/fakes/mock_header_sync_header_repository.go similarity index 95% rename from pkg/fakes/mock_header_sync_header_repository.go rename to pkg/eth/fakes/mock_header_sync_header_repository.go index 31128f85..1dc5d79f 100644 --- a/pkg/fakes/mock_header_sync_header_repository.go +++ b/pkg/eth/fakes/mock_header_sync_header_repository.go @@ -1,6 +1,6 @@ package fakes -import "github.com/vulcanize/vulcanizedb/pkg/core" +import "github.com/vulcanize/vulcanizedb/pkg/eth/core" type MockHeaderSyncHeaderRepository struct { } diff --git a/pkg/fakes/mock_header_sync_log_repository.go b/pkg/eth/fakes/mock_header_sync_log_repository.go similarity index 96% rename from pkg/fakes/mock_header_sync_log_repository.go rename to pkg/eth/fakes/mock_header_sync_log_repository.go index 5fca524b..6cd7e890 100644 --- a/pkg/fakes/mock_header_sync_log_repository.go +++ b/pkg/eth/fakes/mock_header_sync_log_repository.go @@ -18,7 +18,7 @@ package fakes import ( "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockHeaderSyncLogRepository struct { diff --git a/pkg/fakes/mock_level_database_reader.go b/pkg/eth/fakes/mock_level_database_reader.go similarity index 100% rename from pkg/fakes/mock_level_database_reader.go rename to pkg/eth/fakes/mock_level_database_reader.go diff --git a/pkg/fakes/mock_parser.go b/pkg/eth/fakes/mock_parser.go similarity index 95% rename from pkg/fakes/mock_parser.go rename to pkg/eth/fakes/mock_parser.go index 03ca5a07..6a8ef9a9 100644 --- a/pkg/fakes/mock_parser.go +++ b/pkg/eth/fakes/mock_parser.go @@ -18,7 +18,7 @@ package fakes import ( "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/types" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/types" ) type MockParser struct { diff --git a/pkg/fakes/mock_poller.go b/pkg/eth/fakes/mock_poller.go similarity index 94% rename from pkg/fakes/mock_poller.go rename to pkg/eth/fakes/mock_poller.go index 7b2fe848..3814ce5b 100644 --- a/pkg/fakes/mock_poller.go +++ b/pkg/eth/fakes/mock_poller.go @@ -17,7 +17,7 @@ package fakes import ( - "github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract" + "github.com/vulcanize/vulcanizedb/pkg/eth/contract_watcher/shared/contract" ) type MockPoller struct { diff --git a/pkg/fakes/mock_receipt_repository.go b/pkg/eth/fakes/mock_receipt_repository.go similarity index 98% rename from pkg/fakes/mock_receipt_repository.go rename to pkg/eth/fakes/mock_receipt_repository.go index d185cf76..1a9e5209 100644 --- a/pkg/fakes/mock_receipt_repository.go +++ b/pkg/eth/fakes/mock_receipt_repository.go @@ -20,7 +20,7 @@ import ( "github.com/jmoiron/sqlx" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockReceiptRepository struct { diff --git a/pkg/fakes/mock_rpc_client.go b/pkg/eth/fakes/mock_rpc_client.go similarity index 99% rename from pkg/fakes/mock_rpc_client.go rename to pkg/eth/fakes/mock_rpc_client.go index 3b199c13..0827b87e 100644 --- a/pkg/fakes/mock_rpc_client.go +++ b/pkg/eth/fakes/mock_rpc_client.go @@ -25,8 +25,8 @@ import ( "github.com/ethereum/go-ethereum/rpc" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/eth/client" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockRPCClient struct { diff --git a/pkg/fakes/mock_storage_diff_repository.go b/pkg/eth/fakes/mock_storage_diff_repository.go similarity index 100% rename from pkg/fakes/mock_storage_diff_repository.go rename to pkg/eth/fakes/mock_storage_diff_repository.go diff --git a/pkg/fakes/mock_tailer.go b/pkg/eth/fakes/mock_tailer.go similarity index 100% rename from pkg/fakes/mock_tailer.go rename to pkg/eth/fakes/mock_tailer.go diff --git a/pkg/fakes/mock_transaction_converter.go b/pkg/eth/fakes/mock_transaction_converter.go similarity index 97% rename from pkg/fakes/mock_transaction_converter.go rename to pkg/eth/fakes/mock_transaction_converter.go index 4d4f1262..f7b47020 100644 --- a/pkg/fakes/mock_transaction_converter.go +++ b/pkg/eth/fakes/mock_transaction_converter.go @@ -18,7 +18,7 @@ package fakes import ( "github.com/ethereum/go-ethereum/core/types" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type MockTransactionConverter struct { diff --git a/pkg/fakes/mock_transaction_syncer.go b/pkg/eth/fakes/mock_transaction_syncer.go similarity index 100% rename from pkg/fakes/mock_transaction_syncer.go rename to pkg/eth/fakes/mock_transaction_syncer.go diff --git a/pkg/filters/filter_query.go b/pkg/eth/filters/filter_query.go similarity index 97% rename from pkg/filters/filter_query.go rename to pkg/eth/filters/filter_query.go index 6db68638..38ce8d96 100644 --- a/pkg/filters/filter_query.go +++ b/pkg/eth/filters/filter_query.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type LogFilters []LogFilter diff --git a/pkg/filters/filter_test.go b/pkg/eth/filters/filter_test.go similarity index 98% rename from pkg/filters/filter_test.go rename to pkg/eth/filters/filter_test.go index 9c4e8b79..32c5a90c 100644 --- a/pkg/filters/filter_test.go +++ b/pkg/eth/filters/filter_test.go @@ -21,8 +21,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/filters" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/filters" ) var _ = Describe("Log filters", func() { diff --git a/pkg/filters/query_builder_suite_test.go b/pkg/eth/filters/query_builder_suite_test.go similarity index 100% rename from pkg/filters/query_builder_suite_test.go rename to pkg/eth/filters/query_builder_suite_test.go diff --git a/pkg/history/block_validator.go b/pkg/eth/history/block_validator.go similarity index 95% rename from pkg/history/block_validator.go rename to pkg/eth/history/block_validator.go index d7b41a8d..6cc3958b 100644 --- a/pkg/history/block_validator.go +++ b/pkg/eth/history/block_validator.go @@ -18,8 +18,8 @@ package history import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" ) type BlockValidator struct { diff --git a/pkg/history/block_validator_test.go b/pkg/eth/history/block_validator_test.go similarity index 94% rename from pkg/history/block_validator_test.go rename to pkg/eth/history/block_validator_test.go index 6548fc2d..b82a58d1 100644 --- a/pkg/history/block_validator_test.go +++ b/pkg/eth/history/block_validator_test.go @@ -22,8 +22,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/fakes" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Blocks validator", func() { diff --git a/pkg/history/header_validator.go b/pkg/eth/history/header_validator.go similarity index 94% rename from pkg/history/header_validator.go rename to pkg/eth/history/header_validator.go index 5065f65c..f68aa80d 100644 --- a/pkg/history/header_validator.go +++ b/pkg/eth/history/header_validator.go @@ -18,8 +18,8 @@ package history import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" ) type HeaderValidator struct { diff --git a/pkg/history/header_validator_test.go b/pkg/eth/history/header_validator_test.go similarity index 94% rename from pkg/history/header_validator_test.go rename to pkg/eth/history/header_validator_test.go index b77d50cf..2578c29b 100644 --- a/pkg/history/header_validator_test.go +++ b/pkg/eth/history/header_validator_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/fakes" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Header validator", func() { diff --git a/pkg/history/history_suite_test.go b/pkg/eth/history/history_suite_test.go similarity index 100% rename from pkg/history/history_suite_test.go rename to pkg/eth/history/history_suite_test.go diff --git a/pkg/history/populate_blocks.go b/pkg/eth/history/populate_blocks.go similarity index 95% rename from pkg/history/populate_blocks.go rename to pkg/eth/history/populate_blocks.go index 846add53..b3bf064b 100644 --- a/pkg/history/populate_blocks.go +++ b/pkg/eth/history/populate_blocks.go @@ -21,8 +21,8 @@ import ( log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" ) func PopulateMissingBlocks(blockchain core.BlockChain, blockRepository datastore.BlockRepository, startingBlockNumber int64) (int, error) { diff --git a/pkg/history/populate_blocks_test.go b/pkg/eth/history/populate_blocks_test.go similarity index 96% rename from pkg/history/populate_blocks_test.go rename to pkg/eth/history/populate_blocks_test.go index 5629d52e..5e00c3d7 100644 --- a/pkg/history/populate_blocks_test.go +++ b/pkg/eth/history/populate_blocks_test.go @@ -21,8 +21,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/fakes" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Populating blocks", func() { diff --git a/pkg/history/populate_headers.go b/pkg/eth/history/populate_headers.go similarity index 92% rename from pkg/history/populate_headers.go rename to pkg/eth/history/populate_headers.go index 05c6f5b9..d5138e29 100644 --- a/pkg/history/populate_headers.go +++ b/pkg/eth/history/populate_headers.go @@ -19,9 +19,9 @@ package history import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" ) func PopulateMissingHeaders(blockChain core.BlockChain, headerRepository datastore.HeaderRepository, startingBlockNumber int64) (int, error) { diff --git a/pkg/history/populate_headers_test.go b/pkg/eth/history/populate_headers_test.go similarity index 95% rename from pkg/history/populate_headers_test.go rename to pkg/eth/history/populate_headers_test.go index 2a5fa37c..c85fd2a7 100644 --- a/pkg/history/populate_headers_test.go +++ b/pkg/eth/history/populate_headers_test.go @@ -22,8 +22,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/fakes" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Populating headers", func() { diff --git a/pkg/history/validation_window.go b/pkg/eth/history/validation_window.go similarity index 97% rename from pkg/history/validation_window.go rename to pkg/eth/history/validation_window.go index 305c0eec..d9e46a1a 100644 --- a/pkg/history/validation_window.go +++ b/pkg/eth/history/validation_window.go @@ -21,7 +21,7 @@ import ( log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type ValidationWindow struct { diff --git a/pkg/history/validation_window_test.go b/pkg/eth/history/validation_window_test.go similarity index 93% rename from pkg/history/validation_window_test.go rename to pkg/eth/history/validation_window_test.go index d12427bd..1a832d7e 100644 --- a/pkg/history/validation_window_test.go +++ b/pkg/eth/history/validation_window_test.go @@ -22,8 +22,8 @@ import ( "math/big" - "github.com/vulcanize/vulcanizedb/pkg/fakes" - "github.com/vulcanize/vulcanizedb/pkg/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/history" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var _ = Describe("Validation window", func() { diff --git a/pkg/eth/node/node.go b/pkg/eth/node/node.go index a60d271e..d5ce5c97 100644 --- a/pkg/eth/node/node.go +++ b/pkg/eth/node/node.go @@ -26,7 +26,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) type IPropertiesReader interface { diff --git a/pkg/eth/node/node_test.go b/pkg/eth/node/node_test.go index e8dcfe9a..ac90d2a9 100644 --- a/pkg/eth/node/node_test.go +++ b/pkg/eth/node/node_test.go @@ -22,9 +22,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" "github.com/vulcanize/vulcanizedb/pkg/eth/node" - "github.com/vulcanize/vulcanizedb/pkg/fakes" + "github.com/vulcanize/vulcanizedb/pkg/eth/fakes" ) var EmpytHeaderHash = "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" diff --git a/pkg/eth/testing/helpers.go b/pkg/eth/testing/helpers.go index 94537919..eb3f9c4d 100644 --- a/pkg/eth/testing/helpers.go +++ b/pkg/eth/testing/helpers.go @@ -18,8 +18,8 @@ package testing import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/eth" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" "github.com/vulcanize/vulcanizedb/test_config" ) diff --git a/pkg/super_node/api.go b/pkg/super_node/api.go index 39a6f148..ec9ae72e 100644 --- a/pkg/super_node/api.go +++ b/pkg/super_node/api.go @@ -22,7 +22,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) // APIName is the namespace used for the state diffing service API diff --git a/pkg/super_node/config/config.go b/pkg/super_node/config/config.go index 04fc8195..ce4e096f 100644 --- a/pkg/super_node/config/config.go +++ b/pkg/super_node/config/config.go @@ -27,11 +27,11 @@ import ( "github.com/spf13/viper" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/eth" "github.com/vulcanize/vulcanizedb/pkg/eth/client" vRpc "github.com/vulcanize/vulcanizedb/pkg/eth/converters/rpc" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/eth/node" "github.com/vulcanize/vulcanizedb/utils" ) diff --git a/pkg/super_node/constructors.go b/pkg/super_node/constructors.go index d7cc5ae9..ee384fd8 100644 --- a/pkg/super_node/constructors.go +++ b/pkg/super_node/constructors.go @@ -24,8 +24,8 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/super_node/config" "github.com/vulcanize/vulcanizedb/pkg/super_node/eth" ) diff --git a/pkg/super_node/eth/backend.go b/pkg/super_node/eth/backend.go index b929e583..476745b5 100644 --- a/pkg/super_node/eth/backend.go +++ b/pkg/super_node/eth/backend.go @@ -28,7 +28,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/super_node/config" ) diff --git a/pkg/super_node/eth/indexer.go b/pkg/super_node/eth/indexer.go index 7c7d90ab..9e93e2bc 100644 --- a/pkg/super_node/eth/indexer.go +++ b/pkg/super_node/eth/indexer.go @@ -24,7 +24,7 @@ import ( "github.com/lib/pq" log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // Indexer satisfies the Indexer interface for ethereum diff --git a/pkg/super_node/eth/indexer_test.go b/pkg/super_node/eth/indexer_test.go index 6eeadd0a..804e4b7a 100644 --- a/pkg/super_node/eth/indexer_test.go +++ b/pkg/super_node/eth/indexer_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/pkg/super_node/shared" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/super_node/eth" eth2 "github.com/vulcanize/vulcanizedb/pkg/super_node/eth" "github.com/vulcanize/vulcanizedb/pkg/super_node/eth/mocks" diff --git a/pkg/super_node/eth/mocks/retriever.go b/pkg/super_node/eth/mocks/retriever.go index 3620514e..0a678e6f 100644 --- a/pkg/super_node/eth/mocks/retriever.go +++ b/pkg/super_node/eth/mocks/retriever.go @@ -17,7 +17,7 @@ package mocks import ( - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/super_node/shared" ) diff --git a/pkg/super_node/eth/retriever.go b/pkg/super_node/eth/retriever.go index 2b71cff8..7f645d6c 100644 --- a/pkg/super_node/eth/retriever.go +++ b/pkg/super_node/eth/retriever.go @@ -26,7 +26,7 @@ import ( "github.com/lib/pq" log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/super_node/config" "github.com/vulcanize/vulcanizedb/pkg/super_node/shared" ) diff --git a/pkg/super_node/eth/retriever_test.go b/pkg/super_node/eth/retriever_test.go index 31360ed6..5311794f 100644 --- a/pkg/super_node/eth/retriever_test.go +++ b/pkg/super_node/eth/retriever_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/super_node/config" "github.com/vulcanize/vulcanizedb/pkg/super_node/eth" eth2 "github.com/vulcanize/vulcanizedb/pkg/super_node/eth" diff --git a/pkg/super_node/eth/streamer.go b/pkg/super_node/eth/streamer.go index 0e88463c..d3ae236a 100644 --- a/pkg/super_node/eth/streamer.go +++ b/pkg/super_node/eth/streamer.go @@ -20,7 +20,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" ) const ( diff --git a/pkg/super_node/eth/test_helpers.go b/pkg/super_node/eth/test_helpers.go index d56772bf..2279ba87 100644 --- a/pkg/super_node/eth/test_helpers.go +++ b/pkg/super_node/eth/test_helpers.go @@ -20,8 +20,8 @@ import ( . "github.com/onsi/gomega" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" ) // SetupDB is use to setup a db for super node tests diff --git a/pkg/super_node/service.go b/pkg/super_node/service.go index 9c72c1a1..ab1471d7 100644 --- a/pkg/super_node/service.go +++ b/pkg/super_node/service.go @@ -29,8 +29,8 @@ import ( "github.com/ethereum/go-ethereum/rpc" log "github.com/sirupsen/logrus" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/ipfs" "github.com/vulcanize/vulcanizedb/pkg/super_node/config" "github.com/vulcanize/vulcanizedb/pkg/super_node/shared" diff --git a/test_config/test_config.go b/test_config/test_config.go index fc8dc1fc..72ba8fcb 100644 --- a/test_config/test_config.go +++ b/test_config/test_config.go @@ -23,9 +23,9 @@ import ( "github.com/sirupsen/logrus" "github.com/spf13/viper" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres/repositories" "os" ) diff --git a/utils/utils.go b/utils/utils.go index 768205e2..3bfa83b8 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -25,8 +25,8 @@ import ( "github.com/sirupsen/logrus" "github.com/vulcanize/vulcanizedb/pkg/config" - "github.com/vulcanize/vulcanizedb/pkg/core" - "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" + "github.com/vulcanize/vulcanizedb/pkg/eth/core" + "github.com/vulcanize/vulcanizedb/pkg/eth/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/eth" )