Skip to content

Commit a47bd23

Browse files
authored
dont log pda as direct owner (#1123)
1 parent d1ab590 commit a47bd23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utils/atomic-data-publisher/src/sql/construct_entity_ownership_changes.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
WITH asset_owner_changes AS (
88
-- Get asset owner changes in the block range
9+
-- Excludes changes where the new owner is a welcome pack PDA
910
SELECT
1011
ao.asset,
1112
ao.last_block as block,
@@ -17,12 +18,14 @@ WITH asset_owner_changes AS (
1718
INNER JOIN key_to_assets kta ON kta.asset = ao.asset
1819
LEFT JOIN iot_hotspot_infos ihi ON ihi.asset = ao.asset
1920
LEFT JOIN mobile_hotspot_infos mhi ON mhi.asset = ao.asset
21+
LEFT JOIN welcome_packs wp_check ON wp_check.address = ao.owner
2022
WHERE (ihi.asset IS NOT NULL OR mhi.asset IS NOT NULL)
2123
AND kta.entity_key IS NOT NULL
2224
AND ao.asset IS NOT NULL
2325
AND ao.owner IS NOT NULL
2426
AND ao.last_block > $1
2527
AND ao.last_block <= $2
28+
AND wp_check.address IS NULL
2629
),
2730
welcome_pack_changes AS (
2831
-- Get welcome pack owner changes in the block range

0 commit comments

Comments
 (0)