From e82596993e9122b4dea7cf3ea29df5bb7b3d6707 Mon Sep 17 00:00:00 2001 From: Yuun Lim <38443641+yuunlimm@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:11:02 -0700 Subject: [PATCH] Update SDK Tests using the latest change in mock grpc (#559) * Add Sdk tests (#554) * update manipulated version * split tests * update tests --- rust/Cargo.lock | 16 +- rust/Cargo.toml | 6 +- .../events_processor/21/events.json | 19 -- .../events_processor/41/events.json | 19 -- .../events_processor/63/events.json | 19 -- .../events_processor/83/events.json | 19 -- .../21/coin_supply.json | 10 - .../21/current_fungible_asset_balances.json | 13 - .../21/fungible_asset_activities.json | 20 -- .../21/fungible_asset_balances.json | 14 -- .../41/coin_supply.json | 10 - .../41/current_fungible_asset_balances.json | 13 - .../41/fungible_asset_activities.json | 20 -- .../41/fungible_asset_balances.json | 14 -- .../63/coin_supply.json | 10 - .../63/fungible_asset_activities.json | 20 -- .../63/fungible_asset_balances.json | 14 -- .../83/coin_supply.json | 10 - .../83/current_fungible_asset_balances.json | 13 - .../83/fungible_asset_activities.json | 20 -- .../83/fungible_asset_balances.json | 14 -- .../83/fungible_asset_metadata.json | 1 - .../21/token_activities_v2.json | 1 - .../41/token_activities_v2.json | 1 - .../63/token_activities_v2.json | 1 - .../83/token_activities_v2.json | 1 - .../events.json | 0 .../{3 => empty_txn_test}/events.json | 0 .../events.json | 0 .../events.json | 0 .../{1 => genesis_txn_test}/events.json | 0 .../multi_txns_handling_test.json | 94 ------- .../events.json | 60 +++++ .../{2 => new_block_event_test}/events.json | 0 .../1/coin_supply.json | 10 - .../1/current_fungible_asset_balances.json | 1 - .../1/fungible_asset_metadata.json | 1 - .../1255836496/coin_supply.json | 10 - .../current_fungible_asset_balances.json | 46 ---- .../1255836496/fungible_asset_activities.json | 74 ------ .../1255836496/fungible_asset_balances.json | 50 ---- .../1255836496/fungible_asset_metadata.json | 19 -- .../2/coin_supply.json | 1 - .../2/current_fungible_asset_balances.json | 1 - .../2/fungible_asset_activities.json | 1 - .../2/fungible_asset_balances.json | 1 - .../2/fungible_asset_metadata.json | 1 - .../278556781/coin_supply.json | 10 - .../current_fungible_asset_balances.json | 24 -- .../278556781/fungible_asset_activities.json | 38 --- .../278556781/fungible_asset_balances.json | 26 -- .../278556781/fungible_asset_metadata.json | 19 -- .../3/coin_supply.json | 1 - .../3/current_fungible_asset_balances.json | 1 - .../3/fungible_asset_activities.json | 1 - .../3/fungible_asset_balances.json | 1 - .../3/fungible_asset_metadata.json | 1 - .../current_fungible_asset_balances.json | 1 - .../5523474016/fungible_asset_activities.json | 1 - .../5523474016/fungible_asset_balances.json | 1 - .../5523474016/fungible_asset_metadata.json | 1 - .../5979639459/fungible_asset_metadata.json | 1 - .../5992795934/fungible_asset_metadata.json | 1 - .../coin_supply.json | 0 .../current_fungible_asset_balances.json | 0 .../fungible_asset_activities.json | 0 .../fungible_asset_balances.json | 0 .../fungible_asset_metadata.json | 0 .../coin_supply.json | 0 .../current_fungible_asset_balances.json | 0 .../fungible_asset_activities.json | 0 .../fungible_asset_balances.json | 0 .../fungible_asset_metadata.json | 0 .../coin_supply.json | 0 .../current_fungible_asset_balances.json | 0 .../fungible_asset_activities.json | 0 .../fungible_asset_balances.json | 0 .../fungible_asset_metadata.json | 0 .../src/diff_tests/all_tests.rs | 27 +- .../src/sdk_tests/events_processor_tests.rs | 231 ++++++++++++------ .../fungible_asset_processor_tests.rs | 133 ++++++---- rust/integration-tests/src/sdk_tests/mod.rs | 38 ++- 82 files changed, 337 insertions(+), 908 deletions(-) delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/21/events.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/41/events.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/63/events.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/83/events.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/coin_supply.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_activities.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_balances.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/coin_supply.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_activities.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_balances.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/coin_supply.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_activities.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_balances.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/coin_supply.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_activities.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_balances.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/21/token_activities_v2.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/41/token_activities_v2.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/63/token_activities_v2.json delete mode 100644 rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/83/token_activities_v2.json rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/{278556781 => coin_register_fa_metadata_test}/events.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/{3 => empty_txn_test}/events.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/{5992795934 => fa_activities_test}/events.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/{1255836496 => fa_metadata_test}/events.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/{1 => genesis_txn_test}/events.json (100%) delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/multi_txns_handling_test.json rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/{5523474016 => multi_txns_handling_test}/events.json (84%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/{2 => new_block_event_test}/events.json (100%) delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/coin_supply.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_activities.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/coin_supply.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_activities.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json delete mode 100644 rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5979639459 => coin_register_txn_test}/coin_supply.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5979639459 => coin_register_txn_test}/current_fungible_asset_balances.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5979639459 => coin_register_txn_test}/fungible_asset_activities.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5979639459 => coin_register_txn_test}/fungible_asset_balances.json (100%) rename rust/integration-tests/{expected_db_output_files/scripted_txns/fungible_asset_processor/21 => sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test}/fungible_asset_metadata.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5992795934 => fa_activities_txn_test}/coin_supply.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5992795934 => fa_activities_txn_test}/current_fungible_asset_balances.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5992795934 => fa_activities_txn_test}/fungible_asset_activities.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5992795934 => fa_activities_txn_test}/fungible_asset_balances.json (100%) rename rust/integration-tests/{expected_db_output_files/scripted_txns/fungible_asset_processor/41 => sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test}/fungible_asset_metadata.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{5523474016 => validator_txn_test}/coin_supply.json (100%) rename rust/integration-tests/{expected_db_output_files/scripted_txns/fungible_asset_processor/63 => sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test}/current_fungible_asset_balances.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{1 => validator_txn_test}/fungible_asset_activities.json (100%) rename rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/{1 => validator_txn_test}/fungible_asset_balances.json (100%) rename rust/integration-tests/{expected_db_output_files/scripted_txns/fungible_asset_processor/63 => sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test}/fungible_asset_metadata.json (100%) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index b02bc00d8..094b206d5 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -141,7 +141,7 @@ checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "aptos-indexer-processor-sdk" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894#1f989c65abbd5cf00a0631a30755ef05818e1894" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299#41dd3e52235032d447f736664d28b9ec4fd0a299" dependencies = [ "ahash", "anyhow", @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "aptos-indexer-processor-sdk-server-framework" version = "1.0.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894#1f989c65abbd5cf00a0631a30755ef05818e1894" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299#41dd3e52235032d447f736664d28b9ec4fd0a299" dependencies = [ "anyhow", "aptos-indexer-processor-sdk", @@ -207,7 +207,7 @@ dependencies = [ [[package]] name = "aptos-indexer-testing-framework" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894#1f989c65abbd5cf00a0631a30755ef05818e1894" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299#41dd3e52235032d447f736664d28b9ec4fd0a299" dependencies = [ "anyhow", "aptos-indexer-processor-sdk", @@ -234,10 +234,10 @@ dependencies = [ [[package]] name = "aptos-indexer-transaction-stream" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894#1f989c65abbd5cf00a0631a30755ef05818e1894" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299#41dd3e52235032d447f736664d28b9ec4fd0a299" dependencies = [ "anyhow", - "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894)", + "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299)", "aptos-protos 1.3.1 (git+https://github.com/aptos-labs/aptos-core.git?rev=5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb)", "chrono", "futures-util", @@ -262,7 +262,7 @@ dependencies = [ [[package]] name = "aptos-moving-average" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894#1f989c65abbd5cf00a0631a30755ef05818e1894" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299#41dd3e52235032d447f736664d28b9ec4fd0a299" dependencies = [ "chrono", ] @@ -2246,7 +2246,7 @@ dependencies = [ [[package]] name = "instrumented-channel" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894#1f989c65abbd5cf00a0631a30755ef05818e1894" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299#41dd3e52235032d447f736664d28b9ec4fd0a299" dependencies = [ "delegate", "derive_builder", @@ -4129,7 +4129,7 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "sample" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=1f989c65abbd5cf00a0631a30755ef05818e1894#1f989c65abbd5cf00a0631a30755ef05818e1894" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=41dd3e52235032d447f736664d28b9ec4fd0a299#41dd3e52235032d447f736664d28b9ec4fd0a299" dependencies = [ "tracing", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7335b4d5d..6318448d4 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -30,12 +30,12 @@ testing-transactions = { path = "testing-transactions" } ahash = { version = "0.8.7", features = ["serde"] } anyhow = "1.0.86" -aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "1f989c65abbd5cf00a0631a30755ef05818e1894" } -aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "1f989c65abbd5cf00a0631a30755ef05818e1894" } +aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "41dd3e52235032d447f736664d28b9ec4fd0a299" } +aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "41dd3e52235032d447f736664d28b9ec4fd0a299" } aptos-protos = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb" } aptos-system-utils = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "202bdccff2b2d333a385ae86a4fcf23e89da9f62" } aptos-indexer-test-transactions = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "3099bbe1e100be815ca0cb262cd7eceef9c75dad" } -aptos-indexer-testing-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "1f989c65abbd5cf00a0631a30755ef05818e1894" } +aptos-indexer-testing-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "41dd3e52235032d447f736664d28b9ec4fd0a299" } async-trait = "0.1.53" backtrace = "0.3.58" diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/21/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/21/events.json deleted file mode 100644 index 50ec7f28d..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/21/events.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "sequence_number": 0, - "creation_number": 0, - "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", - "transaction_version": 21, - "transaction_block_height": 10, - "type_": "0x1::transaction_fee::FeeStatement", - "data": { - "io_gas_units": "1", - "storage_fee_octas": "0", - "execution_gas_units": "3", - "total_charge_gas_units": "3", - "storage_fee_refund_octas": "0" - }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/41/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/41/events.json deleted file mode 100644 index bb36bb801..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/41/events.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "sequence_number": 0, - "creation_number": 0, - "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", - "transaction_version": 41, - "transaction_block_height": 19, - "type_": "0x1::transaction_fee::FeeStatement", - "data": { - "io_gas_units": "1", - "storage_fee_octas": "0", - "execution_gas_units": "3", - "total_charge_gas_units": "3", - "storage_fee_refund_octas": "0" - }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/63/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/63/events.json deleted file mode 100644 index 5ce982ab2..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/63/events.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "sequence_number": 0, - "creation_number": 0, - "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", - "transaction_version": 63, - "transaction_block_height": 29, - "type_": "0x1::transaction_fee::FeeStatement", - "data": { - "io_gas_units": "1", - "storage_fee_octas": "0", - "execution_gas_units": "3", - "total_charge_gas_units": "3", - "storage_fee_refund_octas": "0" - }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/83/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/83/events.json deleted file mode 100644 index 7840e99b9..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/83/events.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "sequence_number": 0, - "creation_number": 0, - "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", - "transaction_version": 83, - "transaction_block_height": 38, - "type_": "0x1::transaction_fee::FeeStatement", - "data": { - "io_gas_units": "1", - "storage_fee_octas": "0", - "execution_gas_units": "3", - "total_charge_gas_units": "3", - "storage_fee_refund_octas": "0" - }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/coin_supply.json deleted file mode 100644 index f91249423..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/coin_supply.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "transaction_version": 21, - "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", - "coin_type": "0x1::aptos_coin::AptosCoin", - "supply": "18446744073709451425", - "transaction_timestamp": "2024-10-16T05:36:37", - "transaction_epoch": 2 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/current_fungible_asset_balances.json deleted file mode 100644 index ea60034bd..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/current_fungible_asset_balances.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "storage_id": "0x9cfa839238cb942fbc487ff341fcdccabacd01e29864f594587900aa3a9d88b2", - "owner_address": "0x765d8c8d4d5859f43a56e2756fbf5f3d2483dbaa14f3fb62872df820d6e64eff", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "99999700", - "last_transaction_timestamp": "2024-10-16T05:36:37", - "last_transaction_version": 21, - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_activities.json deleted file mode 100644 index 23ea8b1bf..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_activities.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "transaction_version": 21, - "event_index": -1, - "owner_address": "0x765d8c8d4d5859f43a56e2756fbf5f3d2483dbaa14f3fb62872df820d6e64eff", - "storage_id": "0x9cfa839238cb942fbc487ff341fcdccabacd01e29864f594587900aa3a9d88b2", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "300", - "type_": "0x1::aptos_coin::GasFeeEvent", - "is_gas_fee": true, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": null, - "block_height": 10, - "token_standard": "v1", - "transaction_timestamp": "2024-10-16T05:36:37", - "storage_refund_amount": "0" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_balances.json deleted file mode 100644 index 8b5b1e374..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_balances.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "transaction_version": 21, - "write_set_change_index": 0, - "storage_id": "0x9cfa839238cb942fbc487ff341fcdccabacd01e29864f594587900aa3a9d88b2", - "owner_address": "0x765d8c8d4d5859f43a56e2756fbf5f3d2483dbaa14f3fb62872df820d6e64eff", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "99999700", - "transaction_timestamp": "2024-10-16T05:36:37", - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/coin_supply.json deleted file mode 100644 index 5c2514ef6..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/coin_supply.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "transaction_version": 41, - "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", - "coin_type": "0x1::aptos_coin::AptosCoin", - "supply": "18446744073709351225", - "transaction_timestamp": "2024-10-16T05:36:43", - "transaction_epoch": 2 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/current_fungible_asset_balances.json deleted file mode 100644 index 2e8510b1b..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/current_fungible_asset_balances.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "storage_id": "0xee7ccdc3a833754267c71df9534640b532352f734e07509cbe48561d23d05831", - "owner_address": "0x8f0de18409d6fca18c72fac4062fc0f9baa6404296fed93a3ad0250fb671f8b3", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "99999700", - "last_transaction_timestamp": "2024-10-16T05:36:43", - "last_transaction_version": 41, - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_activities.json deleted file mode 100644 index e96f6b15f..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_activities.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "transaction_version": 41, - "event_index": -1, - "owner_address": "0x8f0de18409d6fca18c72fac4062fc0f9baa6404296fed93a3ad0250fb671f8b3", - "storage_id": "0xee7ccdc3a833754267c71df9534640b532352f734e07509cbe48561d23d05831", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "300", - "type_": "0x1::aptos_coin::GasFeeEvent", - "is_gas_fee": true, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": null, - "block_height": 19, - "token_standard": "v1", - "transaction_timestamp": "2024-10-16T05:36:43", - "storage_refund_amount": "0" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_balances.json deleted file mode 100644 index ee097a2c1..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_balances.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "transaction_version": 41, - "write_set_change_index": 0, - "storage_id": "0xee7ccdc3a833754267c71df9534640b532352f734e07509cbe48561d23d05831", - "owner_address": "0x8f0de18409d6fca18c72fac4062fc0f9baa6404296fed93a3ad0250fb671f8b3", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "99999700", - "transaction_timestamp": "2024-10-16T05:36:43", - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/coin_supply.json deleted file mode 100644 index 1087a8803..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/coin_supply.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "transaction_version": 63, - "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", - "coin_type": "0x1::aptos_coin::AptosCoin", - "supply": "18446744073809350825", - "transaction_timestamp": "2024-10-16T05:36:50", - "transaction_epoch": 2 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_activities.json deleted file mode 100644 index e11e3c1bc..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_activities.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "transaction_version": 63, - "event_index": -1, - "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", - "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "300", - "type_": "0x1::aptos_coin::GasFeeEvent", - "is_gas_fee": true, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": null, - "block_height": 29, - "token_standard": "v1", - "transaction_timestamp": "2024-10-16T05:36:50", - "storage_refund_amount": "0" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_balances.json deleted file mode 100644 index 5bbcafed2..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_balances.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "transaction_version": 63, - "write_set_change_index": 0, - "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", - "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "99999700", - "transaction_timestamp": "2024-10-16T05:36:50", - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/coin_supply.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/coin_supply.json deleted file mode 100644 index f9d30ef1a..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/coin_supply.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "transaction_version": 83, - "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", - "coin_type": "0x1::aptos_coin::AptosCoin", - "supply": "18446744073909449225", - "transaction_timestamp": "2024-10-16T05:36:56", - "transaction_epoch": 2 - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/current_fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/current_fungible_asset_balances.json deleted file mode 100644 index e6c79af53..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/current_fungible_asset_balances.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", - "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "199999400", - "last_transaction_timestamp": "2024-10-16T05:36:56", - "last_transaction_version": 83, - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_activities.json deleted file mode 100644 index c958d2ba2..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_activities.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "transaction_version": 83, - "event_index": -1, - "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", - "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "300", - "type_": "0x1::aptos_coin::GasFeeEvent", - "is_gas_fee": true, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": null, - "block_height": 38, - "token_standard": "v1", - "transaction_timestamp": "2024-10-16T05:36:56", - "storage_refund_amount": "0" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_balances.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_balances.json deleted file mode 100644 index affa613df..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_balances.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "transaction_version": 83, - "write_set_change_index": 0, - "storage_id": "0xba2fa98d311f0adb1d6608dfbc6d66b6e583c0b8f6bbadea7d241f7e1b0b1080", - "owner_address": "0xa531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "199999400", - "transaction_timestamp": "2024-10-16T05:36:56", - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_metadata.json b/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_metadata.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/83/fungible_asset_metadata.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/21/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/21/token_activities_v2.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/21/token_activities_v2.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/41/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/41/token_activities_v2.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/41/token_activities_v2.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/63/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/63/token_activities_v2.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/63/token_activities_v2.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/83/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/83/token_activities_v2.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/token_v2_processor/83/token_activities_v2.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/coin_register_fa_metadata_test/events.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/coin_register_fa_metadata_test/events.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/3/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/empty_txn_test/events.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/3/events.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/empty_txn_test/events.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/fa_activities_test/events.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/fa_activities_test/events.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/fa_metadata_test/events.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/fa_metadata_test/events.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/genesis_txn_test/events.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1/events.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/genesis_txn_test/events.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/multi_txns_handling_test.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/multi_txns_handling_test.json deleted file mode 100644 index 338e7e633..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/multi_txns_handling_test.json +++ /dev/null @@ -1,94 +0,0 @@ -[ - { - "sequence_number": 1, - "creation_number": 3, - "account_address": "0x0000000000000000000000000000000000000000000000000000000000000001", - "transaction_version": 1, - "transaction_block_height": 1, - "type_": "0x1::block::NewBlockEvent", - "data": { - "hash": "0x1f4392dc07a74b39eaea58b912855cbbd1ab67e5089ae6166329e883c2085f0", - "epoch": "1", - "round": "3", - "height": "1", - "proposer": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", - "time_microseconds": "1662686657227425", - "failed_proposer_indices": [ - "2", - "1" - ], - "previous_block_votes_bitvec": "0x00" - }, - "indexed_type": "0x1::block::NewBlockEvent", - "event_index": 0 - }, - { - "sequence_number": 0, - "creation_number": 12, - "account_address": "0xb7c7d12080209e9dc14498c80200706e760363fb31782247e82cf57d1d6e5d6c", - "transaction_version": 1, - "transaction_block_height": 1, - "type_": "0x1::stake::DistributeRewardsEvent", - "data": { - "pool_address": "0xb7c7d12080209e9dc14498c80200706e760363fb31782247e82cf57d1d6e5d6c", - "rewards_amount": "0" - }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 1 - }, - { - "sequence_number": 0, - "creation_number": 12, - "account_address": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", - "transaction_version": 1, - "transaction_block_height": 1, - "type_": "0x1::stake::DistributeRewardsEvent", - "data": { - "pool_address": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", - "rewards_amount": "4566200000" - }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 2 - }, - { - "sequence_number": 0, - "creation_number": 12, - "account_address": "0x828ca971e35c8b9a807439e5a328fdc9a5ed0efbfb12f40bc451d17f6998be3f", - "transaction_version": 1, - "transaction_block_height": 1, - "type_": "0x1::stake::DistributeRewardsEvent", - "data": { - "pool_address": "0x828ca971e35c8b9a807439e5a328fdc9a5ed0efbfb12f40bc451d17f6998be3f", - "rewards_amount": "0" - }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 3 - }, - { - "sequence_number": 0, - "creation_number": 12, - "account_address": "0xacb107b98cd634ca32d39d38ab13df8cbcd5fe7856ce2a3c3d123e53f95d0b6f", - "transaction_version": 1, - "transaction_block_height": 1, - "type_": "0x1::stake::DistributeRewardsEvent", - "data": { - "pool_address": "0xacb107b98cd634ca32d39d38ab13df8cbcd5fe7856ce2a3c3d123e53f95d0b6f", - "rewards_amount": "0" - }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 4 - }, - { - "sequence_number": 1, - "creation_number": 2, - "account_address": "0x0000000000000000000000000000000000000000000000000000000000000001", - "transaction_version": 1, - "transaction_block_height": 1, - "type_": "0x1::reconfiguration::NewEpochEvent", - "data": { - "epoch": "2" - }, - "indexed_type": "0x1::reconfiguration::NewEpochEvent", - "event_index": 5 - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/multi_txns_handling_test/events.json similarity index 84% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/multi_txns_handling_test/events.json index d1a0d7d76..886b72a14 100644 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/multi_txns_handling_test/events.json @@ -277,5 +277,65 @@ }, "indexed_type": "0x1::reconfiguration::NewEpochEvent", "event_index": 19 + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::account::CoinRegisterEvent", + "data": { + "type_info": { + "module_name": "0x6170746f735f636f696e", + "struct_name": "0x4170746f73436f696e", + "account_address": "0x1" + } + }, + "indexed_type": "0x1::account::CoinRegisterEvent", + "event_index": 0 + }, + { + "sequence_number": 21684, + "creation_number": 3, + "account_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::coin::WithdrawEvent", + "data": { + "amount": "10" + }, + "indexed_type": "0x1::coin::WithdrawEvent", + "event_index": 1 + }, + { + "sequence_number": 0, + "creation_number": 2, + "account_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::coin::DepositEvent", + "data": { + "amount": "10" + }, + "indexed_type": "0x1::coin::DepositEvent", + "event_index": 2 + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::transaction_fee::FeeStatement", + "data": { + "io_gas_units": "5", + "storage_fee_octas": "98800", + "execution_gas_units": "6", + "total_charge_gas_units": "999", + "storage_fee_refund_octas": "0" + }, + "indexed_type": "0x1::transaction_fee::FeeStatement", + "event_index": 3 } ] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/2/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/new_block_event_test/events.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/2/events.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/new_block_event_test/events.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json deleted file mode 100644 index 05dd7f35b..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "transaction_version": 1, - "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", - "coin_type": "0x1::aptos_coin::AptosCoin", - "supply": "18448344078275751615", - "transaction_timestamp": "2022-09-09T01:24:17", - "transaction_epoch": 1 - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json deleted file mode 100644 index 937a86719..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "transaction_version": 1255836496, - "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", - "coin_type": "0x1::aptos_coin::AptosCoin", - "supply": "29152644549222814344", - "transaction_timestamp": "2024-06-18T05:07:55", - "transaction_epoch": 15650 - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json deleted file mode 100644 index e5c643eb6..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", - "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "29450400", - "last_transaction_timestamp": "2024-06-18T05:07:55", - "last_transaction_version": 1255836496, - "token_standard": "v1" - }, - { - "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", - "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "17374075418", - "last_transaction_timestamp": "2024-06-18T05:07:55", - "last_transaction_version": 1255836496, - "token_standard": "v1" - }, - { - "storage_id": "0x7ea259eaaacce518a7479baca008e17fab2d0267a16e11979d52eb6c5433aad6", - "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", - "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", - "is_primary": false, - "is_frozen": false, - "amount": "93054699", - "last_transaction_timestamp": "2024-06-18T05:07:55", - "last_transaction_version": 1255836496, - "token_standard": "v2" - }, - { - "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", - "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", - "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", - "is_primary": false, - "is_frozen": false, - "amount": "17272186129", - "last_transaction_timestamp": "2024-06-18T05:07:55", - "last_transaction_version": 1255836496, - "token_standard": "v2" - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json deleted file mode 100644 index deda77d29..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json +++ /dev/null @@ -1,74 +0,0 @@ -[ - { - "transaction_version": 1255836496, - "event_index": -1, - "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", - "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "50500", - "type_": "0x1::aptos_coin::GasFeeEvent", - "is_gas_fee": true, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", - "block_height": 295534162, - "token_standard": "v1", - "transaction_timestamp": "2024-06-18T05:07:55", - "storage_refund_amount": "0" - }, - { - "transaction_version": 1255836496, - "event_index": 0, - "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", - "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "300000", - "type_": "0x1::coin::WithdrawEvent", - "is_gas_fee": false, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", - "block_height": 295534162, - "token_standard": "v1", - "transaction_timestamp": "2024-06-18T05:07:55", - "storage_refund_amount": "0" - }, - { - "transaction_version": 1255836496, - "event_index": 1, - "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", - "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "300000", - "type_": "0x1::coin::DepositEvent", - "is_gas_fee": false, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", - "block_height": 295534162, - "token_standard": "v1", - "transaction_timestamp": "2024-06-18T05:07:55", - "storage_refund_amount": "0" - }, - { - "transaction_version": 1255836496, - "event_index": 2, - "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", - "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", - "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", - "is_frozen": null, - "amount": "300000", - "type_": "0x1::fungible_asset::Deposit", - "is_gas_fee": false, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::meso::deposit_coin", - "block_height": 295534162, - "token_standard": "v2", - "transaction_timestamp": "2024-06-18T05:07:55", - "storage_refund_amount": "0" - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json deleted file mode 100644 index 2dd21aa02..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "transaction_version": 1255836496, - "write_set_change_index": 4, - "storage_id": "0x56c216a20a151df2e917008e27f3b70250f1cbb80eeef24e64e2335630825fa3", - "owner_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "17374075418", - "transaction_timestamp": "2024-06-18T05:07:55", - "token_standard": "v1" - }, - { - "transaction_version": 1255836496, - "write_set_change_index": 5, - "storage_id": "0x7ea259eaaacce518a7479baca008e17fab2d0267a16e11979d52eb6c5433aad6", - "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", - "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", - "is_primary": false, - "is_frozen": false, - "amount": "93054699", - "transaction_timestamp": "2024-06-18T05:07:55", - "token_standard": "v2" - }, - { - "transaction_version": 1255836496, - "write_set_change_index": 8, - "storage_id": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", - "owner_address": "0xbe1390db94c2f8e83fd870c195656921ed4a2a5dee644c6d9c3168fea082a828", - "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", - "is_primary": false, - "is_frozen": false, - "amount": "17272186129", - "transaction_timestamp": "2024-06-18T05:07:55", - "token_standard": "v2" - }, - { - "transaction_version": 1255836496, - "write_set_change_index": 16, - "storage_id": "0x2086a7aaf18928233884d1725d4f92c5f26c67ac03cb98fe2dc40c99671282dc", - "owner_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "29450400", - "transaction_timestamp": "2024-06-18T05:07:55", - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json deleted file mode 100644 index 3bbb1d851..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "asset_type": "0x4551f2167c446b219c4dee2aa5496395c82a465cd57c5b362621af451c5d062b", - "creator_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", - "name": "Aptos Coin", - "symbol": "APT", - "decimals": 8, - "icon_uri": "", - "project_uri": "", - "last_transaction_version": 1255836496, - "last_transaction_timestamp": "2024-06-18T05:07:55", - "supply_aggregator_table_handle_v1": null, - "supply_aggregator_table_key_v1": null, - "token_standard": "v2", - "is_token_v2": null, - "maximum_v2": "340282366920938463463374607431768211455", - "supply_v2": "17374075418" - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/coin_supply.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/coin_supply.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/current_fungible_asset_balances.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/current_fungible_asset_balances.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_activities.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_activities.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_balances.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_balances.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_metadata.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/2/fungible_asset_metadata.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json deleted file mode 100644 index c7455ae56..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "transaction_version": 278556781, - "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", - "coin_type": "0x1::aptos_coin::AptosCoin", - "supply": "18544645433533405815", - "transaction_timestamp": "2022-10-13T01:46:57", - "transaction_epoch": 746 - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json deleted file mode 100644 index f45ae6826..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", - "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "10041540182", - "last_transaction_timestamp": "2022-10-13T01:46:57", - "last_transaction_version": 278556781, - "token_standard": "v1" - }, - { - "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", - "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", - "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", - "is_primary": true, - "is_frozen": false, - "amount": "1000000000000000000", - "last_transaction_timestamp": "2022-10-13T01:46:57", - "last_transaction_version": 278556781, - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json deleted file mode 100644 index 436b43072..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "transaction_version": 278556781, - "event_index": -1, - "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", - "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_frozen": null, - "amount": "2787000", - "type_": "0x1::aptos_coin::GasFeeEvent", - "is_gas_fee": true, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": "0x1::code::publish_package_txn", - "block_height": 20040326, - "token_standard": "v1", - "transaction_timestamp": "2022-10-13T01:46:57", - "storage_refund_amount": "0" - }, - { - "transaction_version": 278556781, - "event_index": 1, - "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", - "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", - "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", - "is_frozen": null, - "amount": "1000000000000000000", - "type_": "0x1::coin::DepositEvent", - "is_gas_fee": false, - "gas_fee_payer_address": null, - "is_transaction_success": true, - "entry_function_id_str": "0x1::code::publish_package_txn", - "block_height": 20040326, - "token_standard": "v1", - "transaction_timestamp": "2022-10-13T01:46:57", - "storage_refund_amount": "0" - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json deleted file mode 100644 index 779d4957c..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "transaction_version": 278556781, - "write_set_change_index": 3, - "storage_id": "0xa0f5bae99aac34d548f1c5f487800e375e451c1d9576bcdae6f3902752c83c01", - "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", - "asset_type": "0x1::aptos_coin::AptosCoin", - "is_primary": true, - "is_frozen": false, - "amount": "10041540182", - "transaction_timestamp": "2022-10-13T01:46:57", - "token_standard": "v1" - }, - { - "transaction_version": 278556781, - "write_set_change_index": 4, - "storage_id": "0xfc6edbad85409914ab088b68fed0528e4d8e36dcee31075bb8252b4f426a6cff", - "owner_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", - "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", - "is_primary": true, - "is_frozen": false, - "amount": "1000000000000000000", - "transaction_timestamp": "2022-10-13T01:46:57", - "token_standard": "v1" - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json deleted file mode 100644 index 9733b88cd..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "asset_type": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862::proton_cbdy::PRT_KFBCCC", - "creator_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", - "name": "Aptos", - "symbol": "APT", - "decimals": 10, - "icon_uri": null, - "project_uri": null, - "last_transaction_version": 278556781, - "last_transaction_timestamp": "2022-10-13T01:46:57", - "supply_aggregator_table_handle_v1": null, - "supply_aggregator_table_key_v1": null, - "token_standard": "v1", - "is_token_v2": null, - "maximum_v2": null, - "supply_v2": null - } -] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/coin_supply.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/coin_supply.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/current_fungible_asset_balances.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/current_fungible_asset_balances.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_activities.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_activities.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_balances.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_balances.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_metadata.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/3/fungible_asset_metadata.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json deleted file mode 100644 index 0637a088a..000000000 --- a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/coin_supply.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/coin_supply.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/current_fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/current_fungible_asset_balances.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/fungible_asset_activities.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/fungible_asset_activities.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/fungible_asset_balances.json diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/fungible_asset_metadata.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/21/fungible_asset_metadata.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/coin_register_txn_test/fungible_asset_metadata.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/coin_supply.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/coin_supply.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/current_fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/current_fungible_asset_balances.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/fungible_asset_activities.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/fungible_asset_activities.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/fungible_asset_balances.json diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/fungible_asset_metadata.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/41/fungible_asset_metadata.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/fa_activities_txn_test/fungible_asset_metadata.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/coin_supply.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/coin_supply.json diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/current_fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/current_fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/current_fungible_asset_balances.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/current_fungible_asset_balances.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/fungible_asset_activities.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/fungible_asset_activities.json diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/fungible_asset_balances.json similarity index 100% rename from rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/fungible_asset_balances.json diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/fungible_asset_metadata.json similarity index 100% rename from rust/integration-tests/expected_db_output_files/scripted_txns/fungible_asset_processor/63/fungible_asset_metadata.json rename to rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/validator_txn_test/fungible_asset_metadata.json diff --git a/rust/integration-tests/src/diff_tests/all_tests.rs b/rust/integration-tests/src/diff_tests/all_tests.rs index aa8e21b89..4ef88d06d 100644 --- a/rust/integration-tests/src/diff_tests/all_tests.rs +++ b/rust/integration-tests/src/diff_tests/all_tests.rs @@ -10,13 +10,11 @@ mod test { }, diff_tests::{ get_expected_imported_mainnet_txns, get_expected_imported_testnet_txns, - get_expected_scripted_txns, remove_inserted_at, remove_transaction_timestamp, + remove_inserted_at, remove_transaction_timestamp, }, DiffTest, TestContext, TestProcessorConfig, TestType, }; - use aptos_indexer_test_transactions::{ - ALL_IMPORTED_MAINNET_TXNS, ALL_IMPORTED_TESTNET_TXNS, ALL_SCRIPTED_TRANSACTIONS, - }; + use aptos_indexer_test_transactions::{ALL_IMPORTED_MAINNET_TXNS, ALL_IMPORTED_TESTNET_TXNS}; use aptos_indexer_testing_framework::{ cli_parser::get_test_config, sdk_test_context::generate_output_file, }; @@ -66,26 +64,6 @@ mod test { .await; } - #[tokio::test] - async fn test_all_scripted_txns_schema_output_for_all_processors() { - let (generate_output_flag, custom_output_path) = get_test_config(); - let output_path = custom_output_path - .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "/scripted_txns"); - - let processor_configs = get_processor_configs(); - let test_context = TestContext::new(ALL_SCRIPTED_TRANSACTIONS).await.unwrap(); - - run_processor_tests( - processor_configs, - &test_context, - generate_output_flag, - output_path, - true, - get_expected_scripted_txns, - ) - .await; - } - // Helper function to reduce duplicate code for running tests on all processors async fn run_processor_tests( processor_configs: Vec, @@ -160,7 +138,6 @@ mod test { remove_transaction_timestamp(db_value); remove_inserted_at(&mut expected_json); remove_transaction_timestamp(&mut expected_json); - // Validate the actual vs expected JSON for the current table assert_json_eq!(db_value, expected_json); } diff --git a/rust/integration-tests/src/sdk_tests/events_processor_tests.rs b/rust/integration-tests/src/sdk_tests/events_processor_tests.rs index 1ac79d334..0960f4d08 100644 --- a/rust/integration-tests/src/sdk_tests/events_processor_tests.rs +++ b/rust/integration-tests/src/sdk_tests/events_processor_tests.rs @@ -7,14 +7,14 @@ use sdk_processor::config::{ }; use std::collections::HashSet; -pub fn setup_events_processor_config( +pub async fn setup_events_processor_config( test_context: &SdkTestContext, - txn_version: u64, + staring_version: u64, txn_count: usize, db_url: &str, ) -> (IndexerProcessorConfig, &'static str) { let transaction_stream_config = - test_context.create_transaction_stream_config(txn_version, txn_count as u64); + test_context.create_transaction_stream_config(staring_version, txn_count as u64); // since this will be always 1, we can remove from the arg list let postgres_config = PostgresConfig { connection_string: db_url.to_string(), db_pool_size: 100, @@ -49,75 +49,91 @@ mod tests { setup_test_environment, validate_json, DEFAULT_OUTPUT_FOLDER, }, }; + use aptos_indexer_processor_sdk::traits::processor_trait::ProcessorTrait; use aptos_indexer_test_transactions::{ - ALL_IMPORTED_TESTNET_TXNS, IMPORTED_TESTNET_TXNS_1_GENESIS, + IMPORTED_TESTNET_TXNS_1255836496_V2_FA_METADATA_, IMPORTED_TESTNET_TXNS_1_GENESIS, + IMPORTED_TESTNET_TXNS_278556781_V1_COIN_REGISTER_FA_METADATA, IMPORTED_TESTNET_TXNS_2_NEW_BLOCK_EVENT, IMPORTED_TESTNET_TXNS_3_EMPTY_TXN, + IMPORTED_TESTNET_TXNS_5523474016_VALIDATOR_TXN, + IMPORTED_TESTNET_TXNS_5979639459_COIN_REGISTER, + IMPORTED_TESTNET_TXNS_5992795934_FA_ACTIVITIES, }; use aptos_indexer_testing_framework::{cli_parser::get_test_config, database::TestDatabase}; use aptos_protos::transaction::v1::Transaction; use sdk_processor::processors::events_processor::EventsProcessor; - // TODO - Add more intentional tests to validate the processor with different scenarios - // This test cases runs the events processor and validates the output of all available transactions proto jsons #[tokio::test(flavor = "multi_thread", worker_threads = 2)] - async fn testnet_events_processor_db_output_diff_test() { - let (diff_flag, custom_output_path) = get_test_config(); - let output_path = custom_output_path - .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "imported_testnet_txns"); + async fn testnet_events_processor_genesis_txn() { + process_single_testnet_event_txn( + IMPORTED_TESTNET_TXNS_1_GENESIS, + 1, + Some("genesis_txn_test".to_string()), + ) + .await; + } - // Step 1: set up an input transaction that will be used - let transaction_batches = ALL_IMPORTED_TESTNET_TXNS - .iter() - .map(|txn| serde_json::from_slice(txn).unwrap()) - .collect::>(); - - let (db, mut test_context) = setup_test_environment(ALL_IMPORTED_TESTNET_TXNS).await; - - // Step 2: Loop over each transaction and run the test for each - for txn in transaction_batches.iter() { - let txn_version = txn.version; - - // Step 3: Run the processor - let db_url = db.get_db_url(); - - let (indexer_processor_config, processor_name) = - setup_events_processor_config(&test_context, txn_version, 1, &db_url); - - let events_processor = EventsProcessor::new(indexer_processor_config) - .await - .expect("Failed to create EventsProcessor"); - - match run_processor_test( - &mut test_context, - events_processor, - load_data, - db_url, - vec![txn_version as i64], - diff_flag, - output_path.clone(), - None, - ) - .await - { - Ok(mut db_value) => { - let _ = validate_json( - &mut db_value, - txn_version, - processor_name, - output_path.clone(), - ); - }, - Err(e) => { - eprintln!( - "[ERROR] Failed to run processor for txn version {}: {}", - txn_version, e - ); - panic!("Test failed due to processor error"); - }, - } - } + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn testnet_events_processor_new_block_event() { + process_single_testnet_event_txn( + IMPORTED_TESTNET_TXNS_2_NEW_BLOCK_EVENT, + 2, + Some("new_block_event_test".to_string()), + ) + .await; + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn testnet_events_processor_empty_txn() { + process_single_testnet_event_txn( + IMPORTED_TESTNET_TXNS_3_EMPTY_TXN, + 3, + Some("empty_txn_test".to_string()), + ) + .await; + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn testnet_events_processor_coin_register_fa_metadata() { + process_single_testnet_event_txn( + IMPORTED_TESTNET_TXNS_278556781_V1_COIN_REGISTER_FA_METADATA, + 278556781, + Some("coin_register_fa_metadata_test".to_string()), + ) + .await; + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn testnet_events_processor_fa_metadata() { + process_single_testnet_event_txn( + IMPORTED_TESTNET_TXNS_1255836496_V2_FA_METADATA_, + 1255836496, + Some("fa_metadata_test".to_string()), + ) + .await; + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn testnet_events_processor_fa_activities() { + process_single_testnet_event_txn( + IMPORTED_TESTNET_TXNS_5992795934_FA_ACTIVITIES, + 5992795934, + Some("fa_activities_test".to_string()), + ) + .await; } + /// Example test case of not using custom name + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn testnet_events_processor_coin_register() { + process_single_testnet_event_txn( + IMPORTED_TESTNET_TXNS_5979639459_COIN_REGISTER, + 5979639459, + None, + ) + .await; + } + + // Example 2: Test for multiple transactions handling #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn testnet_events_processor_db_output_scenario_testing() { let (diff_flag, custom_output_path) = get_test_config(); @@ -125,9 +141,8 @@ mod tests { .unwrap_or_else(|| format!("{}/imported_testnet_txns", DEFAULT_OUTPUT_FOLDER)); let imported = [ - IMPORTED_TESTNET_TXNS_1_GENESIS, - IMPORTED_TESTNET_TXNS_2_NEW_BLOCK_EVENT, - IMPORTED_TESTNET_TXNS_3_EMPTY_TXN, + IMPORTED_TESTNET_TXNS_5523474016_VALIDATOR_TXN, + IMPORTED_TESTNET_TXNS_5979639459_COIN_REGISTER, ]; let (db, mut test_context) = setup_test_environment(&imported).await; @@ -137,10 +152,7 @@ mod tests { .map(|txn| serde_json::from_slice(txn).expect("Failed to deserialize transaction")) .collect(); - let starting_version = transaction_batches - .first() - .expect("No transactions found") - .version; + let starting_version = transaction_batches[0].version; let db_url = db.get_db_url(); let (indexer_processor_config, _processor_name) = setup_events_processor_config( @@ -148,23 +160,92 @@ mod tests { starting_version, transaction_batches.len(), &db_url, - ); + ) + .await; let events_processor = EventsProcessor::new(indexer_processor_config) .await .expect("Failed to create EventsProcessor"); - - // TODO: we can a validation here later. - let _ = run_processor_test( + let processor_name = events_processor.name(); + match run_processor_test( &mut test_context, events_processor, load_data, db_url, - vec![starting_version as i64], + vec![5523474016, 5979639459], diff_flag, - output_path, + output_path.clone(), Some("multi_txns_handling_test".to_string()), ) - .await; + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + starting_version, + processor_name, + output_path.clone(), + Some("multi_txns_handling_test".to_string()), + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + starting_version, e + ); + panic!("Test failed due to processor error"); + }, + } + } + + // Helper function to abstract out the single transaction processing + async fn process_single_testnet_event_txn( + txn: &[u8], + txn_version: i64, + test_case_name: Option, + ) { + let (diff_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path + .unwrap_or_else(|| format!("{}/imported_testnet_txns", DEFAULT_OUTPUT_FOLDER)); + + let (db, mut test_context) = setup_test_environment(&[txn]).await; + + let db_url = db.get_db_url(); + let (indexer_processor_config, processor_name) = + setup_events_processor_config(&test_context, txn_version as u64, 1, &db_url).await; + + let events_processor = EventsProcessor::new(indexer_processor_config) + .await + .expect("Failed to create EventsProcessor"); + + match run_processor_test( + &mut test_context, + events_processor, + load_data, + db_url, + vec![txn_version], + diff_flag, + output_path.clone(), + test_case_name.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version as u64, + processor_name, + output_path.clone(), + test_case_name, + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + 1, e + ); + panic!("Test failed due to processor error"); + }, + } } } diff --git a/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs b/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs index b44ebbcd9..081e955c4 100644 --- a/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs +++ b/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs @@ -9,12 +9,12 @@ use std::collections::HashSet; pub fn setup_fa_processor_config( test_context: &SdkTestContext, - txn_version: u64, + staring_version: u64, txn_count: usize, db_url: &str, ) -> (IndexerProcessorConfig, &'static str) { let transaction_stream_config = - test_context.create_transaction_stream_config(txn_version, txn_count as u64); + test_context.create_transaction_stream_config(staring_version, txn_count as u64); let postgres_config = PostgresConfig { connection_string: db_url.to_string(), db_pool_size: 100, @@ -50,67 +50,94 @@ mod tests { setup_test_environment, validate_json, DEFAULT_OUTPUT_FOLDER, }, }; - use aptos_indexer_test_transactions::ALL_IMPORTED_TESTNET_TXNS; + use aptos_indexer_test_transactions::{ + IMPORTED_TESTNET_TXNS_5523474016_VALIDATOR_TXN, + IMPORTED_TESTNET_TXNS_5979639459_COIN_REGISTER, + IMPORTED_TESTNET_TXNS_5992795934_FA_ACTIVITIES, + }; use aptos_indexer_testing_framework::{cli_parser::get_test_config, database::TestDatabase}; - use aptos_protos::transaction::v1::Transaction; use sdk_processor::processors::fungible_asset_processor::FungibleAssetProcessor; - // TODO - Add more intentional tests to validate the processor with different scenarios - #[tokio::test] - async fn fa_processor_db_output_diff_test() { - let (diff_flag, custom_output_path) = get_test_config(); - let output_path = custom_output_path - .unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string() + "imported_testnet_txns"); - - let transaction_batches = ALL_IMPORTED_TESTNET_TXNS - .iter() - .map(|txn| serde_json::from_slice(txn).unwrap()) - .collect::>(); + // Test case for processing a specific testnet transaction (Validator Transaction) + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn test_fungible_asset_processor_validator_txn() { + process_single_testnet_fa_txns( + IMPORTED_TESTNET_TXNS_5523474016_VALIDATOR_TXN, + 5523474016, + Some("validator_txn_test".to_string()), + ) + .await; + } - let (db, mut test_context) = setup_test_environment(ALL_IMPORTED_TESTNET_TXNS).await; + // Test case for processing another testnet transaction (Coin Register) + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn test_fungible_asset_processor_coin_register_txn() { + process_single_testnet_fa_txns( + IMPORTED_TESTNET_TXNS_5979639459_COIN_REGISTER, + 5979639459, + Some("coin_register_txn_test".to_string()), + ) + .await; + } - // Step 2: Loop over each transaction and run the test for each - for txn in transaction_batches.iter() { - let txn_version = txn.version; + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn test_fungible_asset_processor_fa_activities_txn() { + process_single_testnet_fa_txns( + IMPORTED_TESTNET_TXNS_5992795934_FA_ACTIVITIES, + 5992795934, + Some("fa_activities_txn_test".to_string()), + ) + .await; + } - // Step 3: Run the processor - let db_url = db.get_db_url(); + // Helper function to abstract out the transaction processing + async fn process_single_testnet_fa_txns( + txn: &[u8], + txn_version: i64, + test_case_name: Option, + ) { + let (diff_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path + .unwrap_or_else(|| format!("{}/imported_testnet_txns", DEFAULT_OUTPUT_FOLDER)); - let (indexer_processor_config, processor_name) = - setup_fa_processor_config(&test_context, txn_version, 1, &db_url); + let (db, mut test_context) = setup_test_environment(&[txn]).await; - let fungible_asset_processor = FungibleAssetProcessor::new(indexer_processor_config) - .await - .expect("Failed to create FungibleAssetProcessor"); + let db_url = db.get_db_url(); + let (indexer_processor_config, processor_name) = + setup_fa_processor_config(&test_context, txn_version as u64, 1, &db_url); - match run_processor_test( - &mut test_context, - fungible_asset_processor, - load_data, - db_url, - vec![txn_version as i64], - diff_flag, - output_path.clone(), - None, - ) + let fungible_asset_processor = FungibleAssetProcessor::new(indexer_processor_config) .await - { - Ok(mut db_value) => { - let _ = validate_json( - &mut db_value, - txn_version, - processor_name, - output_path.clone(), - ); - }, - Err(e) => { - eprintln!( - "[ERROR] Failed to run processor for txn version {}: {}", - txn_version, e - ); - panic!("Test failed due to processor error"); - }, - } + .expect("Failed to create FungibleAssetProcessor"); + + match run_processor_test( + &mut test_context, + fungible_asset_processor, + load_data, + db_url, + vec![txn_version], + diff_flag, + output_path.clone(), + test_case_name.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version as u64, + processor_name, + output_path.clone(), + test_case_name, + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + 1, e + ); + panic!("Test failed due to processor error"); + }, } } } diff --git a/rust/integration-tests/src/sdk_tests/mod.rs b/rust/integration-tests/src/sdk_tests/mod.rs index a282052ae..68817a5da 100644 --- a/rust/integration-tests/src/sdk_tests/mod.rs +++ b/rust/integration-tests/src/sdk_tests/mod.rs @@ -7,7 +7,11 @@ use aptos_indexer_testing_framework::{ use assert_json_diff::assert_json_eq; use diesel::{Connection, PgConnection}; use serde_json::Value; -use std::{collections::HashMap, fs, path::Path}; +use std::{ + collections::HashMap, + fs, + path::{Path, PathBuf}, +}; #[cfg(test)] pub mod events_processor_tests; @@ -15,7 +19,7 @@ pub mod events_processor_tests; pub mod fungible_asset_processor_tests; #[allow(dead_code)] -pub const DEFAULT_OUTPUT_FOLDER: &str = "sdk_expected_db_output_files/"; +pub const DEFAULT_OUTPUT_FOLDER: &str = "sdk_expected_db_output_files"; #[allow(dead_code)] pub fn read_and_parse_json(path: &str) -> anyhow::Result { @@ -53,13 +57,26 @@ pub fn validate_json( txn_version: u64, processor_name: &str, output_path: String, + file_name: Option, ) -> anyhow::Result<()> { for (table_name, db_value) in db_values.iter_mut() { - // Generate the expected JSON file path for each table - let expected_file_path = Path::new(&output_path) - .join(processor_name) - .join(txn_version.to_string()) - .join(format!("{}.json", table_name)); // File name format: processor_table_txnVersion.json + let expected_file_path = match file_name.clone() { + Some(custom_name) => { + PathBuf::from(&output_path) + .join(processor_name) + .join(custom_name.clone()) + .join( + format!("{}.json", table_name), // Including table_name in the format + ) + }, + None => { + // Default case: use table_name and txn_version to construct file name + Path::new(&output_path) + .join(processor_name) + .join(txn_version.to_string()) + .join(format!("{}.json", table_name)) // File name format: processor_table_txnVersion.json + }, + }; let mut expected_json = match read_and_parse_json(expected_file_path.to_str().unwrap()) { Ok(json) => json, @@ -77,7 +94,10 @@ pub fn validate_json( remove_transaction_timestamp(db_value); remove_inserted_at(&mut expected_json); remove_transaction_timestamp(&mut expected_json); - + println!( + "Diffing table: {}, diffing version: {}", + table_name, txn_version + ); assert_json_eq!(db_value, expected_json); } Ok(()) @@ -109,7 +129,6 @@ where output_path.clone(), custom_file_name, move || { - // TODO: might not need this. let mut conn = PgConnection::establish(&db_url).expect("Failed to establish DB connection"); @@ -134,6 +153,5 @@ where }, ) .await?; - Ok(db_values) }