Skip to content

Commit e934c89

Browse files
committed
add coin_store_deletion_event info to event_to_coin_type map
1 parent 34f83b3 commit e934c89

File tree

7 files changed

+131
-4
lines changed

7 files changed

+131
-4
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ anyhow = "1.0.86"
2525
# https://github.com/aptos-labs/aptos-indexer-processors/pull/325
2626
aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "de12c1b13b170aa22b4ee397244a2a6f7065a23a", features = [
2727
"postgres_partial",
28+
"testing_framework"
2829
] }
29-
aptos-indexer-test-transactions = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "ba63c8b8f0d41b02fed23a5cf5982404c5eda195" }
30+
aptos-indexer-test-transactions = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "c962fa2f8e5568d24389397813209ea10b960dfa" }
3031
async-trait = "0.1.53"
3132
backtrace = "0.3.58"
3233
base64 = "0.13.0"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[
2+
{
3+
"storage_id": "0x35b5700571cbb1c340c5a2fa7e1ecc32fd8b4da273881c2728058bd4c2514895",
4+
"owner_address": "0x2dcbc03740a6fa2efee926b9df329184cce357d0573bdab09930f4d48e61a4c8",
5+
"asset_type_v2": null,
6+
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
7+
"is_primary": true,
8+
"is_frozen": false,
9+
"amount_v1": "25361327420",
10+
"amount_v2": null,
11+
"amount": "25361327420",
12+
"last_transaction_version_v1": 2448304257,
13+
"last_transaction_version_v2": null,
14+
"last_transaction_version": 2448304257,
15+
"last_transaction_timestamp_v1": "2025-03-07T22:32:23",
16+
"last_transaction_timestamp_v2": null,
17+
"last_transaction_timestamp": "2025-03-07T22:32:23",
18+
"token_standard": "v1",
19+
"asset_type": "0x1::aptos_coin::AptosCoin"
20+
},
21+
{
22+
"storage_id": "0xd5263bada2f6b752de987f5e8eca800ffb07f34c489633fc7eb46acea7cd5c37",
23+
"owner_address": "0xf8e25f6c8ce40a15107fb4b4d288ca03dd434d057392f2ccb5fde505a300a0bf",
24+
"asset_type_v2": "0x000000000000000000000000000000000000000000000000000000000000000a",
25+
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
26+
"is_primary": true,
27+
"is_frozen": false,
28+
"amount_v1": "0",
29+
"amount_v2": "49843000",
30+
"amount": "49843000",
31+
"last_transaction_version_v1": 2448304257,
32+
"last_transaction_version_v2": 2448304257,
33+
"last_transaction_version": 2448304257,
34+
"last_transaction_timestamp_v1": "2025-03-07T22:32:23",
35+
"last_transaction_timestamp_v2": "2025-03-07T22:32:23",
36+
"last_transaction_timestamp": "2025-03-07T22:32:23",
37+
"token_standard": "v1",
38+
"asset_type": "0x1::aptos_coin::AptosCoin"
39+
}
40+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[
2+
{
3+
"transaction_version": 2448304257,
4+
"event_index": -1,
5+
"owner_address": "0xf8e25f6c8ce40a15107fb4b4d288ca03dd434d057392f2ccb5fde505a300a0bf",
6+
"storage_id": "0xd5263bada2f6b752de987f5e8eca800ffb07f34c489633fc7eb46acea7cd5c37",
7+
"asset_type": "0x1::aptos_coin::AptosCoin",
8+
"is_frozen": null,
9+
"amount": "57000",
10+
"type_": "0x1::aptos_coin::GasFeeEvent",
11+
"is_gas_fee": true,
12+
"gas_fee_payer_address": null,
13+
"is_transaction_success": true,
14+
"entry_function_id_str": "0xa746e980ae21949a4f084db7403430f00bce3c9a1da4101ffcf0bf45ebd35e7e::test::transfer_and_migrate",
15+
"block_height": 300296983,
16+
"token_standard": "v1",
17+
"transaction_timestamp": "2025-03-07T22:32:23",
18+
"storage_refund_amount": "0"
19+
},
20+
{
21+
"transaction_version": 2448304257,
22+
"event_index": 0,
23+
"owner_address": "0xf8e25f6c8ce40a15107fb4b4d288ca03dd434d057392f2ccb5fde505a300a0bf",
24+
"storage_id": "0xd5263bada2f6b752de987f5e8eca800ffb07f34c489633fc7eb46acea7cd5c37",
25+
"asset_type": "0x1::aptos_coin::AptosCoin",
26+
"is_frozen": null,
27+
"amount": "100000",
28+
"type_": "0x1::coin::WithdrawEvent",
29+
"is_gas_fee": false,
30+
"gas_fee_payer_address": null,
31+
"is_transaction_success": true,
32+
"entry_function_id_str": "0xa746e980ae21949a4f084db7403430f00bce3c9a1da4101ffcf0bf45ebd35e7e::test::transfer_and_migrate",
33+
"block_height": 300296983,
34+
"token_standard": "v1",
35+
"transaction_timestamp": "2025-03-07T22:32:23",
36+
"storage_refund_amount": "0"
37+
},
38+
{
39+
"transaction_version": 2448304257,
40+
"event_index": 1,
41+
"owner_address": "0x2dcbc03740a6fa2efee926b9df329184cce357d0573bdab09930f4d48e61a4c8",
42+
"storage_id": "0x35b5700571cbb1c340c5a2fa7e1ecc32fd8b4da273881c2728058bd4c2514895",
43+
"asset_type": "0x1::aptos_coin::AptosCoin",
44+
"is_frozen": null,
45+
"amount": "100000",
46+
"type_": "0x1::coin::DepositEvent",
47+
"is_gas_fee": false,
48+
"gas_fee_payer_address": null,
49+
"is_transaction_success": true,
50+
"entry_function_id_str": "0xa746e980ae21949a4f084db7403430f00bce3c9a1da4101ffcf0bf45ebd35e7e::test::transfer_and_migrate",
51+
"block_height": 300296983,
52+
"token_standard": "v1",
53+
"transaction_timestamp": "2025-03-07T22:32:23",
54+
"storage_refund_amount": "0"
55+
}
56+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[
2+
{
3+
"asset_type": "0x000000000000000000000000000000000000000000000000000000000000000a",
4+
"creator_address": "0x0000000000000000000000000000000000000000000000000000000000000001",
5+
"name": "Aptos Coin",
6+
"symbol": "APT",
7+
"decimals": 8,
8+
"icon_uri": "",
9+
"project_uri": "",
10+
"last_transaction_version": 2448304257,
11+
"last_transaction_timestamp": "2025-03-07T22:32:23",
12+
"supply_aggregator_table_handle_v1": null,
13+
"supply_aggregator_table_key_v1": null,
14+
"token_standard": "v2",
15+
"maximum_v2": "340282366920938463463374607431768211455",
16+
"is_token_v2": null,
17+
"supply_v2": "118281485271096"
18+
}
19+
]

integration-tests/src/sdk_tests/fungible_asset_processor_tests.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ mod sdk_fungible_asset_processor_tests {
6464
IMPORTED_MAINNET_TXNS_2186504987_COIN_STORE_DELETION_NO_EVENT,
6565
IMPORTED_MAINNET_TXNS_2308282694_ASSET_TYPE_V1_NULL,
6666
IMPORTED_MAINNET_TXNS_2308283617_ASSET_TYPE_V1_NULL_2,
67+
IMPORTED_MAINNET_TXNS_2448304257_COINSTORE_DELETION_EVENT,
6768
IMPORTED_MAINNET_TXNS_255894550_STORAGE_REFUND,
6869
IMPORTED_MAINNET_TXNS_508365567_FA_V1_EVENTS,
6970
IMPORTED_MAINNET_TXNS_550582915_MULTIPLE_TRANSFER_EVENT,
@@ -220,6 +221,15 @@ mod sdk_fungible_asset_processor_tests {
220221
.await;
221222
}
222223

224+
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
225+
async fn test_fungible_asset_processor_coin_store_deletion_event() {
226+
process_single_batch_txns(
227+
&[IMPORTED_MAINNET_TXNS_2448304257_COINSTORE_DELETION_EVENT],
228+
Some("coin_store_deletion_event".to_string()),
229+
)
230+
.await;
231+
}
232+
223233
/// Tests processing of secondary store burn operations
224234
/// Validates correct handling of burning tokens from secondary stores
225235
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]

0 commit comments

Comments
 (0)