fix + add comments

This commit is contained in:
San Yong 2025-05-29 01:25:25 +08:00
parent 082ed7ece5
commit a915a383cf
2 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ WITH unwrap_token AS (
) AS _log_id,
modified_timestamp AS _inserted_timestamp
FROM
core.core.fact_event_logs
{{ ref('core__fact_event_logs') }}
WHERE
contract_address = '0xa4218e1f39da4aadac971066458db56e901bcbde'
AND topic_0 = '0x3b661011d9e0ff8f0dc432bac4ed79eabf70cf52596ed9de985810ef36689e9e'

View File

@ -6,7 +6,7 @@
tags = ['silver_bridge','defi','bridge','curated']
) }}
WITH senddeposits AS (
WITH senddeposits AS ( -- gaszip lz v2 event (only 1 per tx)
SELECT
block_number,
@ -40,7 +40,7 @@ AND _inserted_timestamp >= (
AND _inserted_timestamp >= SYSDATE() - INTERVAL '7 day'
{% endif %}
),
packetsent AS (
packetsent AS ( -- pulls lz packetsent events from gaszip txs only (1 packet per chain, may have >1 per tx)
SELECT
tx_hash,
event_index,
@ -81,7 +81,7 @@ AND _inserted_timestamp >= (
AND _inserted_timestamp >= SYSDATE() - INTERVAL '7 day'
{% endif %}
),
nativetransfers AS (
nativetransfers AS ( -- pulls native transfers in gaszip lz v2 bridging
SELECT
tx_hash,
TRY_TO_NUMBER(amount_precise_raw) AS amount_precise_raw,
@ -121,7 +121,7 @@ SELECT
origin_to_address,
origin_function_signature,
s.tx_hash,
p.event_index,
p.event_index, -- joins on packetsent event index instead of senddeposits for uniqueness
'SendDeposit' AS event_name,
'gaszip-lz-v2' AS platform,
'v2' AS version,