-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description When a token gets claimed, processor needs to know the previous owner for token_activities_v2. Currently the processor gets it from PendingClaimsResource but in this case the resource wasn't found in the transaction and breaks the processor. This PR tries to get it previous owner from the TokenClaim event instead of the table metadata. ## Testing <img width="704" alt="Screenshot 2024-12-06 at 12 44 57 PM" src="https://github.com/user-attachments/assets/ff1dffd7-9c63-424f-8c05-373d671c9077">
- Loading branch information
Showing
15 changed files
with
173 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
..._files/token_v2_processor/test_token_v1_offer_claim_no_table_metadata/collections_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
1 change: 1 addition & 0 deletions
1
...oken_v2_processor/test_token_v1_offer_claim_no_table_metadata/current_collections_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
1 change: 1 addition & 0 deletions
1
...oken_v2_processor/test_token_v1_offer_claim_no_table_metadata/current_token_datas_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
17 changes: 17 additions & 0 deletions
17
...v2_processor/test_token_v1_offer_claim_no_table_metadata/current_token_ownerships_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ | ||
{ | ||
"token_data_id": "0x2877fd783c3c7957b50941cce1b3b729dae16b5928e0ba0606cd282df2b085c8", | ||
"property_version_v1": "0", | ||
"owner_address": "0xe2ebcbacd81584f97b6ba9a458239ea083428d75158c0d42ef38b6379527e99a", | ||
"storage_id": "0xa5e6f84af35d356027c1513b37248bae3968c20720af6fc2d5c58b7c90ffda55", | ||
"amount": "1", | ||
"table_type_v1": "0x3::token::TokenStore", | ||
"token_properties_mutated_v1": {}, | ||
"is_soulbound_v2": null, | ||
"token_standard": "v1", | ||
"is_fungible_v2": null, | ||
"last_transaction_version": 19922017, | ||
"last_transaction_timestamp": "2024-11-28T23:53:41.291148", | ||
"non_transferrable_by_owner": null | ||
} | ||
] |
18 changes: 18 additions & 0 deletions
18
...2_processor/test_token_v1_offer_claim_no_table_metadata/current_token_pending_claims.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"token_data_id_hash": "2877fd783c3c7957b50941cce1b3b729dae16b5928e0ba0606cd282df2b085c8", | ||
"property_version": "0", | ||
"from_address": "0xd77942ad91c35a2d165fdec8f6a28ec48b6bb9f905db2fd0ac8a7e481a9c543e", | ||
"to_address": "0xe2ebcbacd81584f97b6ba9a458239ea083428d75158c0d42ef38b6379527e99a", | ||
"collection_data_id_hash": "84b2198ac10fdbb64bc3474ed0cf184b7bdcd5bc5f098a8858f2e48f379c5fcc", | ||
"creator_address": "0xd77942ad91c35a2d165fdec8f6a28ec48b6bb9f905db2fd0ac8a7e481a9c543e", | ||
"collection_name": "Alice's", | ||
"name": "Alice's first token", | ||
"amount": "0", | ||
"table_handle": "0xc4b3a532f522e5cc021427b4d729938073a6d34949bd397490d4bbf96a4703f1", | ||
"last_transaction_version": 19922017, | ||
"collection_id": "0x84b2198ac10fdbb64bc3474ed0cf184b7bdcd5bc5f098a8858f2e48f379c5fcc", | ||
"last_transaction_timestamp": "2024-11-28T23:53:41.291148", | ||
"token_data_id": "0x2877fd783c3c7957b50941cce1b3b729dae16b5928e0ba0606cd282df2b085c8" | ||
} | ||
] |
1 change: 1 addition & 0 deletions
1
...n_v2_processor/test_token_v1_offer_claim_no_table_metadata/current_token_v2_metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
36 changes: 36 additions & 0 deletions
36
...s/token_v2_processor/test_token_v1_offer_claim_no_table_metadata/token_activities_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[ | ||
{ | ||
"transaction_version": 19922017, | ||
"event_index": 0, | ||
"event_account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"token_data_id": "0x2877fd783c3c7957b50941cce1b3b729dae16b5928e0ba0606cd282df2b085c8", | ||
"property_version_v1": "0", | ||
"type_": "0x3::token::TokenDeposit", | ||
"from_address": null, | ||
"to_address": "0xe2ebcbacd81584f97b6ba9a458239ea083428d75158c0d42ef38b6379527e99a", | ||
"token_amount": "1", | ||
"before_value": null, | ||
"after_value": null, | ||
"entry_function_id_str": "0x3::token_transfers::claim_script", | ||
"token_standard": "v1", | ||
"is_fungible_v2": null, | ||
"transaction_timestamp": "2024-11-28T23:53:41.291148" | ||
}, | ||
{ | ||
"transaction_version": 19922017, | ||
"event_index": 1, | ||
"event_account_address": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"token_data_id": "0x2877fd783c3c7957b50941cce1b3b729dae16b5928e0ba0606cd282df2b085c8", | ||
"property_version_v1": "0", | ||
"type_": "0x3::token_transfers::Claim", | ||
"from_address": "0xd77942ad91c35a2d165fdec8f6a28ec48b6bb9f905db2fd0ac8a7e481a9c543e", | ||
"to_address": "0xe2ebcbacd81584f97b6ba9a458239ea083428d75158c0d42ef38b6379527e99a", | ||
"token_amount": "1", | ||
"before_value": null, | ||
"after_value": null, | ||
"entry_function_id_str": "0x3::token_transfers::claim_script", | ||
"token_standard": "v1", | ||
"is_fungible_v2": null, | ||
"transaction_timestamp": "2024-11-28T23:53:41.291148" | ||
} | ||
] |
1 change: 1 addition & 0 deletions
1
..._files/token_v2_processor/test_token_v1_offer_claim_no_table_metadata/token_datas_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
18 changes: 18 additions & 0 deletions
18
...s/token_v2_processor/test_token_v1_offer_claim_no_table_metadata/token_ownerships_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"transaction_version": 19922017, | ||
"write_set_change_index": 4, | ||
"token_data_id": "0x2877fd783c3c7957b50941cce1b3b729dae16b5928e0ba0606cd282df2b085c8", | ||
"property_version_v1": "0", | ||
"owner_address": "0xe2ebcbacd81584f97b6ba9a458239ea083428d75158c0d42ef38b6379527e99a", | ||
"storage_id": "0xa5e6f84af35d356027c1513b37248bae3968c20720af6fc2d5c58b7c90ffda55", | ||
"amount": "1", | ||
"table_type_v1": "0x3::token::TokenStore", | ||
"token_properties_mutated_v1": {}, | ||
"is_soulbound_v2": null, | ||
"token_standard": "v1", | ||
"is_fungible_v2": null, | ||
"transaction_timestamp": "2024-11-28T23:53:41.291148", | ||
"non_transferrable_by_owner": null | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters