diff --git a/Cargo.toml b/Cargo.toml index d8c60c77af..6ac171fd9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -120,7 +120,8 @@ members = [ "nym-outfox", "nym-statistics-api", "nym-validator-rewarder", - "nyx-chain-watcher", + "nyx-chain-watcher/pgsql", + "nyx-chain-watcher/sqlite", "sdk/ffi/cpp", "sdk/ffi/go", "sdk/ffi/shared", diff --git a/nyx-chain-watcher/.sqlx/query-140df23f816ff5d7501128682ce378d582b7da78c45bc0de934f92c1abe14bda.json b/nyx-chain-watcher/pgsql/.sqlx/query-140df23f816ff5d7501128682ce378d582b7da78c45bc0de934f92c1abe14bda.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-140df23f816ff5d7501128682ce378d582b7da78c45bc0de934f92c1abe14bda.json rename to nyx-chain-watcher/pgsql/.sqlx/query-140df23f816ff5d7501128682ce378d582b7da78c45bc0de934f92c1abe14bda.json diff --git a/nyx-chain-watcher/.sqlx/query-1aa7733ad4bbf3e6b8db909b8646bee247bc021b9534f1d4b0fcad32e2e56218.json b/nyx-chain-watcher/pgsql/.sqlx/query-1aa7733ad4bbf3e6b8db909b8646bee247bc021b9534f1d4b0fcad32e2e56218.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-1aa7733ad4bbf3e6b8db909b8646bee247bc021b9534f1d4b0fcad32e2e56218.json rename to nyx-chain-watcher/pgsql/.sqlx/query-1aa7733ad4bbf3e6b8db909b8646bee247bc021b9534f1d4b0fcad32e2e56218.json diff --git a/nyx-chain-watcher/.sqlx/query-5fcd0f525ab790a7ebe8659d6cf3f3707065e7e34e920c49f2d50bef7ab9a968.json b/nyx-chain-watcher/pgsql/.sqlx/query-5fcd0f525ab790a7ebe8659d6cf3f3707065e7e34e920c49f2d50bef7ab9a968.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-5fcd0f525ab790a7ebe8659d6cf3f3707065e7e34e920c49f2d50bef7ab9a968.json rename to nyx-chain-watcher/pgsql/.sqlx/query-5fcd0f525ab790a7ebe8659d6cf3f3707065e7e34e920c49f2d50bef7ab9a968.json diff --git a/nyx-chain-watcher/.sqlx/query-83df8a7c5fb24ba4d89f1feb300a8f6d4ac14e7e9b7b482bd57fae568ebd96ba.json b/nyx-chain-watcher/pgsql/.sqlx/query-83df8a7c5fb24ba4d89f1feb300a8f6d4ac14e7e9b7b482bd57fae568ebd96ba.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-83df8a7c5fb24ba4d89f1feb300a8f6d4ac14e7e9b7b482bd57fae568ebd96ba.json rename to nyx-chain-watcher/pgsql/.sqlx/query-83df8a7c5fb24ba4d89f1feb300a8f6d4ac14e7e9b7b482bd57fae568ebd96ba.json diff --git a/nyx-chain-watcher/.sqlx/query-a57b74a049b33aee36b72741056d60df8ad35a747808d5d1d3d525a76bbf0618.json b/nyx-chain-watcher/pgsql/.sqlx/query-a57b74a049b33aee36b72741056d60df8ad35a747808d5d1d3d525a76bbf0618.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-a57b74a049b33aee36b72741056d60df8ad35a747808d5d1d3d525a76bbf0618.json rename to nyx-chain-watcher/pgsql/.sqlx/query-a57b74a049b33aee36b72741056d60df8ad35a747808d5d1d3d525a76bbf0618.json diff --git a/nyx-chain-watcher/.sqlx/query-a9d6227ecfa9866096da1367518612f219ae969e98b331af04381429fef8716c.json b/nyx-chain-watcher/pgsql/.sqlx/query-a9d6227ecfa9866096da1367518612f219ae969e98b331af04381429fef8716c.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-a9d6227ecfa9866096da1367518612f219ae969e98b331af04381429fef8716c.json rename to nyx-chain-watcher/pgsql/.sqlx/query-a9d6227ecfa9866096da1367518612f219ae969e98b331af04381429fef8716c.json diff --git a/nyx-chain-watcher/.sqlx/query-f69907735e9b1e1572c4bf6fe8d44d4ea4e55c2a9c4d4f7e1c7e57bcb848ee08.json b/nyx-chain-watcher/pgsql/.sqlx/query-f69907735e9b1e1572c4bf6fe8d44d4ea4e55c2a9c4d4f7e1c7e57bcb848ee08.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-f69907735e9b1e1572c4bf6fe8d44d4ea4e55c2a9c4d4f7e1c7e57bcb848ee08.json rename to nyx-chain-watcher/pgsql/.sqlx/query-f69907735e9b1e1572c4bf6fe8d44d4ea4e55c2a9c4d4f7e1c7e57bcb848ee08.json diff --git a/nyx-chain-watcher/.sqlx/query-f81a3275a1c7cbeefb3fdf7904c677d46a284e0446b96a2fc5bd77630c62d4b8.json b/nyx-chain-watcher/pgsql/.sqlx/query-f81a3275a1c7cbeefb3fdf7904c677d46a284e0446b96a2fc5bd77630c62d4b8.json similarity index 100% rename from nyx-chain-watcher/.sqlx/query-f81a3275a1c7cbeefb3fdf7904c677d46a284e0446b96a2fc5bd77630c62d4b8.json rename to nyx-chain-watcher/pgsql/.sqlx/query-f81a3275a1c7cbeefb3fdf7904c677d46a284e0446b96a2fc5bd77630c62d4b8.json diff --git a/nyx-chain-watcher/Cargo.toml b/nyx-chain-watcher/pgsql/Cargo.toml similarity index 97% rename from nyx-chain-watcher/Cargo.toml rename to nyx-chain-watcher/pgsql/Cargo.toml index 1f93c8bfea..b036688b5e 100644 --- a/nyx-chain-watcher/Cargo.toml +++ b/nyx-chain-watcher/pgsql/Cargo.toml @@ -2,8 +2,8 @@ # SPDX-License-Identifier: GPL-3.0-only [package] -name = "nyx-chain-watcher" -version = "0.1.14" +name = "nyx-chain-watcher-pgsql" +version = "0.1.0" authors.workspace = true repository.workspace = true homepage.workspace = true diff --git a/nyx-chain-watcher/Dockerfile b/nyx-chain-watcher/pgsql/Dockerfile similarity index 100% rename from nyx-chain-watcher/Dockerfile rename to nyx-chain-watcher/pgsql/Dockerfile diff --git a/nyx-chain-watcher/README.md b/nyx-chain-watcher/pgsql/README.md similarity index 100% rename from nyx-chain-watcher/README.md rename to nyx-chain-watcher/pgsql/README.md diff --git a/nyx-chain-watcher/README_SQLX.md b/nyx-chain-watcher/pgsql/README_SQLX.md similarity index 100% rename from nyx-chain-watcher/README_SQLX.md rename to nyx-chain-watcher/pgsql/README_SQLX.md diff --git a/nyx-chain-watcher/build.rs b/nyx-chain-watcher/pgsql/build.rs similarity index 100% rename from nyx-chain-watcher/build.rs rename to nyx-chain-watcher/pgsql/build.rs diff --git a/nyx-chain-watcher/migrations/001_price_data.sql b/nyx-chain-watcher/pgsql/migrations/001_price_data.sql similarity index 100% rename from nyx-chain-watcher/migrations/001_price_data.sql rename to nyx-chain-watcher/pgsql/migrations/001_price_data.sql diff --git a/nyx-chain-watcher/migrations/002_payment_transactions.sql b/nyx-chain-watcher/pgsql/migrations/002_payment_transactions.sql similarity index 100% rename from nyx-chain-watcher/migrations/002_payment_transactions.sql rename to nyx-chain-watcher/pgsql/migrations/002_payment_transactions.sql diff --git a/nyx-chain-watcher/migrations/003_create_transactions_table.sql b/nyx-chain-watcher/pgsql/migrations/003_create_transactions_table.sql similarity index 100% rename from nyx-chain-watcher/migrations/003_create_transactions_table.sql rename to nyx-chain-watcher/pgsql/migrations/003_create_transactions_table.sql diff --git a/nyx-chain-watcher/migrations/004_add_gbp_column.sql b/nyx-chain-watcher/pgsql/migrations/004_add_gbp_column.sql similarity index 100% rename from nyx-chain-watcher/migrations/004_add_gbp_column.sql rename to nyx-chain-watcher/pgsql/migrations/004_add_gbp_column.sql diff --git a/nyx-chain-watcher/migrations/005_add_listener_failure_table.sql b/nyx-chain-watcher/pgsql/migrations/005_add_listener_failure_table.sql similarity index 100% rename from nyx-chain-watcher/migrations/005_add_listener_failure_table.sql rename to nyx-chain-watcher/pgsql/migrations/005_add_listener_failure_table.sql diff --git a/nyx-chain-watcher/src/chain_scraper/mod.rs b/nyx-chain-watcher/pgsql/src/chain_scraper/mod.rs similarity index 100% rename from nyx-chain-watcher/src/chain_scraper/mod.rs rename to nyx-chain-watcher/pgsql/src/chain_scraper/mod.rs diff --git a/nyx-chain-watcher/src/cli/commands/build_info.rs b/nyx-chain-watcher/pgsql/src/cli/commands/build_info.rs similarity index 100% rename from nyx-chain-watcher/src/cli/commands/build_info.rs rename to nyx-chain-watcher/pgsql/src/cli/commands/build_info.rs diff --git a/nyx-chain-watcher/src/cli/commands/init.rs b/nyx-chain-watcher/pgsql/src/cli/commands/init.rs similarity index 100% rename from nyx-chain-watcher/src/cli/commands/init.rs rename to nyx-chain-watcher/pgsql/src/cli/commands/init.rs diff --git a/nyx-chain-watcher/src/cli/commands/mod.rs b/nyx-chain-watcher/pgsql/src/cli/commands/mod.rs similarity index 100% rename from nyx-chain-watcher/src/cli/commands/mod.rs rename to nyx-chain-watcher/pgsql/src/cli/commands/mod.rs diff --git a/nyx-chain-watcher/src/cli/commands/run/args.rs b/nyx-chain-watcher/pgsql/src/cli/commands/run/args.rs similarity index 100% rename from nyx-chain-watcher/src/cli/commands/run/args.rs rename to nyx-chain-watcher/pgsql/src/cli/commands/run/args.rs diff --git a/nyx-chain-watcher/src/cli/commands/run/config.rs b/nyx-chain-watcher/pgsql/src/cli/commands/run/config.rs similarity index 100% rename from nyx-chain-watcher/src/cli/commands/run/config.rs rename to nyx-chain-watcher/pgsql/src/cli/commands/run/config.rs diff --git a/nyx-chain-watcher/src/cli/commands/run/mod.rs b/nyx-chain-watcher/pgsql/src/cli/commands/run/mod.rs similarity index 100% rename from nyx-chain-watcher/src/cli/commands/run/mod.rs rename to nyx-chain-watcher/pgsql/src/cli/commands/run/mod.rs diff --git a/nyx-chain-watcher/src/cli/mod.rs b/nyx-chain-watcher/pgsql/src/cli/mod.rs similarity index 100% rename from nyx-chain-watcher/src/cli/mod.rs rename to nyx-chain-watcher/pgsql/src/cli/mod.rs diff --git a/nyx-chain-watcher/src/config/mod.rs b/nyx-chain-watcher/pgsql/src/config/mod.rs similarity index 100% rename from nyx-chain-watcher/src/config/mod.rs rename to nyx-chain-watcher/pgsql/src/config/mod.rs diff --git a/nyx-chain-watcher/src/config/payments_watcher.rs b/nyx-chain-watcher/pgsql/src/config/payments_watcher.rs similarity index 100% rename from nyx-chain-watcher/src/config/payments_watcher.rs rename to nyx-chain-watcher/pgsql/src/config/payments_watcher.rs diff --git a/nyx-chain-watcher/src/config/template.rs b/nyx-chain-watcher/pgsql/src/config/template.rs similarity index 100% rename from nyx-chain-watcher/src/config/template.rs rename to nyx-chain-watcher/pgsql/src/config/template.rs diff --git a/nyx-chain-watcher/src/db/mod.rs b/nyx-chain-watcher/pgsql/src/db/mod.rs similarity index 100% rename from nyx-chain-watcher/src/db/mod.rs rename to nyx-chain-watcher/pgsql/src/db/mod.rs diff --git a/nyx-chain-watcher/src/db/models.rs b/nyx-chain-watcher/pgsql/src/db/models.rs similarity index 100% rename from nyx-chain-watcher/src/db/models.rs rename to nyx-chain-watcher/pgsql/src/db/models.rs diff --git a/nyx-chain-watcher/src/db/queries/mod.rs b/nyx-chain-watcher/pgsql/src/db/queries/mod.rs similarity index 100% rename from nyx-chain-watcher/src/db/queries/mod.rs rename to nyx-chain-watcher/pgsql/src/db/queries/mod.rs diff --git a/nyx-chain-watcher/src/db/queries/payments.rs b/nyx-chain-watcher/pgsql/src/db/queries/payments.rs similarity index 100% rename from nyx-chain-watcher/src/db/queries/payments.rs rename to nyx-chain-watcher/pgsql/src/db/queries/payments.rs diff --git a/nyx-chain-watcher/src/db/queries/price.rs b/nyx-chain-watcher/pgsql/src/db/queries/price.rs similarity index 100% rename from nyx-chain-watcher/src/db/queries/price.rs rename to nyx-chain-watcher/pgsql/src/db/queries/price.rs diff --git a/nyx-chain-watcher/src/env.rs b/nyx-chain-watcher/pgsql/src/env.rs similarity index 100% rename from nyx-chain-watcher/src/env.rs rename to nyx-chain-watcher/pgsql/src/env.rs diff --git a/nyx-chain-watcher/src/error.rs b/nyx-chain-watcher/pgsql/src/error.rs similarity index 100% rename from nyx-chain-watcher/src/error.rs rename to nyx-chain-watcher/pgsql/src/error.rs diff --git a/nyx-chain-watcher/src/helpers.rs b/nyx-chain-watcher/pgsql/src/helpers.rs similarity index 100% rename from nyx-chain-watcher/src/helpers.rs rename to nyx-chain-watcher/pgsql/src/helpers.rs diff --git a/nyx-chain-watcher/src/http/api/mod.rs b/nyx-chain-watcher/pgsql/src/http/api/mod.rs similarity index 100% rename from nyx-chain-watcher/src/http/api/mod.rs rename to nyx-chain-watcher/pgsql/src/http/api/mod.rs diff --git a/nyx-chain-watcher/src/http/api/price.rs b/nyx-chain-watcher/pgsql/src/http/api/price.rs similarity index 100% rename from nyx-chain-watcher/src/http/api/price.rs rename to nyx-chain-watcher/pgsql/src/http/api/price.rs diff --git a/nyx-chain-watcher/src/http/api/status.rs b/nyx-chain-watcher/pgsql/src/http/api/status.rs similarity index 100% rename from nyx-chain-watcher/src/http/api/status.rs rename to nyx-chain-watcher/pgsql/src/http/api/status.rs diff --git a/nyx-chain-watcher/src/http/api/watcher.rs b/nyx-chain-watcher/pgsql/src/http/api/watcher.rs similarity index 100% rename from nyx-chain-watcher/src/http/api/watcher.rs rename to nyx-chain-watcher/pgsql/src/http/api/watcher.rs diff --git a/nyx-chain-watcher/src/http/api_docs.rs b/nyx-chain-watcher/pgsql/src/http/api_docs.rs similarity index 100% rename from nyx-chain-watcher/src/http/api_docs.rs rename to nyx-chain-watcher/pgsql/src/http/api_docs.rs diff --git a/nyx-chain-watcher/src/http/error.rs b/nyx-chain-watcher/pgsql/src/http/error.rs similarity index 100% rename from nyx-chain-watcher/src/http/error.rs rename to nyx-chain-watcher/pgsql/src/http/error.rs diff --git a/nyx-chain-watcher/src/http/mod.rs b/nyx-chain-watcher/pgsql/src/http/mod.rs similarity index 100% rename from nyx-chain-watcher/src/http/mod.rs rename to nyx-chain-watcher/pgsql/src/http/mod.rs diff --git a/nyx-chain-watcher/src/http/models.rs b/nyx-chain-watcher/pgsql/src/http/models.rs similarity index 100% rename from nyx-chain-watcher/src/http/models.rs rename to nyx-chain-watcher/pgsql/src/http/models.rs diff --git a/nyx-chain-watcher/src/http/server.rs b/nyx-chain-watcher/pgsql/src/http/server.rs similarity index 100% rename from nyx-chain-watcher/src/http/server.rs rename to nyx-chain-watcher/pgsql/src/http/server.rs diff --git a/nyx-chain-watcher/src/http/state.rs b/nyx-chain-watcher/pgsql/src/http/state.rs similarity index 100% rename from nyx-chain-watcher/src/http/state.rs rename to nyx-chain-watcher/pgsql/src/http/state.rs diff --git a/nyx-chain-watcher/src/logging.rs b/nyx-chain-watcher/pgsql/src/logging.rs similarity index 100% rename from nyx-chain-watcher/src/logging.rs rename to nyx-chain-watcher/pgsql/src/logging.rs diff --git a/nyx-chain-watcher/src/main.rs b/nyx-chain-watcher/pgsql/src/main.rs similarity index 100% rename from nyx-chain-watcher/src/main.rs rename to nyx-chain-watcher/pgsql/src/main.rs diff --git a/nyx-chain-watcher/src/models.rs b/nyx-chain-watcher/pgsql/src/models.rs similarity index 100% rename from nyx-chain-watcher/src/models.rs rename to nyx-chain-watcher/pgsql/src/models.rs diff --git a/nyx-chain-watcher/src/payment_listener/mod.rs b/nyx-chain-watcher/pgsql/src/payment_listener/mod.rs similarity index 100% rename from nyx-chain-watcher/src/payment_listener/mod.rs rename to nyx-chain-watcher/pgsql/src/payment_listener/mod.rs diff --git a/nyx-chain-watcher/src/payment_listener/watcher.rs b/nyx-chain-watcher/pgsql/src/payment_listener/watcher.rs similarity index 100% rename from nyx-chain-watcher/src/payment_listener/watcher.rs rename to nyx-chain-watcher/pgsql/src/payment_listener/watcher.rs diff --git a/nyx-chain-watcher/src/price_scraper/mod.rs b/nyx-chain-watcher/pgsql/src/price_scraper/mod.rs similarity index 100% rename from nyx-chain-watcher/src/price_scraper/mod.rs rename to nyx-chain-watcher/pgsql/src/price_scraper/mod.rs