This commit is contained in:
Austin 2025-01-22 16:01:52 -05:00
parent 05e22d92f1
commit f46f8d5bf7

View File

@ -1,31 +0,0 @@
{{ config (
materialized = "ephemeral"
) }}
WITH lookback AS (
SELECT
block_number
FROM
{{ ref("_evm_block_lookback") }}
)
SELECT
DISTINCT tx.block_number block_number
FROM
{{ ref("silver_evm__transactions") }}
tx
LEFT JOIN {{ ref("silver_evm__traces") }}
tr
ON tx.block_number = tr.block_number
AND tx.tx_hash = tr.tx_hash
WHERE
tx.block_timestamp >= DATEADD('hour', -84, SYSDATE())
AND tr.block_timestamp >= DATEADD('hour', -84, SYSDATE())
AND tr.tx_hash IS NULL
AND tx.block_number >= (
SELECT
block_number
FROM
lookback
)
AND tr.block_timestamp IS NOT NULL