diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 4fe1c2b88..3ea8d1311 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=376647ed207aa05a5149dfb49a0ae6e2ca15aa32#376647ed207aa05a5149dfb49a0ae6e2ca15aa32" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" 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=376647ed207aa05a5149dfb49a0ae6e2ca15aa32#376647ed207aa05a5149dfb49a0ae6e2ca15aa32" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" 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=376647ed207aa05a5149dfb49a0ae6e2ca15aa32#376647ed207aa05a5149dfb49a0ae6e2ca15aa32" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" 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=376647ed207aa05a5149dfb49a0ae6e2ca15aa32#376647ed207aa05a5149dfb49a0ae6e2ca15aa32" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "anyhow", - "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=376647ed207aa05a5149dfb49a0ae6e2ca15aa32)", + "aptos-moving-average 0.1.0 (git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1)", "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=376647ed207aa05a5149dfb49a0ae6e2ca15aa32#376647ed207aa05a5149dfb49a0ae6e2ca15aa32" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" 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=376647ed207aa05a5149dfb49a0ae6e2ca15aa32#376647ed207aa05a5149dfb49a0ae6e2ca15aa32" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" 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=376647ed207aa05a5149dfb49a0ae6e2ca15aa32#376647ed207aa05a5149dfb49a0ae6e2ca15aa32" +source = "git+https://github.com/aptos-labs/aptos-indexer-processor-sdk.git?rev=a12b31492285c70d5afbdd42aa10fe76e1fb79e1#a12b31492285c70d5afbdd42aa10fe76e1fb79e1" dependencies = [ "tracing", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 95fb8d0fd..7d1137756 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 = "376647ed207aa05a5149dfb49a0ae6e2ca15aa32" } -aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "376647ed207aa05a5149dfb49a0ae6e2ca15aa32" } +aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "a12b31492285c70d5afbdd42aa10fe76e1fb79e1" } +aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "a12b31492285c70d5afbdd42aa10fe76e1fb79e1" } 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 = "c583502c69529fddbbf7e47bf920f1dc60e71b72" } -aptos-indexer-testing-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "376647ed207aa05a5149dfb49a0ae6e2ca15aa32" } +aptos-indexer-testing-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "a12b31492285c70d5afbdd42aa10fe76e1fb79e1" } async-trait = "0.1.53" backtrace = "0.3.58" diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/308783012/events.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/308783012/events.json index 0d0606808..92b3e7efa 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/308783012/events.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/events_processor/308783012/events.json @@ -10,8 +10,9 @@ "index": "3723914", "token": "0x6fd8ee875fb55e03b1f9643d3f229f0b077a71cfe7ffc8ba7e09ff4392950e5c" }, - "indexed_type": "0x4::collection::MintEvent", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.404918", + "event_index": 0, + "indexed_type": "0x4::collection::MintEvent" }, { "sequence_number": 0, @@ -25,8 +26,9 @@ "from": "0x7efbc33cf69ad534412eab0ccd0f5fbec7793bdebf08a3620afe8e5f89ef13a0", "object": "0x6fd8ee875fb55e03b1f9643d3f229f0b077a71cfe7ffc8ba7e09ff4392950e5c" }, - "indexed_type": "0x1::object::TransferEvent", - "event_index": 1 + "inserted_at": "2024-10-15T04:55:32.404918", + "event_index": 1, + "indexed_type": "0x1::object::TransferEvent" }, { "sequence_number": 0, @@ -42,7 +44,8 @@ "total_charge_gas_units": "520", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 2 + "inserted_at": "2024-10-15T04:55:32.404918", + "event_index": 2, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_activities.json index db2769f93..909daae70 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_activities.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/fungible_asset_processor/308783012/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 106350614, "token_standard": "v1", "transaction_timestamp": "2023-10-24T09:08:03", + "inserted_at": "2024-10-15T04:55:33.359030", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/308783012/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/308783012/token_activities_v2.json index 0fdaa5eeb..503c6d4ed 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/308783012/token_activities_v2.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/308783012/token_activities_v2.json @@ -14,7 +14,8 @@ "entry_function_id_str": "0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::mint::resource_mint_token_memo", "token_standard": "v2", "is_fungible_v2": null, - "transaction_timestamp": "2023-10-24T09:08:03.606880" + "transaction_timestamp": "2023-10-24T09:08:03.606880", + "inserted_at": "2024-10-15T04:55:34.472476" }, { "transaction_version": 308783012, @@ -31,6 +32,7 @@ "entry_function_id_str": "0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::mint::resource_mint_token_memo", "token_standard": "v2", "is_fungible_v2": null, - "transaction_timestamp": "2023-10-24T09:08:03.606880" + "transaction_timestamp": "2023-10-24T09:08:03.606880", + "inserted_at": "2024-10-15T04:55:34.472476" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1/events.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1/events.json index 338e7e633..c05d5d4d7 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1/events.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1/events.json @@ -19,8 +19,9 @@ ], "previous_block_votes_bitvec": "0x00" }, - "indexed_type": "0x1::block::NewBlockEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 0, + "indexed_type": "0x1::block::NewBlockEvent" }, { "sequence_number": 0, @@ -33,8 +34,9 @@ "pool_address": "0xb7c7d12080209e9dc14498c80200706e760363fb31782247e82cf57d1d6e5d6c", "rewards_amount": "0" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 0, @@ -47,8 +49,9 @@ "pool_address": "0xdffe3c93b756bf6fec59b052d6fe71b40c3f9b7899d69ab06ba385b1c6728d16", "rewards_amount": "4566200000" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 0, @@ -61,8 +64,9 @@ "pool_address": "0x828ca971e35c8b9a807439e5a328fdc9a5ed0efbfb12f40bc451d17f6998be3f", "rewards_amount": "0" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 0, @@ -75,8 +79,9 @@ "pool_address": "0xacb107b98cd634ca32d39d38ab13df8cbcd5fe7856ce2a3c3d123e53f95d0b6f", "rewards_amount": "0" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 4 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 1, @@ -88,7 +93,8 @@ "data": { "epoch": "2" }, - "indexed_type": "0x1::reconfiguration::NewEpochEvent", - "event_index": 5 + "inserted_at": "2024-10-15T05:15:50.241072", + "event_index": 5, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json index a10bb69f9..c4ec7b54a 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json @@ -9,8 +9,9 @@ "data": { "amount": "300000" }, - "indexed_type": "0x1::coin::WithdrawEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 0, + "indexed_type": "0x1::coin::WithdrawEvent" }, { "sequence_number": 707, @@ -22,8 +23,9 @@ "data": { "amount": "300000" }, - "indexed_type": "0x1::coin::DepositEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" }, { "sequence_number": 0, @@ -36,8 +38,9 @@ "store": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", "amount": "300000" }, - "indexed_type": "0x1::fungible_asset::Deposit", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 2, + "indexed_type": "0x1::fungible_asset::Deposit" }, { "sequence_number": 0, @@ -54,8 +57,9 @@ "token": "0x1::aptos_coin::AptosCoin", "amount": "300000" }, - "indexed_type": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 3, + "indexed_type": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit" }, { "sequence_number": 0, @@ -71,7 +75,8 @@ "total_charge_gas_units": "505", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 4 + "inserted_at": "2024-10-15T05:15:48.641863", + "event_index": 4, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json index b3c4de024..8da11495c 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json @@ -13,8 +13,9 @@ "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862" } }, - "indexed_type": "0x1::account::CoinRegisterEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:49.422609", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" }, { "sequence_number": 0, @@ -26,7 +27,8 @@ "data": { "amount": "1000000000000000000" }, - "indexed_type": "0x1::coin::DepositEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:49.422609", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json index d1a0d7d76..078706570 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json @@ -10,8 +10,9 @@ "pool_address": "0xa4113560d0b18ba38797f2a899c4b27e0c5b0476be5d8f6be68fba8b1861ed0", "rewards_amount": "789371656" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 0, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 4252, @@ -24,8 +25,9 @@ "pool_address": "0x286e8af6717ef6b1e361aae8ab28dd6664bf562c2805dd9a53432246ec66566e", "rewards_amount": "19174256316" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9823, @@ -38,8 +40,9 @@ "pool_address": "0x116176e2af223a8b7f8db80dc52f7a423b4d7f8c0553a1747e92ef58849aff4f", "rewards_amount": "19178730843" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 3697, @@ -52,8 +55,9 @@ "pool_address": "0xba08cec00a8cfa1deff6c9212dda8d198c8fa6ee1992f3ada76d645f99e3402b", "rewards_amount": "818123890" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9813, @@ -66,8 +70,9 @@ "pool_address": "0x12000330d7cd8a748f46c25e6ce5d236a27e13d0b510d4516ac84ecc5fddd002", "rewards_amount": "19178287161" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 4 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 14143, @@ -80,8 +85,9 @@ "pool_address": "0x5176f2252762e527e3598c22f1bdb3a1ac0ff0db2d7518cabbc99305330a864a", "rewards_amount": "963055869" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 5 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 5, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9812, @@ -94,8 +100,9 @@ "pool_address": "0xf0a156ed79ab6ccb5a643af48716263b565fd985ba36560966b4a91bdc8521f4", "rewards_amount": "19177688699" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 6 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 6, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 7807, @@ -108,8 +115,9 @@ "pool_address": "0xa562415be88d9f08ba98fa3f6af9be0e36580c0f8fff5100a50b519e8f4a15c9", "rewards_amount": "841058926" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 7 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 7, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9823, @@ -122,8 +130,9 @@ "pool_address": "0x676f640c90cb6c45f21be50974531d440309aa4ddad919ae0429039789a3d8a9", "rewards_amount": "19178518163" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 8 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 8, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 9829, @@ -136,8 +145,9 @@ "pool_address": "0x3c04549114877c55f45649aba48ac0a4ff086ab7bdce3b8cc8d3d9947bc0d99", "rewards_amount": "19185171265" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 9 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 9, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 4252, @@ -150,8 +160,9 @@ "pool_address": "0x6d00a8a82bd0b6d187f9a328118ad61b5c80237362e8f5dd2454f2d3a1b03890", "rewards_amount": "19174925092" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 10 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 10, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 8256, @@ -164,8 +175,9 @@ "pool_address": "0x7a2ddb6af66beb0d9987c6c9010cb9053454f067e16775a8ecf19961195c3d28", "rewards_amount": "18813123628" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 11 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 11, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 8641, @@ -178,8 +190,9 @@ "pool_address": "0xeecd6e9fb71f3a67db6321e93deecf7a9d7c3f4fac6cd170deb3e8b183281943", "rewards_amount": "828031401" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 12 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 12, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 1882, @@ -192,8 +205,9 @@ "pool_address": "0xfd47a2fb988c959839ea2fe4d7169b48536a42bf5e4933790701a08252ba2039", "rewards_amount": "798768182" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 13 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 13, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 2197, @@ -206,8 +220,9 @@ "pool_address": "0x479ca442491cfd636f84fa8e56fa420c8038587e459e886d16a0b9d3993b16ba", "rewards_amount": "18896078163" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 14 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 14, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 2199, @@ -220,8 +235,9 @@ "pool_address": "0x95a0e6b1105ba7ef9382e585d32e9dbf1a73833975af77d9b6924aa33468df07", "rewards_amount": "18894077814" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 15 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 15, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 225, @@ -234,8 +250,9 @@ "pool_address": "0xb59c2db675c086d0c07b0f5d5ebd95ea9ead4429d836284fc4a576c4eed5799c", "rewards_amount": "787639333" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 16 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 16, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 405, @@ -248,8 +265,9 @@ "pool_address": "0x50e52098d22c91f4c6a0065d03b2602cc2643089b218096e3cfe5f1bd98d80e6", "rewards_amount": "789473752" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 17 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 17, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 330, @@ -262,8 +280,9 @@ "pool_address": "0xa5ed5d5e8c892165b18c2062596e8d1139fbb2cc451d430f787cd707122ce023", "rewards_amount": "787913628" }, - "indexed_type": "0x1::stake::DistributeRewardsEvent", - "event_index": 18 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 18, + "indexed_type": "0x1::stake::DistributeRewardsEvent" }, { "sequence_number": 16643, @@ -275,7 +294,8 @@ "data": { "epoch": "16644" }, - "indexed_type": "0x1::reconfiguration::NewEpochEvent", - "event_index": 19 + "inserted_at": "2024-10-15T05:15:49.855843", + "event_index": 19, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json index ed5feab5f..a06eeb473 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json @@ -13,8 +13,9 @@ "account_address": "0x1" } }, - "indexed_type": "0x1::account::CoinRegisterEvent", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" }, { "sequence_number": 21684, @@ -26,8 +27,9 @@ "data": { "amount": "10" }, - "indexed_type": "0x1::coin::WithdrawEvent", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 1, + "indexed_type": "0x1::coin::WithdrawEvent" }, { "sequence_number": 0, @@ -39,8 +41,9 @@ "data": { "amount": "10" }, - "indexed_type": "0x1::coin::DepositEvent", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 2, + "indexed_type": "0x1::coin::DepositEvent" }, { "sequence_number": 0, @@ -56,7 +59,8 @@ "total_charge_gas_units": "999", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 3 + "inserted_at": "2024-10-15T05:15:48.257818", + "event_index": 3, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json index dd105cc73..69192b908 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json @@ -10,8 +10,9 @@ "store": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", "amount": "100000000" }, - "indexed_type": "0x1::fungible_asset::Withdraw", - "event_index": 0 + "inserted_at": "2024-10-15T05:15:49.043035", + "event_index": 0, + "indexed_type": "0x1::fungible_asset::Withdraw" }, { "sequence_number": 0, @@ -24,8 +25,9 @@ "store": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", "amount": "100000000" }, - "indexed_type": "0x1::fungible_asset::Deposit", - "event_index": 1 + "inserted_at": "2024-10-15T05:15:49.043035", + "event_index": 1, + "indexed_type": "0x1::fungible_asset::Deposit" }, { "sequence_number": 0, @@ -41,7 +43,8 @@ "total_charge_gas_units": "12", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 2 + "inserted_at": "2024-10-15T05:15:49.043035", + "event_index": 2, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json index deda77d29..7eb6cd8ca 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 295534162, "token_standard": "v1", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 295534162, "token_standard": "v1", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" }, { @@ -51,6 +53,7 @@ "block_height": 295534162, "token_standard": "v1", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" }, { @@ -69,6 +72,7 @@ "block_height": 295534162, "token_standard": "v2", "transaction_timestamp": "2024-06-18T05:07:55", + "inserted_at": "2024-10-15T05:15:49.044565", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json index 436b43072..da4019a2d 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 20040326, "token_standard": "v1", "transaction_timestamp": "2022-10-13T01:46:57", + "inserted_at": "2024-10-15T04:55:33.625216", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 20040326, "token_standard": "v1", "transaction_timestamp": "2022-10-13T01:46:57", + "inserted_at": "2024-10-15T04:55:33.625216", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json index 5e99ebdf9..69a01ac2c 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 354619634, "token_standard": "v1", "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:15:48.265877", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 354619634, "token_standard": "v1", "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:15:48.265877", "storage_refund_amount": "0" }, { @@ -51,6 +53,7 @@ "block_height": 354619634, "token_standard": "v1", "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:15:48.265877", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json index bc3197a95..519c0f453 100644 --- a/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json +++ b/rust/integration-tests/expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json @@ -15,6 +15,7 @@ "block_height": 356437526, "token_standard": "v1", "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:15:49.908952", "storage_refund_amount": "0" }, { @@ -33,6 +34,7 @@ "block_height": 356437526, "token_standard": "v2", "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:15:49.908952", "storage_refund_amount": "0" }, { @@ -51,6 +53,7 @@ "block_height": 356437526, "token_standard": "v2", "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:15:49.908952", "storage_refund_amount": "0" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/23/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/23/events.json index 6ff94bb16..e4474af36 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/23/events.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/23/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.412203", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/43/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/43/events.json index 5f5f8ee20..78fcf79a8 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/43/events.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/43/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.404901", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/65/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/65/events.json index dde6479b4..0a8a207d6 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/65/events.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/65/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.413924", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/85/events.json b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/85/events.json index ed9d921df..cd2cd722e 100644 --- a/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/85/events.json +++ b/rust/integration-tests/expected_db_output_files/scripted_txns/events_processor/85/events.json @@ -13,7 +13,8 @@ "total_charge_gas_units": "3", "storage_fee_refund_octas": "0" }, - "indexed_type": "0x1::transaction_fee::FeeStatement", - "event_index": 0 + "inserted_at": "2024-10-15T04:55:32.409748", + "event_index": 0, + "indexed_type": "0x1::transaction_fee::FeeStatement" } ] \ No newline at end of file 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/1/events.json new file mode 100644 index 000000000..f3c7c9d2a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1/events.json @@ -0,0 +1,100 @@ +[ + { + "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" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 0, + "indexed_type": "0x1::block::NewBlockEvent" + }, + { + "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" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "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" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "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" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "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" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 1, + "creation_number": 2, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_version": 1, + "transaction_block_height": 1, + "type_": "0x1::reconfiguration::NewEpochEvent", + "data": { + "epoch": "2" + }, + "inserted_at": "2024-10-15T05:16:56.906765", + "event_index": 5, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" + } +] \ No newline at end of file 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/1255836496/events.json new file mode 100644 index 000000000..e781112ba --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/1255836496/events.json @@ -0,0 +1,82 @@ +[ + { + "sequence_number": 0, + "creation_number": 3, + "account_address": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::coin::WithdrawEvent", + "data": { + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 0, + "indexed_type": "0x1::coin::WithdrawEvent" + }, + { + "sequence_number": 707, + "creation_number": 4, + "account_address": "0x6cbd58aec3b1eb5aff37ece4dff62b829ecbc6b851ee94056e852bcde5690ab4", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::coin::DepositEvent", + "data": { + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::fungible_asset::Deposit", + "data": { + "store": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8", + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 2, + "indexed_type": "0x1::fungible_asset::Deposit" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit", + "data": { + "pool": { + "inner": "0x8f4f0991e18bd9620a4b3756dbe15afd20135eaaa93e0d0b82e6e2412a8e12b8" + }, + "user": "0xf21d4c76354db6492841e31fefeaa5a3e8a1071d2bcbbdd1cf1cbc6fa3954b88", + "token": "0x1::aptos_coin::AptosCoin", + "amount": "300000" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 3, + "indexed_type": "0xfabb471223cefd7064b1f19f6e0e06468d2bd830d8ae832916406dd8297098af::lending_pool::Deposit" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 1255836496, + "transaction_block_height": 295534162, + "type_": "0x1::transaction_fee::FeeStatement", + "data": { + "io_gas_units": "16", + "storage_fee_octas": "45720", + "execution_gas_units": "32", + "total_charge_gas_units": "505", + "storage_fee_refund_octas": "0" + }, + "inserted_at": "2024-10-15T05:16:54.487402", + "event_index": 4, + "indexed_type": "0x1::transaction_fee::FeeStatement" + } +] \ 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/278556781/events.json new file mode 100644 index 000000000..c84be8759 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/278556781/events.json @@ -0,0 +1,34 @@ +[ + { + "sequence_number": 2, + "creation_number": 0, + "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "transaction_version": 278556781, + "transaction_block_height": 20040326, + "type_": "0x1::account::CoinRegisterEvent", + "data": { + "type_info": { + "module_name": "0x70726f746f6e5f63626479", + "struct_name": "0x5052545f4b4642434343", + "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862" + } + }, + "inserted_at": "2024-10-15T05:16:55.660399", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" + }, + { + "sequence_number": 0, + "creation_number": 10, + "account_address": "0x589dabf3b43ef5c331ea3c0f9b6b005860c1f0ef94a5948d133e051b20c22862", + "transaction_version": 278556781, + "transaction_block_height": 20040326, + "type_": "0x1::coin::DepositEvent", + "data": { + "amount": "1000000000000000000" + }, + "inserted_at": "2024-10-15T05:16:55.660399", + "event_index": 1, + "indexed_type": "0x1::coin::DepositEvent" + } +] \ 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/5523474016/events.json new file mode 100644 index 000000000..31bf8c5cf --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5523474016/events.json @@ -0,0 +1,301 @@ +[ + { + "sequence_number": 9814, + "creation_number": 12, + "account_address": "0x0a4113560d0b18ba38797f2a899c4b27e0c5b0476be5d8f6be68fba8b1861ed0", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xa4113560d0b18ba38797f2a899c4b27e0c5b0476be5d8f6be68fba8b1861ed0", + "rewards_amount": "789371656" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 0, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 4252, + "creation_number": 12, + "account_address": "0x286e8af6717ef6b1e361aae8ab28dd6664bf562c2805dd9a53432246ec66566e", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x286e8af6717ef6b1e361aae8ab28dd6664bf562c2805dd9a53432246ec66566e", + "rewards_amount": "19174256316" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 1, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9823, + "creation_number": 12, + "account_address": "0x116176e2af223a8b7f8db80dc52f7a423b4d7f8c0553a1747e92ef58849aff4f", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x116176e2af223a8b7f8db80dc52f7a423b4d7f8c0553a1747e92ef58849aff4f", + "rewards_amount": "19178730843" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 2, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 3697, + "creation_number": 12, + "account_address": "0xba08cec00a8cfa1deff6c9212dda8d198c8fa6ee1992f3ada76d645f99e3402b", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xba08cec00a8cfa1deff6c9212dda8d198c8fa6ee1992f3ada76d645f99e3402b", + "rewards_amount": "818123890" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 3, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9813, + "creation_number": 12, + "account_address": "0x12000330d7cd8a748f46c25e6ce5d236a27e13d0b510d4516ac84ecc5fddd002", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x12000330d7cd8a748f46c25e6ce5d236a27e13d0b510d4516ac84ecc5fddd002", + "rewards_amount": "19178287161" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 4, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 14143, + "creation_number": 12, + "account_address": "0x5176f2252762e527e3598c22f1bdb3a1ac0ff0db2d7518cabbc99305330a864a", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x5176f2252762e527e3598c22f1bdb3a1ac0ff0db2d7518cabbc99305330a864a", + "rewards_amount": "963055869" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 5, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9812, + "creation_number": 12, + "account_address": "0xf0a156ed79ab6ccb5a643af48716263b565fd985ba36560966b4a91bdc8521f4", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xf0a156ed79ab6ccb5a643af48716263b565fd985ba36560966b4a91bdc8521f4", + "rewards_amount": "19177688699" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 6, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 7807, + "creation_number": 12, + "account_address": "0xa562415be88d9f08ba98fa3f6af9be0e36580c0f8fff5100a50b519e8f4a15c9", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xa562415be88d9f08ba98fa3f6af9be0e36580c0f8fff5100a50b519e8f4a15c9", + "rewards_amount": "841058926" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 7, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9823, + "creation_number": 12, + "account_address": "0x676f640c90cb6c45f21be50974531d440309aa4ddad919ae0429039789a3d8a9", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x676f640c90cb6c45f21be50974531d440309aa4ddad919ae0429039789a3d8a9", + "rewards_amount": "19178518163" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 8, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 9829, + "creation_number": 12, + "account_address": "0x03c04549114877c55f45649aba48ac0a4ff086ab7bdce3b8cc8d3d9947bc0d99", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x3c04549114877c55f45649aba48ac0a4ff086ab7bdce3b8cc8d3d9947bc0d99", + "rewards_amount": "19185171265" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 9, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 4252, + "creation_number": 12, + "account_address": "0x6d00a8a82bd0b6d187f9a328118ad61b5c80237362e8f5dd2454f2d3a1b03890", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x6d00a8a82bd0b6d187f9a328118ad61b5c80237362e8f5dd2454f2d3a1b03890", + "rewards_amount": "19174925092" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 10, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 8256, + "creation_number": 12, + "account_address": "0x7a2ddb6af66beb0d9987c6c9010cb9053454f067e16775a8ecf19961195c3d28", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x7a2ddb6af66beb0d9987c6c9010cb9053454f067e16775a8ecf19961195c3d28", + "rewards_amount": "18813123628" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 11, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 8641, + "creation_number": 10, + "account_address": "0xeecd6e9fb71f3a67db6321e93deecf7a9d7c3f4fac6cd170deb3e8b183281943", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xeecd6e9fb71f3a67db6321e93deecf7a9d7c3f4fac6cd170deb3e8b183281943", + "rewards_amount": "828031401" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 12, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 1882, + "creation_number": 12, + "account_address": "0xfd47a2fb988c959839ea2fe4d7169b48536a42bf5e4933790701a08252ba2039", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xfd47a2fb988c959839ea2fe4d7169b48536a42bf5e4933790701a08252ba2039", + "rewards_amount": "798768182" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 13, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 2197, + "creation_number": 12, + "account_address": "0x479ca442491cfd636f84fa8e56fa420c8038587e459e886d16a0b9d3993b16ba", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x479ca442491cfd636f84fa8e56fa420c8038587e459e886d16a0b9d3993b16ba", + "rewards_amount": "18896078163" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 14, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 2199, + "creation_number": 12, + "account_address": "0x95a0e6b1105ba7ef9382e585d32e9dbf1a73833975af77d9b6924aa33468df07", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x95a0e6b1105ba7ef9382e585d32e9dbf1a73833975af77d9b6924aa33468df07", + "rewards_amount": "18894077814" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 15, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 225, + "creation_number": 12, + "account_address": "0xb59c2db675c086d0c07b0f5d5ebd95ea9ead4429d836284fc4a576c4eed5799c", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xb59c2db675c086d0c07b0f5d5ebd95ea9ead4429d836284fc4a576c4eed5799c", + "rewards_amount": "787639333" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 16, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 405, + "creation_number": 12, + "account_address": "0x50e52098d22c91f4c6a0065d03b2602cc2643089b218096e3cfe5f1bd98d80e6", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0x50e52098d22c91f4c6a0065d03b2602cc2643089b218096e3cfe5f1bd98d80e6", + "rewards_amount": "789473752" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 17, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 330, + "creation_number": 10, + "account_address": "0xa5ed5d5e8c892165b18c2062596e8d1139fbb2cc451d430f787cd707122ce023", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::stake::DistributeRewardsEvent", + "data": { + "pool_address": "0xa5ed5d5e8c892165b18c2062596e8d1139fbb2cc451d430f787cd707122ce023", + "rewards_amount": "787913628" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 18, + "indexed_type": "0x1::stake::DistributeRewardsEvent" + }, + { + "sequence_number": 16643, + "creation_number": 2, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_version": 5523474016, + "transaction_block_height": 322305240, + "type_": "0x1::reconfiguration::NewEpochEvent", + "data": { + "epoch": "16644" + }, + "inserted_at": "2024-10-15T05:16:56.188639", + "event_index": 19, + "indexed_type": "0x1::reconfiguration::NewEpochEvent" + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json new file mode 100644 index 000000000..b54fcc818 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5979639459/events.json @@ -0,0 +1,66 @@ +[ + { + "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" + } + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 0, + "indexed_type": "0x1::account::CoinRegisterEvent" + }, + { + "sequence_number": 21684, + "creation_number": 3, + "account_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::coin::WithdrawEvent", + "data": { + "amount": "10" + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 1, + "indexed_type": "0x1::coin::WithdrawEvent" + }, + { + "sequence_number": 0, + "creation_number": 2, + "account_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "transaction_version": 5979639459, + "transaction_block_height": 354619634, + "type_": "0x1::coin::DepositEvent", + "data": { + "amount": "10" + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 2, + "indexed_type": "0x1::coin::DepositEvent" + }, + { + "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" + }, + "inserted_at": "2024-10-15T05:16:54.022853", + "event_index": 3, + "indexed_type": "0x1::transaction_fee::FeeStatement" + } +] \ No newline at end of file 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/5992795934/events.json new file mode 100644 index 000000000..8cb171550 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/events_processor/5992795934/events.json @@ -0,0 +1,50 @@ +[ + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5992795934, + "transaction_block_height": 356437526, + "type_": "0x1::fungible_asset::Withdraw", + "data": { + "store": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "amount": "100000000" + }, + "inserted_at": "2024-10-15T05:16:55.191117", + "event_index": 0, + "indexed_type": "0x1::fungible_asset::Withdraw" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5992795934, + "transaction_block_height": 356437526, + "type_": "0x1::fungible_asset::Deposit", + "data": { + "store": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "amount": "100000000" + }, + "inserted_at": "2024-10-15T05:16:55.191117", + "event_index": 1, + "indexed_type": "0x1::fungible_asset::Deposit" + }, + { + "sequence_number": 0, + "creation_number": 0, + "account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_version": 5992795934, + "transaction_block_height": 356437526, + "type_": "0x1::transaction_fee::FeeStatement", + "data": { + "io_gas_units": "7", + "storage_fee_octas": "0", + "execution_gas_units": "5", + "total_charge_gas_units": "12", + "storage_fee_refund_octas": "0" + }, + "inserted_at": "2024-10-15T05:16:55.191117", + "event_index": 2, + "indexed_type": "0x1::transaction_fee::FeeStatement" + } +] \ No newline at end of file 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 new file mode 100644 index 000000000..94ba261f3 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "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, + "inserted_at": "2024-10-15T05:16:57.771610" + } +] \ 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 new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/current_fungible_asset_balances.json @@ -0,0 +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/fungible_asset_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_activities.json @@ -0,0 +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/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_balances.json @@ -0,0 +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/fungible_asset_metadata.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ 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 new file mode 100644 index 000000000..5b418f2b1 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "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, + "inserted_at": "2024-10-15T05:16:55.270115" + } +] \ 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 new file mode 100644 index 000000000..2cc36a315 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/current_fungible_asset_balances.json @@ -0,0 +1,50 @@ +[ + { + "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", + "inserted_at": "2024-10-15T05:16:55.264297" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:55.264297" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:55.264297" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:55.264297" + } +] \ 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 new file mode 100644 index 000000000..4aa6149e0 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_activities.json @@ -0,0 +1,78 @@ +[ + { + "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", + "inserted_at": "2024-10-15T05:16:54.793594", + "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", + "inserted_at": "2024-10-15T05:16:54.793594", + "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", + "inserted_at": "2024-10-15T05:16:54.793594", + "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", + "inserted_at": "2024-10-15T05:16:54.793594", + "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 new file mode 100644 index 000000000..07d9814a4 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_balances.json @@ -0,0 +1,54 @@ +[ + { + "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", + "inserted_at": "2024-10-15T05:16:55.253856" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:55.253856" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:55.253856" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:55.253856" + } +] \ 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 new file mode 100644 index 000000000..6f61d2773 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/1255836496/fungible_asset_metadata.json @@ -0,0 +1,20 @@ +[ + { + "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, + "inserted_at": "2024-10-15T05:16:55.056027", + "supply_v2": "17374075418", + "maximum_v2": "340282366920938463463374607431768211455" + } +] \ 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 new file mode 100644 index 000000000..240eb07ab --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "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, + "inserted_at": "2024-10-15T05:16:56.913064" + } +] \ 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 new file mode 100644 index 000000000..a4834fa77 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/current_fungible_asset_balances.json @@ -0,0 +1,26 @@ +[ + { + "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", + "inserted_at": "2024-10-15T05:16:56.910478" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:56.910478" + } +] \ 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 new file mode 100644 index 000000000..3de70092e --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_activities.json @@ -0,0 +1,40 @@ +[ + { + "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", + "inserted_at": "2024-10-15T05:16:56.507588", + "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", + "inserted_at": "2024-10-15T05:16:56.507588", + "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 new file mode 100644 index 000000000..a837b8657 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_balances.json @@ -0,0 +1,28 @@ +[ + { + "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", + "inserted_at": "2024-10-15T05:16:56.905449" + }, + { + "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", + "inserted_at": "2024-10-15T05:16:56.905449" + } +] \ 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 new file mode 100644 index 000000000..ae1143fb1 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/278556781/fungible_asset_metadata.json @@ -0,0 +1,20 @@ +[ + { + "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, + "inserted_at": "2024-10-15T05:16:56.771727", + "supply_v2": null, + "maximum_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/5523474016/coin_supply.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json new file mode 100644 index 000000000..80a05f16c --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 5523474016, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29159026553346716168", + "transaction_timestamp": "2024-07-29T00:02:18", + "transaction_epoch": 16643, + "inserted_at": "2024-10-15T05:16:57.349833" + } +] \ 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 new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/current_fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ 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 new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_activities.json @@ -0,0 +1 @@ +[] \ 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 new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_balances.json @@ -0,0 +1 @@ +[] \ 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 new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5523474016/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ 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/5979639459/coin_supply.json new file mode 100644 index 000000000..19c29be9d --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 5979639459, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29164832318786122251", + "transaction_timestamp": "2024-09-13T16:48:29", + "transaction_epoch": 17778, + "inserted_at": "2024-10-15T05:16:54.402430" + } +] \ No newline at end of file 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/5979639459/current_fungible_asset_balances.json new file mode 100644 index 000000000..a26ddda00 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/current_fungible_asset_balances.json @@ -0,0 +1,26 @@ +[ + { + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10", + "last_transaction_timestamp": "2024-09-13T16:48:29", + "last_transaction_version": 5979639459, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.392129" + }, + { + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "16673484350", + "last_transaction_timestamp": "2024-09-13T16:48:29", + "last_transaction_version": 5979639459, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.392129" + } +] \ 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_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json new file mode 100644 index 000000000..6c17156cd --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_activities.json @@ -0,0 +1,59 @@ +[ + { + "transaction_version": 5979639459, + "event_index": -1, + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "99900", + "type_": "0x1::aptos_coin::GasFeeEvent", + "is_gas_fee": true, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::aptos_account::transfer", + "block_height": 354619634, + "token_standard": "v1", + "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:16:54.031990", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5979639459, + "event_index": 1, + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "10", + "type_": "0x1::coin::WithdrawEvent", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::aptos_account::transfer", + "block_height": 354619634, + "token_standard": "v1", + "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:16:54.031990", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5979639459, + "event_index": 2, + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "10", + "type_": "0x1::coin::DepositEvent", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x1::aptos_account::transfer", + "block_height": 354619634, + "token_standard": "v1", + "transaction_timestamp": "2024-09-13T16:48:29", + "inserted_at": "2024-10-15T05:16:54.031990", + "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/5979639459/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json new file mode 100644 index 000000000..53a1af128 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_balances.json @@ -0,0 +1,28 @@ +[ + { + "transaction_version": 5979639459, + "write_set_change_index": 0, + "storage_id": "0x32edf0b123cd57094ba7b0b5a0b1524e0f2117b547adf65e8b0c08b39e30d242", + "owner_address": "0x54ce130990ecf55cd12de74bff03dcfaacf63066e0945d3c415d61644303da39", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "16673484350", + "transaction_timestamp": "2024-09-13T16:48:29", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.313422" + }, + { + "transaction_version": 5979639459, + "write_set_change_index": 2, + "storage_id": "0x239f9719aceb8223231f615e436fcfc8b7e7a6cb03350d00dc72b47678e5d78b", + "owner_address": "0xb7a4a81a3d513e3e18ee6bec61a001d7e18c5d92bb6645a2f21f0b0fec2531a6", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "10", + "transaction_timestamp": "2024-09-13T16:48:29", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:54.313422" + } +] \ 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 new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5979639459/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file 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/5992795934/coin_supply.json new file mode 100644 index 000000000..729a5959d --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/coin_supply.json @@ -0,0 +1,11 @@ +[ + { + "transaction_version": 5992795934, + "coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6", + "coin_type": "0x1::aptos_coin::AptosCoin", + "supply": "29165678689185321503", + "transaction_timestamp": "2024-09-16T06:58:10", + "transaction_epoch": 17841, + "inserted_at": "2024-10-15T05:16:56.088926" + } +] \ No newline at end of file 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/5992795934/current_fungible_asset_balances.json new file mode 100644 index 000000000..38d0269b9 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/current_fungible_asset_balances.json @@ -0,0 +1,38 @@ +[ + { + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "18901942640", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:56.081056" + }, + { + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "0", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:56.081056" + }, + { + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "9996985969300000000", + "last_transaction_timestamp": "2024-09-16T06:58:10", + "last_transaction_version": 5992795934, + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:56.081056" + } +] \ 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_activities.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json new file mode 100644 index 000000000..3e6f92c89 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_activities.json @@ -0,0 +1,59 @@ +[ + { + "transaction_version": 5992795934, + "event_index": -1, + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_frozen": null, + "amount": "1200", + "type_": "0x1::aptos_coin::GasFeeEvent", + "is_gas_fee": true, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x7120b5552460116c3734ec3fed721e376bf9afc10c1bba13c678d74cd4608f12::TeviStar::force_transfer", + "block_height": 356437526, + "token_standard": "v1", + "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:16:55.666070", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5992795934, + "event_index": 0, + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_frozen": null, + "amount": "100000000", + "type_": "0x1::fungible_asset::Withdraw", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x7120b5552460116c3734ec3fed721e376bf9afc10c1bba13c678d74cd4608f12::TeviStar::force_transfer", + "block_height": 356437526, + "token_standard": "v2", + "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:16:55.666070", + "storage_refund_amount": "0" + }, + { + "transaction_version": 5992795934, + "event_index": 1, + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_frozen": null, + "amount": "100000000", + "type_": "0x1::fungible_asset::Deposit", + "is_gas_fee": false, + "gas_fee_payer_address": null, + "is_transaction_success": true, + "entry_function_id_str": "0x7120b5552460116c3734ec3fed721e376bf9afc10c1bba13c678d74cd4608f12::TeviStar::force_transfer", + "block_height": 356437526, + "token_standard": "v2", + "transaction_timestamp": "2024-09-16T06:58:10", + "inserted_at": "2024-10-15T05:16:55.666070", + "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/5992795934/fungible_asset_balances.json b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json new file mode 100644 index 000000000..9ba1049a7 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_balances.json @@ -0,0 +1,41 @@ +[ + { + "transaction_version": 5992795934, + "write_set_change_index": 0, + "storage_id": "0x8bd5745daa2d6e5817819c6bf37600196e55cfba8c5bcdfdf55684bf4accbb9c", + "owner_address": "0x422e4585fdb8705aeaafb9501e7e03dc8125134da04ed8322244687c50c3fa55", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "0", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.923614" + }, + { + "transaction_version": 5992795934, + "write_set_change_index": 2, + "storage_id": "0x5120dc6832daa352228ba75c1e7e73f57a80b608c900a7060382516a5c035f20", + "owner_address": "0xd34ea8c6faa9d25a9f07504759c1d92bd5ad05af89062d57cf69dd4861fe3e3c", + "asset_type": "0x1::aptos_coin::AptosCoin", + "is_primary": true, + "is_frozen": false, + "amount": "18901942640", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v1", + "inserted_at": "2024-10-15T05:16:55.923614" + }, + { + "transaction_version": 5992795934, + "write_set_change_index": 4, + "storage_id": "0xfe90bdd996728b93e09f5d59fd91d6d44be85ab7acea5d1ed535b4c13b2c32c0", + "owner_address": "0x13fc6cb932ab90e65ce901460ce8d4b232d4e365294c6ea5afca94625adba47f", + "asset_type": "0x618d700859af35c08518d1552c2601808261288cfd032461fb3424587484ac7f", + "is_primary": true, + "is_frozen": false, + "amount": "9996985969300000000", + "transaction_timestamp": "2024-09-16T06:58:10", + "token_standard": "v2", + "inserted_at": "2024-10-15T05:16:55.923614" + } +] \ 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 new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/imported_testnet_txns/fungible_asset_processor/5992795934/fungible_asset_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/src/diff_tests/all_tests.rs b/rust/integration-tests/src/diff_tests/all_tests.rs index c86e075ee..cbf60125a 100644 --- a/rust/integration-tests/src/diff_tests/all_tests.rs +++ b/rust/integration-tests/src/diff_tests/all_tests.rs @@ -8,7 +8,7 @@ mod test { fungible_asset_processor::load_data as load_fungible_asset_data, token_v2_processor::load_data as load_token_v2_data, }, - diff_tests::diff_tests_helper::{ + diff_tests::{ get_expected_imported_mainnet_txns, get_expected_imported_testnet_txns, get_expected_scripted_txns, remove_inserted_at, remove_transaction_timestamp, }, diff --git a/rust/integration-tests/src/diff_tests/mod.rs b/rust/integration-tests/src/diff_tests/mod.rs index 5c40dba34..0396cfce0 100644 --- a/rust/integration-tests/src/diff_tests/mod.rs +++ b/rust/integration-tests/src/diff_tests/mod.rs @@ -1,59 +1,61 @@ mod all_tests; -#[cfg(test)] -pub mod diff_tests_helper { - use serde_json::Value; +use serde_json::Value; - pub fn remove_inserted_at(value: &mut Value) { - if let Some(array) = value.as_array_mut() { - for item in array.iter_mut() { - if let Some(obj) = item.as_object_mut() { - obj.remove("inserted_at"); - } +#[allow(dead_code)] +pub fn remove_inserted_at(value: &mut Value) { + if let Some(array) = value.as_array_mut() { + for item in array.iter_mut() { + if let Some(obj) = item.as_object_mut() { + obj.remove("inserted_at"); } } } +} - pub fn remove_transaction_timestamp(value: &mut Value) { - if let Some(array) = value.as_array_mut() { - for item in array.iter_mut() { - if let Some(obj) = item.as_object_mut() { - obj.remove("transaction_timestamp"); - } +#[allow(dead_code)] +pub fn remove_transaction_timestamp(value: &mut Value) { + if let Some(array) = value.as_array_mut() { + for item in array.iter_mut() { + if let Some(obj) = item.as_object_mut() { + obj.remove("transaction_timestamp"); } } } +} - pub fn get_expected_imported_testnet_txns( - processor_name: &str, - txn_version: &str, - table_name: &str, - ) -> String { - format!( - "expected_db_output_files/imported_testnet_txns/{}/{}/{}.json", - processor_name, txn_version, table_name - ) - } +#[allow(dead_code)] +pub fn get_expected_imported_testnet_txns( + processor_name: &str, + txn_version: &str, + table_name: &str, +) -> String { + format!( + "expected_db_output_files/imported_testnet_txns/{}/{}/{}.json", + processor_name, txn_version, table_name + ) +} - pub fn get_expected_imported_mainnet_txns( - processor_name: &str, - txn_version: &str, - table_name: &str, - ) -> String { - format!( - "expected_db_output_files/imported_mainnet_txns/{}/{}/{}.json", - processor_name, txn_version, table_name - ) - } +#[allow(dead_code)] +pub fn get_expected_imported_mainnet_txns( + processor_name: &str, + txn_version: &str, + table_name: &str, +) -> String { + format!( + "expected_db_output_files/imported_mainnet_txns/{}/{}/{}.json", + processor_name, txn_version, table_name + ) +} - pub fn get_expected_scripted_txns( - processor_name: &str, - txn_version: &str, - table_name: &str, - ) -> String { - format!( - "expected_db_output_files/scripted_txns/{}/{}/{}.json", - processor_name, txn_version, table_name - ) - } +#[allow(dead_code)] +pub fn get_expected_scripted_txns( + processor_name: &str, + txn_version: &str, + table_name: &str, +) -> String { + format!( + "expected_db_output_files/scripted_txns/{}/{}/{}.json", + processor_name, txn_version, table_name + ) } diff --git a/rust/integration-tests/src/lib.rs b/rust/integration-tests/src/lib.rs index 2a57c7b55..b26993fec 100644 --- a/rust/integration-tests/src/lib.rs +++ b/rust/integration-tests/src/lib.rs @@ -18,6 +18,9 @@ mod diff_tests; mod models; mod scenarios_tests; +#[cfg(test)] +mod sdk_tests; + /// The test context struct holds the test name and the transaction batches. pub struct TestContext { pub transaction_batches: Vec, diff --git a/rust/integration-tests/src/sdk_tests/events_processor_tests.rs b/rust/integration-tests/src/sdk_tests/events_processor_tests.rs new file mode 100644 index 000000000..8538047b6 --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/events_processor_tests.rs @@ -0,0 +1,101 @@ +#[allow(clippy::needless_return)] +#[cfg(test)] +mod tests { + use crate::{ + diff_test_helper::event_processor::load_data, + sdk_tests::{ + run_processor_test, setup_test_environment, validate_json, DEFAULT_OUTPUT_FOLDER, + }, + }; + use ahash::AHashMap; + use aptos_indexer_test_transactions::ALL_IMPORTED_TESTNET_TXNS; + use aptos_indexer_testing_framework::{cli_parser::get_test_config, database::TestDatabase}; + use aptos_protos::transaction::v1::Transaction; + use sdk_processor::{ + config::{ + db_config::{DbConfig, PostgresConfig}, + indexer_processor_config::IndexerProcessorConfig, + processor_config::{DefaultProcessorConfig, ProcessorConfig}, + }, + processors::events_processor::EventsProcessor, + }; + use std::collections::HashSet; + + // This test cases runs the events processor and validates the output of all available transactions proto jsons + #[tokio::test] + 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"); + + // 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 transaction_stream_config = + test_context.create_transaction_stream_config(txn_version); + let postgres_config = PostgresConfig { + connection_string: db_url.to_string(), + db_pool_size: 100, + }; + + let db_config = DbConfig::PostgresConfig(postgres_config); + let default_processor_config = DefaultProcessorConfig { + per_table_chunk_sizes: AHashMap::new(), + channel_size: 100, + deprecated_tables: HashSet::new(), + }; + + let processor_config = ProcessorConfig::EventsProcessor(default_processor_config); + let process_name = processor_config.name(); + let indexer_processor_config = IndexerProcessorConfig { + processor_config, + transaction_stream_config, + db_config, + }; + + 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, + txn_version, + diff_flag, + output_path.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version, + process_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"); + }, + } + } + } +} 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 new file mode 100644 index 000000000..7ad4a4c5b --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs @@ -0,0 +1,100 @@ +#[allow(clippy::needless_return)] +#[cfg(test)] +mod tests { + use crate::{ + diff_test_helper::fungible_asset_processor::load_data, + sdk_tests::{ + run_processor_test, setup_test_environment, validate_json, DEFAULT_OUTPUT_FOLDER, + }, + }; + use ahash::AHashMap; + use aptos_indexer_test_transactions::ALL_IMPORTED_TESTNET_TXNS; + use aptos_indexer_testing_framework::{cli_parser::get_test_config, database::TestDatabase}; + use aptos_protos::transaction::v1::Transaction; + use sdk_processor::{ + config::{ + db_config::{DbConfig, PostgresConfig}, + indexer_processor_config::IndexerProcessorConfig, + processor_config::{DefaultProcessorConfig, ProcessorConfig}, + }, + processors::fungible_asset_processor::FungibleAssetProcessor, + }; + use std::collections::HashSet; + + #[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::>(); + + 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 transaction_stream_config = + test_context.create_transaction_stream_config(txn_version); + let postgres_config = PostgresConfig { + connection_string: db_url.to_string(), + db_pool_size: 100, + }; + + let db_config = DbConfig::PostgresConfig(postgres_config); + let default_processor_config = DefaultProcessorConfig { + per_table_chunk_sizes: AHashMap::new(), + channel_size: 100, + deprecated_tables: HashSet::new(), + }; + + let processor_config = + ProcessorConfig::FungibleAssetProcessor(default_processor_config); + + let indexer_processor_config = IndexerProcessorConfig { + processor_config, + transaction_stream_config, + db_config, + }; + + let fungible_asset_processor = FungibleAssetProcessor::new(indexer_processor_config) + .await + .expect("Failed to create FungibleAssetProcessor"); + + match run_processor_test( + &mut test_context, + fungible_asset_processor, + load_data, + &db_url, + txn_version, + diff_flag, + output_path.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version, + "fungible_asset_processor", + output_path.clone(), + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + txn_version, 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 new file mode 100644 index 000000000..f60333cf3 --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/mod.rs @@ -0,0 +1,135 @@ +use crate::diff_tests::remove_transaction_timestamp; +use aptos_indexer_processor_sdk::traits::processor_trait::ProcessorTrait; +use aptos_indexer_testing_framework::{ + database::{PostgresTestDatabase, TestDatabase}, + sdk_test_context::{remove_inserted_at, SdkTestContext}, +}; +use assert_json_diff::assert_json_eq; +use diesel::{Connection, PgConnection}; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path}; + +mod events_processor_tests; +mod fungible_asset_processor_tests; +mod test_cli_flag_util; + +#[allow(dead_code)] +const DEFAULT_OUTPUT_FOLDER: &str = "sdk_expected_db_output_files/"; + +pub fn read_and_parse_json(path: &str) -> anyhow::Result { + match fs::read_to_string(path) { + Ok(content) => match serde_json::from_str::(&content) { + Ok(json) => Ok(json), + Err(e) => { + eprintln!("[ERROR] Failed to parse JSON at {}: {}", path, e); + Err(anyhow::anyhow!("Failed to parse JSON: {}", e)) + }, + }, + Err(e) => { + eprintln!("[ERROR] Failed to read file at {}: {}", path, e); + Err(anyhow::anyhow!("Failed to read file: {}", e)) + }, + } +} + +// Common setup for database and test context +async fn setup_test_environment(transactions: &[&[u8]]) -> (PostgresTestDatabase, SdkTestContext) { + let mut db = PostgresTestDatabase::new(); + db.setup().await.unwrap(); + + let test_context = SdkTestContext::new(transactions).await.unwrap(); + + (db, test_context) +} + +fn validate_json( + db_values: &mut HashMap, + txn_version: u64, + processor_name: &str, + output_path: String, +) -> 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 mut expected_json = match read_and_parse_json(expected_file_path.to_str().unwrap()) { + Ok(json) => json, + Err(e) => { + eprintln!( + "[ERROR] Error handling JSON for processor {} table {} and transaction version {}: {}", + processor_name, table_name, txn_version, e + ); + panic!("Failed to read and parse JSON for table: {}", table_name); + }, + }; + + // TODO: Clean up non-deterministic fields (e.g., timestamps, `inserted_at`) + remove_inserted_at(db_value); + remove_transaction_timestamp(db_value); + remove_inserted_at(&mut expected_json); + remove_transaction_timestamp(&mut expected_json); + + assert_json_eq!(db_value, expected_json); + } + Ok(()) +} + +// Helper function to configure and run the processor +async fn run_processor_test( + test_context: &mut SdkTestContext, + processor: impl ProcessorTrait, + load_data: F, + db_url: &str, + txn_version: u64, + diff_flag: bool, + output_path: String, +) -> anyhow::Result> +where + F: Fn(&mut PgConnection, &str) -> anyhow::Result> + + Send + + Sync + + 'static, +{ + println!( + "[INFO] Running {} test for transaction version: {}", + processor.name(), + txn_version + ); + + let db_value = test_context + .run( + &processor, + db_url, + txn_version, + diff_flag, + output_path.clone(), + move |db_url| { + // TODO: might not need this. + let mut conn = + PgConnection::establish(db_url).expect("Failed to establish DB connection"); + + let db_values = match load_data(&mut conn, &txn_version.to_string()) { + Ok(db_data) => db_data, + Err(e) => { + eprintln!( + "[ERROR] Failed to load data for transaction version {}: {}", + txn_version, e + ); + return Err(e); + }, + }; + + if db_values.is_empty() { + eprintln!("[WARNING] No data found for txn version: {}", txn_version); + } + + Ok(db_values) + }, + ) + .await?; + + Ok(db_value) +} diff --git a/rust/integration-tests/src/sdk_tests/temp.rs b/rust/integration-tests/src/sdk_tests/temp.rs new file mode 100644 index 000000000..79986514c --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/temp.rs @@ -0,0 +1,140 @@ +#[allow(clippy::needless_return)] +#[cfg(test)] +mod tests { + use crate::{ + diff_test_helper::{ + processors::fungible_asset_processor::FungibleAssetProcessorTestHelper, + }, + sdk_tests::{ + setup_test_environment, + test_cli_flag_util::{parse_test_args, TestArgs}, + validate_json, + }, + }; + use ahash::AHashMap; + use aptos_indexer_test_transactions::ALL_IMPORTED_TESTNET_TXNS; + use aptos_indexer_testing_framework::{ + database::{TestDatabase}, + }; + use aptos_protos::transaction::v1::Transaction; + use once_cell::sync::Lazy; + use sdk_processor::{ + config::{ + db_config::{DbConfig, PostgresConfig}, + indexer_processor_config::IndexerProcessorConfig, + processor_config::{ + DefaultProcessorConfig, ProcessorConfig, + }, + }, + processors::fungible_asset_processor::FungibleAssetProcessor, + }; + use std::{collections::HashSet}; + use crate::sdk_tests::run_processor_test; + use crate::sdk_tests::get_test_config; + use crate::sdk_tests::DEFAULT_OUTPUT_FOLDER; + use std::collections::HashMap; + + #[tokio::test] + async fn fa_processor_db_output_diff_test() { + // Step 0: Get the test configuration (args) + 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 mut version_to_txn_name = HashMap::new(); + // Step 1: set up an input transaction that will be used + let transaction_batches = ALL_IMPORTED_TESTNET_TXNS + .iter() + .map(|&txn| { + // we are only going to use this txn_name for scripted txn + let txn_name = get_transaction_name(txn) + .unwrap_or("imported_transactions") + .to_string(); + let txn: Transaction = serde_json::from_slice(txn).unwrap(); + let txn_version = txn.version; + version_to_txn_name.insert(txn_version, txn_name.to_string()); + txn + }) + .collect::>(); + + + // .map(|txn| serde_json::from_slice(txn).unwrap()) + // .collect::>(); + + // for scdripted: + // .map(|&txn| { + // // we are only going to use this txn_name for scripted txn + // let txn_name = get_transaction_name(txn) + // .unwrap_or("imported_transactions") + // .to_string(); + // let txn: Transaction = serde_json::from_slice(txn).unwrap(); + // let txn_version = txn.version; + // version_to_txn_name.insert(txn_version, txn_name.to_string()); + // txn + // }) + + 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 transaction_stream_config = test_context.create_transaction_stream_config(txn_version); + let postgres_config = PostgresConfig { + connection_string: db_url.to_string(), + db_pool_size: 100, + }; + + let db_config = DbConfig::PostgresConfig(postgres_config); + let default_processor_config = DefaultProcessorConfig { + per_table_chunk_sizes: AHashMap::new(), + channel_size: 100, + deprecated_tables: HashSet::new(), + }; + + let processor_config = ProcessorConfig::FungibleAssetProcessor(default_processor_config); + + let indexer_processor_config = IndexerProcessorConfig { + processor_config, + transaction_stream_config, + db_config, + }; + + let fungible_asset_processor = FungibleAssetProcessor::new(indexer_processor_config) + .await + .expect("Failed to create FungibleAssetProcessor"); + + let test_helper = FungibleAssetProcessorTestHelper; + + match run_processor_test( + &mut test_context, + fungible_asset_processor, + test_helper, + &db_url, + txn_version, + diff_flag, + output_path.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + txn_version, + "fungible_asset_processor", + output_path.clone(), + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + txn_version, e + ); + panic!("Test failed due to processor error"); + }, + } + } + } +} diff --git a/rust/integration-tests/src/sdk_tests/test_cli_flag_util.rs b/rust/integration-tests/src/sdk_tests/test_cli_flag_util.rs new file mode 100644 index 000000000..c84793565 --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/test_cli_flag_util.rs @@ -0,0 +1,43 @@ +#[allow(dead_code)] +#[derive(Debug, Clone)] +pub struct TestArgs { + pub generate_output: bool, + pub output_path: Option, +} + +#[allow(dead_code)] +pub fn parse_test_args() -> TestArgs { + // Capture the raw arguments + let raw_args: Vec = std::env::args().collect(); + + // Log the raw arguments for debugging + println!("Raw arguments: {:?}", raw_args); + + // Find the "--" separator (if it exists) + let clap_args_position = raw_args.iter().position(|arg| arg == "--"); + + // Only pass the arguments that come after "--", if it exists + let custom_args: Vec = match clap_args_position { + Some(position) => raw_args[position + 1..].to_vec(), // Slice after `--` + None => Vec::new(), // If no `--` is found, treat as no custom args + }; + println!("Custom arguments: {:?}", custom_args); + + // Manually parse the "--generate-output" flag + let generate_output_flag = custom_args.contains(&"--generate-output".to_string()); + + // Manually parse the "--output-path" flag and get its associated value + let output_path = custom_args + .windows(2) + .find(|args| args[0] == "--output-path") + .map(|args| args[1].clone()); // Correct the flag name to `--output-path` + + // Log the parsed values + println!("Parsed generate_output_flag: {}", generate_output_flag); + println!("Parsed output_path: {:?}", output_path); + + TestArgs { + generate_output: generate_output_flag, + output_path, + } +} diff --git a/rust/sdk-processor/src/config/indexer_processor_config.rs b/rust/sdk-processor/src/config/indexer_processor_config.rs index 8d5fde492..6b3921613 100644 --- a/rust/sdk-processor/src/config/indexer_processor_config.rs +++ b/rust/sdk-processor/src/config/indexer_processor_config.rs @@ -6,7 +6,10 @@ use crate::processors::{ events_processor::EventsProcessor, fungible_asset_processor::FungibleAssetProcessor, }; use anyhow::Result; -use aptos_indexer_processor_sdk::aptos_indexer_transaction_stream::TransactionStreamConfig; +use aptos_indexer_processor_sdk::{ + aptos_indexer_transaction_stream::TransactionStreamConfig, + traits::processor_trait::ProcessorTrait, +}; use aptos_indexer_processor_sdk_server_framework::RunnableConfig; use serde::{Deserialize, Serialize}; diff --git a/rust/sdk-processor/src/processors/events_processor.rs b/rust/sdk-processor/src/processors/events_processor.rs index 115ffff06..853f16da2 100644 --- a/rust/sdk-processor/src/processors/events_processor.rs +++ b/rust/sdk-processor/src/processors/events_processor.rs @@ -20,7 +20,7 @@ use aptos_indexer_processor_sdk::{ aptos_indexer_transaction_stream::{TransactionStream, TransactionStreamConfig}, builder::ProcessorBuilder, common_steps::{OrderByVersionStep, TransactionStreamStep}, - traits::IntoRunnableStep, + traits::{processor_trait::ProcessorTrait, IntoRunnableStep}, }; use std::time::Duration; use tracing::{debug, info}; @@ -53,8 +53,15 @@ impl EventsProcessor { }, } } +} + +#[async_trait::async_trait] +impl ProcessorTrait for EventsProcessor { + fn name(&self) -> &'static str { + self.config.processor_config.name() + } - pub async fn run_processor(self) -> Result<()> { + async fn run_processor(&self) -> Result<()> { let processor_name = self.config.processor_config.name(); // Run migrations @@ -78,7 +85,7 @@ impl EventsProcessor { .await?; check_or_update_chain_id(grpc_chain_id as i64, self.db_pool.clone()).await?; - let processor_config = match self.config.processor_config { + let processor_config = match self.config.processor_config.clone() { ProcessorConfig::EventsProcessor(processor_config) => processor_config, _ => { return Err(anyhow::anyhow!( @@ -92,7 +99,7 @@ impl EventsProcessor { // Define processor steps let transaction_stream = TransactionStreamStep::new(TransactionStreamConfig { starting_version: Some(starting_version), - ..self.config.transaction_stream_config + ..self.config.transaction_stream_config.clone() }) .await?; let events_extractor = EventsExtractor {}; diff --git a/rust/sdk-processor/src/processors/fungible_asset_processor.rs b/rust/sdk-processor/src/processors/fungible_asset_processor.rs index 1351fd07a..8044bf88b 100644 --- a/rust/sdk-processor/src/processors/fungible_asset_processor.rs +++ b/rust/sdk-processor/src/processors/fungible_asset_processor.rs @@ -23,7 +23,7 @@ use aptos_indexer_processor_sdk::{ aptos_indexer_transaction_stream::{TransactionStream, TransactionStreamConfig}, builder::ProcessorBuilder, common_steps::{OrderByVersionStep, TransactionStreamStep}, - traits::IntoRunnableStep, + traits::{processor_trait::ProcessorTrait, IntoRunnableStep}, }; use processor::worker::TableFlags; use std::time::Duration; @@ -57,8 +57,15 @@ impl FungibleAssetProcessor { }, } } +} + +#[async_trait::async_trait] +impl ProcessorTrait for FungibleAssetProcessor { + fn name(&self) -> &'static str { + self.config.processor_config.name() + } - pub async fn run_processor(self) -> Result<()> { + async fn run_processor(&self) -> Result<()> { let processor_name = self.config.processor_config.name(); // Run migrations @@ -82,7 +89,7 @@ impl FungibleAssetProcessor { .await?; check_or_update_chain_id(grpc_chain_id as i64, self.db_pool.clone()).await?; - let processor_config = match self.config.processor_config { + let processor_config = match &self.config.processor_config { ProcessorConfig::FungibleAssetProcessor(processor_config) => processor_config, _ => return Err(anyhow::anyhow!("Processor config is wrong type")), }; @@ -92,13 +99,13 @@ impl FungibleAssetProcessor { // Define processor steps let transaction_stream = TransactionStreamStep::new(TransactionStreamConfig { starting_version: Some(starting_version), - ..self.config.transaction_stream_config + ..self.config.transaction_stream_config.clone() }) .await?; let fa_extractor = FungibleAssetExtractor {}; let fa_storer = FungibleAssetStorer::new( self.db_pool.clone(), - processor_config, + processor_config.clone(), deprecated_table_flags, ); let order_step = OrderByVersionStep::new( diff --git a/rust/sdk-processor/src/steps/events_processor/events_extractor.rs b/rust/sdk-processor/src/steps/events_processor/events_extractor.rs index 442148c76..bb444d986 100644 --- a/rust/sdk-processor/src/steps/events_processor/events_extractor.rs +++ b/rust/sdk-processor/src/steps/events_processor/events_extractor.rs @@ -57,6 +57,7 @@ impl Processable for EventsExtractor { TxnData::BlockMetadata(tx_inner) => &tx_inner.events, TxnData::Genesis(tx_inner) => &tx_inner.events, TxnData::User(tx_inner) => &tx_inner.events, + TxnData::Validator(tx_inner) => &tx_inner.events, _ => &default, };