From 9ae249c0ae1b66ad1433ebe9eba75ae11267a58f Mon Sep 17 00:00:00 2001 From: Renee Tso <8248583+rtso@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:51:13 -0500 Subject: [PATCH] Add objects tests (#590) --- .../current_token_pending_claims.json | 1 + .../current_token_pending_claims.json | 1 + .../2739163/current_token_pending_claims.json | 1 + .../current_token_pending_claims.json | 1 + .../current_token_pending_claims.json | 1 + .../423176063/collections_v2.json | 20 + .../423176063/current_collections_v2.json | 19 + .../423176063/current_token_datas_v2.json | 147 ++++++ .../current_token_ownerships_v2.json | 167 +++++++ .../current_token_pending_claims.json | 1 + .../423176063/current_token_v2_metadata.json | 29 ++ .../423176063/token_activities_v2.json | 427 ++++++++++++++++++ .../423176063/token_datas_v2.json | 65 +++ .../423176063/token_ownerships_v2.json | 226 +++++++++ .../current_token_pending_claims.json | 1 + .../578318306/collections_v2.json | 1 + .../578318306/current_collections_v2.json | 1 + .../578318306/current_token_datas_v2.json | 19 + .../current_token_ownerships_v2.json | 32 ++ .../current_token_pending_claims.json | 1 + .../578318306/current_token_v2_metadata.json | 1 + .../578318306/token_activities_v2.json | 19 + .../578318306/token_datas_v2.json | 20 + .../578318306/token_ownerships_v2.json | 34 ++ .../578366445/current_token_datas_v2.json | 8 +- .../current_token_ownerships_v2.json | 4 +- .../current_token_pending_claims.json | 1 + .../current_objects.json | 22 + .../objects.json | 123 +++++ .../diff_test_helper/token_v2_processor.rs | 17 +- rust/integration-tests/src/sdk_tests/mod.rs | 12 + .../src/sdk_tests/objects_processor_tests.rs | 140 ++++++ 32 files changed, 1551 insertions(+), 11 deletions(-) create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/1056780409/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/214433968/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/2739163/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/275584410/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/303690531/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/collections_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_collections_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_datas_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_ownerships_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_v2_metadata.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_activities_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_datas_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_ownerships_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/438536688/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/collections_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_collections_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_datas_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_ownerships_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_pending_claims.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_v2_metadata.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_activities_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_datas_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_ownerships_v2.json create mode 100644 rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/92331132/current_token_pending_claims.json create mode 100644 rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/current_objects.json create mode 100644 rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/objects.json create mode 100644 rust/integration-tests/src/sdk_tests/objects_processor_tests.rs diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/1056780409/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/1056780409/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/1056780409/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/214433968/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/214433968/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/214433968/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/2739163/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/2739163/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/2739163/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/275584410/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/275584410/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/275584410/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/303690531/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/303690531/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/303690531/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/collections_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/collections_v2.json new file mode 100644 index 000000000..b24fe37ba --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/collections_v2.json @@ -0,0 +1,20 @@ +[ + { + "transaction_version": 423176063, + "write_set_change_index": 19, + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "creator_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "collection_name": "APTS", + "description": "", + "uri": "https://img.apt-20.com/?tick=APTS", + "current_supply": "371647", + "max_supply": null, + "total_minted_v2": "997492", + "mutable_description": null, + "mutable_uri": null, + "table_handle_v1": null, + "token_standard": "v2", + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "collection_properties": null + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_collections_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_collections_v2.json new file mode 100644 index 000000000..7dea1e4ae --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_collections_v2.json @@ -0,0 +1,19 @@ +[ + { + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "creator_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "collection_name": "APTS", + "description": "", + "uri": "https://img.apt-20.com/?tick=APTS", + "current_supply": "371647", + "max_supply": null, + "total_minted_v2": "997492", + "mutable_description": null, + "mutable_uri": null, + "table_handle_v1": null, + "token_standard": "v2", + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "collection_properties": null + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_datas_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_datas_v2.json new file mode 100644 index 000000000..101691e90 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_datas_v2.json @@ -0,0 +1,147 @@ +[ + { + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "", + "description": "", + "token_properties": null, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": true, + "decimals": 0 + }, + { + "token_data_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "", + "description": "", + "token_properties": null, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": true, + "decimals": 0 + }, + { + "token_data_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "", + "description": "", + "token_properties": null, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": true, + "decimals": 0 + }, + { + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "APTS #1201557", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://img.apt-20.com/?tick=APTS&amt=23697", + "description": "", + "token_properties": { + "amt": "23697", + "tick": "APTS" + }, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": false, + "decimals": 0 + }, + { + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "APTS #1201558", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://img.apt-20.com/?tick=APTS&amt=21024", + "description": "", + "token_properties": { + "amt": "21024", + "tick": "APTS" + }, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": false, + "decimals": 0 + }, + { + "token_data_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "", + "description": "", + "token_properties": null, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": true, + "decimals": 0 + }, + { + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "APTS #1201556", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://img.apt-20.com/?tick=APTS&amt=23116", + "description": "", + "token_properties": { + "amt": "23116", + "tick": "APTS" + }, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": false, + "decimals": 0 + }, + { + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "", + "description": "", + "token_properties": null, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": true, + "decimals": 0 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_ownerships_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_ownerships_v2.json new file mode 100644 index 000000000..78586f17f --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_ownerships_v2.json @@ -0,0 +1,167 @@ +[ + { + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "token_data_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "token_data_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "owner_address": "0x51941247df7eed74d4c2c12fc3e370fd8685e966ecc2296240632702b7e8fe01", + "storage_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "owner_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "storage_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "owner_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "storage_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "owner_address": "0xd77e7d44ed29cdf33d1d6b161928b6b931b68bd029cd60dc6363aa22fbec3036", + "storage_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "token_data_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "owner_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "storage_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "owner_address": "0xdc4c565710b6b6beb201bba0e53fd07eace927de22059c4c8841e730ce28a38d", + "storage_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 423176063, + "last_transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_v2_metadata.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_v2_metadata.json new file mode 100644 index 000000000..41fcadfa1 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/current_token_v2_metadata.json @@ -0,0 +1,29 @@ +[ + { + "object_address": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "resource_type": "0x1fc2f33ab6b624e3e632ba861b755fd8e61d2c2e6cf8292e415880b4c198224d::inscription::InscriptionMetadata", + "data": { + "inscription_id": "1201557" + }, + "state_key_hash": "0xbbb6528a4ab90cc3924f4e3f75631334c5d8cef07e6b0cb49eba6cb1073297a4", + "last_transaction_version": 423176063 + }, + { + "object_address": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "resource_type": "0x1fc2f33ab6b624e3e632ba861b755fd8e61d2c2e6cf8292e415880b4c198224d::inscription::InscriptionMetadata", + "data": { + "inscription_id": "1201558" + }, + "state_key_hash": "0x4ed41b0285ab2330db8a1437339a9002b019a291021fe5971c49e781d748568d", + "last_transaction_version": 423176063 + }, + { + "object_address": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "resource_type": "0x1fc2f33ab6b624e3e632ba861b755fd8e61d2c2e6cf8292e415880b4c198224d::inscription::InscriptionMetadata", + "data": { + "inscription_id": "1201556" + }, + "state_key_hash": "0x28ba1a771d570f713e2f95d06d5e1a9bbaa0002165c558ccd4ae5cc327c1e46a", + "last_transaction_version": 423176063 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_activities_v2.json new file mode 100644 index 000000000..de6b99ed5 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_activities_v2.json @@ -0,0 +1,427 @@ +[ + { + "transaction_version": 423176063, + "event_index": 0, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "property_version_v1": "0", + "type_": "0x4::collection::BurnEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 1, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "property_version_v1": "0", + "type_": "0x4::collection::BurnEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 2, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "property_version_v1": "0", + "type_": "0x4::collection::BurnEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 3, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "property_version_v1": "0", + "type_": "0x4::collection::MintEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 4, + "event_account_address": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "property_version_v1": "0", + "type_": "0x1::object::TransferEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 6, + "event_account_address": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 7, + "event_account_address": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 8, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "property_version_v1": "0", + "type_": "0x4::collection::BurnEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 9, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "property_version_v1": "0", + "type_": "0x4::collection::MintEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 10, + "event_account_address": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "property_version_v1": "0", + "type_": "0x1::object::TransferEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 12, + "event_account_address": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 13, + "event_account_address": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 14, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "type_": "0x4::collection::MintEvent", + "from_address": "0xdc4c565710b6b6beb201bba0e53fd07eace927de22059c4c8841e730ce28a38d", + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 15, + "event_account_address": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "type_": "0x1::object::TransferEvent", + "from_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "to_address": "0xdc4c565710b6b6beb201bba0e53fd07eace927de22059c4c8841e730ce28a38d", + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 17, + "event_account_address": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": "0xdc4c565710b6b6beb201bba0e53fd07eace927de22059c4c8841e730ce28a38d", + "to_address": null, + "token_amount": "0", + "before_value": "APTS", + "after_value": "APTS #1201556", + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 18, + "event_account_address": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": "0xdc4c565710b6b6beb201bba0e53fd07eace927de22059c4c8841e730ce28a38d", + "to_address": null, + "token_amount": "0", + "before_value": "", + "after_value": "https://img.apt-20.com/?tick=APTS&amt=23116", + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 20, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "property_version_v1": "0", + "type_": "0x4::collection::BurnEvent", + "from_address": null, + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 21, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "type_": "0x4::collection::MintEvent", + "from_address": "0x51941247df7eed74d4c2c12fc3e370fd8685e966ecc2296240632702b7e8fe01", + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 22, + "event_account_address": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "type_": "0x1::object::TransferEvent", + "from_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "to_address": "0x51941247df7eed74d4c2c12fc3e370fd8685e966ecc2296240632702b7e8fe01", + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 24, + "event_account_address": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": "0x51941247df7eed74d4c2c12fc3e370fd8685e966ecc2296240632702b7e8fe01", + "to_address": null, + "token_amount": "0", + "before_value": "APTS", + "after_value": "APTS #1201557", + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 25, + "event_account_address": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": "0x51941247df7eed74d4c2c12fc3e370fd8685e966ecc2296240632702b7e8fe01", + "to_address": null, + "token_amount": "0", + "before_value": "", + "after_value": "https://img.apt-20.com/?tick=APTS&amt=23697", + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 26, + "event_account_address": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "type_": "0x4::collection::MintEvent", + "from_address": "0xd77e7d44ed29cdf33d1d6b161928b6b931b68bd029cd60dc6363aa22fbec3036", + "to_address": null, + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 27, + "event_account_address": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "type_": "0x1::object::TransferEvent", + "from_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "to_address": "0xd77e7d44ed29cdf33d1d6b161928b6b931b68bd029cd60dc6363aa22fbec3036", + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 29, + "event_account_address": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": "0xd77e7d44ed29cdf33d1d6b161928b6b931b68bd029cd60dc6363aa22fbec3036", + "to_address": null, + "token_amount": "0", + "before_value": "APTS", + "after_value": "APTS #1201558", + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + }, + { + "transaction_version": 423176063, + "event_index": 30, + "event_account_address": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "type_": "0x4::token::MutationEvent", + "from_address": "0xd77e7d44ed29cdf33d1d6b161928b6b931b68bd029cd60dc6363aa22fbec3036", + "to_address": null, + "token_amount": "0", + "before_value": "", + "after_value": "https://img.apt-20.com/?tick=APTS&amt=21024", + "entry_function_id_str": "0xa087b0c709f74e94ba74f3b99d5a03273a302981974d214ba7a6be1bfed01640::router::swap_exact_onput", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_datas_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_datas_v2.json new file mode 100644 index 000000000..c9f033694 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_datas_v2.json @@ -0,0 +1,65 @@ +[ + { + "transaction_version": 423176063, + "write_set_change_index": 11, + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "APTS #1201557", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://img.apt-20.com/?tick=APTS&amt=23697", + "token_properties": { + "amt": "23697", + "tick": "APTS" + }, + "description": "", + "token_standard": "v2", + "is_fungible_v2": false, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": null, + "decimals": 0 + }, + { + "transaction_version": 423176063, + "write_set_change_index": 16, + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "APTS #1201558", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://img.apt-20.com/?tick=APTS&amt=21024", + "token_properties": { + "amt": "21024", + "tick": "APTS" + }, + "description": "", + "token_standard": "v2", + "is_fungible_v2": false, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": null, + "decimals": 0 + }, + { + "transaction_version": 423176063, + "write_set_change_index": 26, + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "collection_id": "0xa3d9ad08adf8af8dc3bd6a4bdd910d2a1cc88bd5fbedae0ddaa3e89b260a785f", + "token_name": "APTS #1201556", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://img.apt-20.com/?tick=APTS&amt=23116", + "token_properties": { + "amt": "23116", + "tick": "APTS" + }, + "description": "", + "token_standard": "v2", + "is_fungible_v2": false, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "is_deleted_v2": null, + "decimals": 0 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_ownerships_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_ownerships_v2.json new file mode 100644 index 000000000..098251d98 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/423176063/token_ownerships_v2.json @@ -0,0 +1,226 @@ +[ + { + "transaction_version": 423176063, + "write_set_change_index": -27, + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "owner_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "storage_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "transaction_version": 423176063, + "write_set_change_index": -22, + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "owner_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "storage_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "transaction_version": 423176063, + "write_set_change_index": -15, + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "owner_address": "0xadeb45c274f9f4f535afe8957a8cf9ffecbd2b79026fba6c207111136d963f14", + "storage_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "transaction_version": 423176063, + "write_set_change_index": 0, + "token_data_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x0c44667c4af9d4dfede5b5da590e1b575a8babae14819872b14cbf0433ac0808", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "transaction_version": 423176063, + "write_set_change_index": 4, + "token_data_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "transaction_version": 423176063, + "write_set_change_index": 5, + "token_data_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x8d0fad636061612ab5f252afb836783666f93dcf8f6ac25414c01820caad0af3", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "transaction_version": 423176063, + "write_set_change_index": 6, + "token_data_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "transaction_version": 423176063, + "write_set_change_index": 7, + "token_data_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0x8d768d3131845c9d44aae4a0d2211e127b1d95968f6a8c4f2066eb59826109c6", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "transaction_version": 423176063, + "write_set_change_index": 11, + "token_data_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "property_version_v1": "0", + "owner_address": "0x51941247df7eed74d4c2c12fc3e370fd8685e966ecc2296240632702b7e8fe01", + "storage_id": "0x9f387c30bad7e61f9039e108acd92825b65547a46b213dfde3495b0f1ee69423", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "transaction_version": 423176063, + "write_set_change_index": 16, + "token_data_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "property_version_v1": "0", + "owner_address": "0xd77e7d44ed29cdf33d1d6b161928b6b931b68bd029cd60dc6363aa22fbec3036", + "storage_id": "0x9f41d314d043ba08ec319a6e5353c63716149855aa2258a65bdbd5a9462f6c36", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "transaction_version": 423176063, + "write_set_change_index": 21, + "token_data_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "transaction_version": 423176063, + "write_set_change_index": 22, + "token_data_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0xb9f07b6bdeb1ab7f106ebe49c1544121929b388e1c0171eda06143d8c2fce7dc", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + }, + { + "transaction_version": 423176063, + "write_set_change_index": 26, + "token_data_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "property_version_v1": "0", + "owner_address": "0xdc4c565710b6b6beb201bba0e53fd07eace927de22059c4c8841e730ce28a38d", + "storage_id": "0xbcb216aa0f66fc94068718ce725105af04d6553a97e75271dee12d0034f623d0", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": false + }, + { + "transaction_version": 423176063, + "write_set_change_index": 28, + "token_data_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "property_version_v1": "0", + "owner_address": "unknown", + "storage_id": "0xd5060832312d097bccfbacf10f361758c066f6f6a18fa3a14e69b0142d663e8a", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": null, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-01-28T00:50:32.552696", + "non_transferrable_by_owner": null + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/438536688/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/438536688/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/438536688/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/collections_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/collections_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/collections_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_collections_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_collections_v2.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_collections_v2.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_datas_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_datas_v2.json new file mode 100644 index 000000000..cafbfb000 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_datas_v2.json @@ -0,0 +1,19 @@ +[ + { + "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "collection_id": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "token_name": "Congratulations, your account is eligible to receive airdrop tokens!", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://pwncdn.com/nft/img/0x95008be282ee737ae0af3fcb648adb76e6d8c64b6688288e40a16225ddfbb665", + "description": "Congratulations, your account is eligible to receive airdrop tokens!", + "token_properties": {}, + "token_standard": "v2", + "is_fungible_v2": false, + "last_transaction_version": 578318306, + "last_transaction_timestamp": "2024-04-30T22:55:03.868021", + "is_deleted_v2": false, + "decimals": 0 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_ownerships_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_ownerships_v2.json new file mode 100644 index 000000000..8e323b852 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_ownerships_v2.json @@ -0,0 +1,32 @@ +[ + { + "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "property_version_v1": "0", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "storage_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 578318306, + "last_transaction_timestamp": "2024-04-30T22:55:03.868021", + "non_transferrable_by_owner": false + }, + { + "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "property_version_v1": "0", + "owner_address": "0x95008be282ee737ae0af3fcb648adb76e6d8c64b6688288e40a16225ddfbb665", + "storage_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "last_transaction_version": 578318306, + "last_transaction_timestamp": "2024-04-30T22:55:03.868021", + "non_transferrable_by_owner": false + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_v2_metadata.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_v2_metadata.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/current_token_v2_metadata.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_activities_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_activities_v2.json new file mode 100644 index 000000000..e00a3d5e3 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_activities_v2.json @@ -0,0 +1,19 @@ +[ + { + "transaction_version": 578318306, + "event_index": 0, + "event_account_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "property_version_v1": "0", + "type_": "0x1::object::TransferEvent", + "from_address": "0x95008be282ee737ae0af3fcb648adb76e6d8c64b6688288e40a16225ddfbb665", + "to_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "token_amount": "1", + "before_value": null, + "after_value": null, + "entry_function_id_str": "0x1::object::transfer", + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-04-30T22:55:03.868021" + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_datas_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_datas_v2.json new file mode 100644 index 000000000..af390c124 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_datas_v2.json @@ -0,0 +1,20 @@ +[ + { + "transaction_version": 578318306, + "write_set_change_index": 3, + "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "collection_id": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "token_name": "Congratulations, your account is eligible to receive airdrop tokens!", + "maximum": null, + "supply": null, + "largest_property_version_v1": null, + "token_uri": "https://pwncdn.com/nft/img/0x95008be282ee737ae0af3fcb648adb76e6d8c64b6688288e40a16225ddfbb665", + "token_properties": {}, + "description": "Congratulations, your account is eligible to receive airdrop tokens!", + "token_standard": "v2", + "is_fungible_v2": false, + "transaction_timestamp": "2024-04-30T22:55:03.868021", + "is_deleted_v2": null, + "decimals": 0 + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_ownerships_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_ownerships_v2.json new file mode 100644 index 000000000..fbd7cf071 --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578318306/token_ownerships_v2.json @@ -0,0 +1,34 @@ +[ + { + "transaction_version": 578318306, + "write_set_change_index": -2, + "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "property_version_v1": "0", + "owner_address": "0x95008be282ee737ae0af3fcb648adb76e6d8c64b6688288e40a16225ddfbb665", + "storage_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "amount": "0", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-04-30T22:55:03.868021", + "non_transferrable_by_owner": false + }, + { + "transaction_version": 578318306, + "write_set_change_index": 3, + "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "property_version_v1": "0", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "storage_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "amount": "1", + "table_type_v1": null, + "token_properties_mutated_v1": null, + "is_soulbound_v2": false, + "token_standard": "v2", + "is_fungible_v2": null, + "transaction_timestamp": "2024-04-30T22:55:03.868021", + "non_transferrable_by_owner": false + } +] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_datas_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_datas_v2.json index 4660cde24..3bba41080 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_datas_v2.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_datas_v2.json @@ -2,13 +2,13 @@ { "token_data_id": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", "collection_id": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", - "token_name": "", + "token_name": "Congratulations, your account is eligible to receive airdrop tokens!", "maximum": null, "supply": null, "largest_property_version_v1": null, - "token_uri": "", - "description": "", - "token_properties": null, + "token_uri": "https://pwncdn.com/nft/img/0x95008be282ee737ae0af3fcb648adb76e6d8c64b6688288e40a16225ddfbb665", + "description": "Congratulations, your account is eligible to receive airdrop tokens!", + "token_properties": {}, "token_standard": "v2", "is_fungible_v2": false, "last_transaction_version": 578366445, diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_ownerships_v2.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_ownerships_v2.json index 7e813d221..b8e122dc2 100644 --- a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_ownerships_v2.json +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/578366445/current_token_ownerships_v2.json @@ -7,11 +7,11 @@ "amount": "0", "table_type_v1": null, "token_properties_mutated_v1": null, - "is_soulbound_v2": null, + "is_soulbound_v2": false, "token_standard": "v2", "is_fungible_v2": null, "last_transaction_version": 578366445, "last_transaction_timestamp": "2024-04-30T23:50:44.443590", - "non_transferrable_by_owner": null + "non_transferrable_by_owner": false } ] \ No newline at end of file diff --git a/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/92331132/current_token_pending_claims.json b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/92331132/current_token_pending_claims.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/rust/integration-tests/expected_db_output_files/imported_mainnet_txns/token_v2_processor/92331132/current_token_pending_claims.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/current_objects.json b/rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/current_objects.json new file mode 100644 index 000000000..f16ddbb95 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/current_objects.json @@ -0,0 +1,22 @@ +[ + { + "object_address": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xd03f63d32c154a084e982a5fe910ef8e5d692d4c9e9380eb96192335adf32b83", + "allow_ungated_transfer": false, + "last_guid_creation_num": "1125899906842626", + "last_transaction_version": 578366445, + "is_deleted": false, + "untransferrable": true + }, + { + "object_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xe421a56608f1d2cb1f8b1c0ae19629795dfc05201b545cf8658bd9895d50bdc3", + "allow_ungated_transfer": true, + "last_guid_creation_num": "1125899906842626", + "last_transaction_version": 578366445, + "is_deleted": true, + "untransferrable": false + } +] \ No newline at end of file diff --git a/rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/objects.json b/rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/objects.json new file mode 100644 index 000000000..0b72fb705 --- /dev/null +++ b/rust/integration-tests/sdk_expected_db_output_files/objects_processor/test_objects_write_and_delete_resource/objects.json @@ -0,0 +1,123 @@ +[ + { + "transaction_version": 578318306, + "write_set_change_index": 0, + "object_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xe421a56608f1d2cb1f8b1c0ae19629795dfc05201b545cf8658bd9895d50bdc3", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": true, + "is_deleted": false, + "untransferrable": false + }, + { + "transaction_version": 578318306, + "write_set_change_index": 1, + "object_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xe421a56608f1d2cb1f8b1c0ae19629795dfc05201b545cf8658bd9895d50bdc3", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": true, + "is_deleted": false, + "untransferrable": false + }, + { + "transaction_version": 578318306, + "write_set_change_index": 2, + "object_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xe421a56608f1d2cb1f8b1c0ae19629795dfc05201b545cf8658bd9895d50bdc3", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": true, + "is_deleted": false, + "untransferrable": false + }, + { + "transaction_version": 578318306, + "write_set_change_index": 3, + "object_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xe421a56608f1d2cb1f8b1c0ae19629795dfc05201b545cf8658bd9895d50bdc3", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": true, + "is_deleted": false, + "untransferrable": false + }, + { + "transaction_version": 578318306, + "write_set_change_index": 4, + "object_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xe421a56608f1d2cb1f8b1c0ae19629795dfc05201b545cf8658bd9895d50bdc3", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": true, + "is_deleted": false, + "untransferrable": false + }, + { + "transaction_version": 578366445, + "write_set_change_index": 0, + "object_address": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xd03f63d32c154a084e982a5fe910ef8e5d692d4c9e9380eb96192335adf32b83", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": false, + "is_deleted": false, + "untransferrable": true + }, + { + "transaction_version": 578366445, + "write_set_change_index": 1, + "object_address": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xd03f63d32c154a084e982a5fe910ef8e5d692d4c9e9380eb96192335adf32b83", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": false, + "is_deleted": false, + "untransferrable": true + }, + { + "transaction_version": 578366445, + "write_set_change_index": 2, + "object_address": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xd03f63d32c154a084e982a5fe910ef8e5d692d4c9e9380eb96192335adf32b83", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": false, + "is_deleted": false, + "untransferrable": true + }, + { + "transaction_version": 578366445, + "write_set_change_index": 3, + "object_address": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xd03f63d32c154a084e982a5fe910ef8e5d692d4c9e9380eb96192335adf32b83", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": false, + "is_deleted": false, + "untransferrable": true + }, + { + "transaction_version": 578366445, + "write_set_change_index": 4, + "object_address": "0x1ac3cb52493947623cd727e2db9e4cfd828d5f9cd264920d253828276a5e314e", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xd03f63d32c154a084e982a5fe910ef8e5d692d4c9e9380eb96192335adf32b83", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": false, + "is_deleted": false, + "untransferrable": true + }, + { + "transaction_version": 578366445, + "write_set_change_index": 7, + "object_address": "0x57a56bff4472da6c2b28149d192ef0186ff6647bc3c2ba5c28439662fdaa284d", + "owner_address": "0x3fda2b751a0d209e17069ae72ccde256efeaad39e5403ea0e65ef5dcebdf6763", + "state_key_hash": "0xe421a56608f1d2cb1f8b1c0ae19629795dfc05201b545cf8658bd9895d50bdc3", + "guid_creation_num": "1125899906842626", + "allow_ungated_transfer": true, + "is_deleted": true, + "untransferrable": false + } +] \ No newline at end of file diff --git a/rust/integration-tests/src/diff_test_helper/token_v2_processor.rs b/rust/integration-tests/src/diff_test_helper/token_v2_processor.rs index 91b3569b2..5a504b90b 100644 --- a/rust/integration-tests/src/diff_test_helper/token_v2_processor.rs +++ b/rust/integration-tests/src/diff_test_helper/token_v2_processor.rs @@ -66,7 +66,8 @@ pub fn load_data( let current_token_v2_metadata_result = ctmv2_dsl::current_token_v2_metadata .filter(ctmv2_dsl::last_transaction_version.eq_any(&txn_versions)) - .then_order_by(ctmv2_dsl::last_transaction_version.asc()) + .then_order_by(ctmv2_dsl::object_address.asc()) + .then_order_by(ctmv2_dsl::resource_type.asc()) .load::(conn); let all_current_token_v2_metadata = current_token_v2_metadata_result?; @@ -94,7 +95,7 @@ pub fn load_data( let current_collections_v2_result = ccv2_dsl::current_collections_v2 .filter(ccv2_dsl::last_transaction_version.eq_any(&txn_versions)) - .then_order_by(ccv2_dsl::last_transaction_version.asc()) + .then_order_by(ccv2_dsl::collection_id.asc()) .load::(conn); let all_current_collections_v2 = current_collections_v2_result?; @@ -108,7 +109,7 @@ pub fn load_data( let current_token_datas_v2_result = ctdv2_dsl::current_token_datas_v2 .filter(ctdv2_dsl::last_transaction_version.eq_any(&txn_versions)) - .then_order_by(ctdv2_dsl::last_transaction_version.asc()) + .then_order_by(ctdv2_dsl::token_data_id.asc()) .load::(conn); let all_current_token_datas_v2 = current_token_datas_v2_result?; @@ -122,7 +123,10 @@ pub fn load_data( let current_token_ownerships_v2_result = ctov2_dsl::current_token_ownerships_v2 .filter(ctov2_dsl::last_transaction_version.eq_any(&txn_versions)) - .then_order_by(ctov2_dsl::last_transaction_version.asc()) + .then_order_by(ctov2_dsl::token_data_id.asc()) + .then_order_by(ctov2_dsl::property_version_v1.asc()) + .then_order_by(ctov2_dsl::owner_address.asc()) + .then_order_by(ctov2_dsl::storage_id.asc()) .load::(conn); let all_current_token_ownerships_v2 = current_token_ownerships_v2_result?; @@ -136,7 +140,10 @@ pub fn load_data( let current_token_pending_claims_result = ctpc_dsl::current_token_pending_claims .filter(ctpc_dsl::last_transaction_version.eq_any(&txn_versions)) - .then_order_by(ctpc_dsl::last_transaction_version.asc()) + .then_order_by(ctpc_dsl::token_data_id_hash.asc()) + .then_order_by(ctpc_dsl::property_version.asc()) + .then_order_by(ctpc_dsl::from_address.asc()) + .then_order_by(ctpc_dsl::to_address.asc()) .load::(conn); let all_current_token_pending_claims = current_token_pending_claims_result?; diff --git a/rust/integration-tests/src/sdk_tests/mod.rs b/rust/integration-tests/src/sdk_tests/mod.rs index 16ec619df..94d081fc4 100644 --- a/rust/integration-tests/src/sdk_tests/mod.rs +++ b/rust/integration-tests/src/sdk_tests/mod.rs @@ -26,6 +26,9 @@ pub mod token_v2_processor_tests; #[cfg(test)] pub mod default_processor_tests; +#[cfg(test)] +pub mod objects_processor_tests; + #[allow(dead_code)] pub const DEFAULT_OUTPUT_FOLDER: &str = "sdk_expected_db_output_files"; @@ -55,6 +58,15 @@ pub fn get_transaction_version_from_test_context(test_context: &SdkTestContext) .collect() } +#[allow(dead_code)] +pub fn get_all_version_from_test_context(test_context: &SdkTestContext) -> Vec { + test_context + .transaction_batches + .iter() + .map(|txn| txn.version as i64) + .collect() +} + // Common setup for database and test context #[allow(dead_code)] pub async fn setup_test_environment( diff --git a/rust/integration-tests/src/sdk_tests/objects_processor_tests.rs b/rust/integration-tests/src/sdk_tests/objects_processor_tests.rs new file mode 100644 index 000000000..26517e0e5 --- /dev/null +++ b/rust/integration-tests/src/sdk_tests/objects_processor_tests.rs @@ -0,0 +1,140 @@ +use ahash::AHashMap; +use aptos_indexer_testing_framework::sdk_test_context::SdkTestContext; +use sdk_processor::{ + config::{ + db_config::{DbConfig, PostgresConfig}, + indexer_processor_config::IndexerProcessorConfig, + processor_config::{DefaultProcessorConfig, ProcessorConfig}, + }, + processors::objects_processor::ObjectsProcessorConfig, +}; +use std::collections::HashSet; + +pub fn setup_objects_processor_config( + test_context: &SdkTestContext, + staring_version: u64, + txn_count: usize, + db_url: &str, +) -> (IndexerProcessorConfig, &'static str) { + let transaction_stream_config = + test_context.create_transaction_stream_config(staring_version, txn_count as u64); + let postgres_config = PostgresConfig { + connection_string: db_url.to_string(), + db_pool_size: 100, + }; + + 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 objects_processor_config = ObjectsProcessorConfig { + default_config: default_processor_config, + query_retries: ObjectsProcessorConfig::default_query_retries(), + query_retry_delay_ms: ObjectsProcessorConfig::default_query_retry_delay_ms(), + }; + + let processor_config = ProcessorConfig::ObjectsProcessor(objects_processor_config); + + let processor_name = processor_config.name(); + ( + IndexerProcessorConfig { + processor_config, + transaction_stream_config, + db_config, + backfill_config: None, + }, + processor_name, + ) +} + +#[allow(clippy::needless_return)] +#[cfg(test)] +mod sdk_objects_processor_tests { + use super::setup_objects_processor_config; + use crate::{ + diff_test_helper::objects_processor::load_data, + sdk_tests::{ + get_all_version_from_test_context, get_transaction_version_from_test_context, + run_processor_test, setup_test_environment, validate_json, DEFAULT_OUTPUT_FOLDER, + }, + }; + use aptos_indexer_test_transactions::{ + IMPORTED_MAINNET_TXNS_578318306_OBJECTS_WRITE_RESOURCE, + IMPORTED_MAINNET_TXNS_578366445_TOKEN_V2_BURN_EVENT_V2, + }; + use aptos_indexer_testing_framework::{cli_parser::get_test_config, database::TestDatabase}; + use sdk_processor::processors::objects_processor::ObjectsProcessor; + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn test_objects_write_and_delete_resource() { + // Need two transactions because the processor performs a lookup on previous transaction's + // object address when parsing delete resource + let txns = &[ + IMPORTED_MAINNET_TXNS_578318306_OBJECTS_WRITE_RESOURCE, + IMPORTED_MAINNET_TXNS_578366445_TOKEN_V2_BURN_EVENT_V2, + ]; + process_multiple_transactions( + txns, + Some("test_objects_write_and_delete_resource".to_string()), + ) + .await; + } + + // Helper function to abstract out the transaction processing + async fn process_multiple_transactions(txns: &[&[u8]], test_case_name: Option) { + let (diff_flag, custom_output_path) = get_test_config(); + let output_path = custom_output_path.unwrap_or_else(|| DEFAULT_OUTPUT_FOLDER.to_string()); + + let (db, mut test_context) = setup_test_environment(txns).await; + + let starting_version = *get_transaction_version_from_test_context(&test_context) + .first() + .unwrap(); + let all_txn_versions = get_all_version_from_test_context(&test_context); + + let db_url = db.get_db_url(); + let (indexer_processor_config, processor_name) = setup_objects_processor_config( + &test_context, + starting_version, + all_txn_versions.len(), + &db_url, + ); + + let objects_processor = ObjectsProcessor::new(indexer_processor_config) + .await + .expect("Failed to create ObjectsProcessor"); + + match run_processor_test( + &mut test_context, + objects_processor, + load_data, + db_url, + all_txn_versions, + diff_flag, + output_path.clone(), + test_case_name.clone(), + ) + .await + { + Ok(mut db_value) => { + let _ = validate_json( + &mut db_value, + starting_version as u64, + processor_name, + output_path.clone(), + test_case_name, + ); + }, + Err(e) => { + eprintln!( + "[ERROR] Failed to run processor for txn version {}: {}", + 1, e + ); + panic!("Test failed due to processor error"); + }, + } + } +}