mirror of
https://github.com/FlipsideCrypto/kaia-models.git
synced 2026-02-06 14:31:56 +00:00
Merge pull request #64 from FlipsideCrypto/update-to-core-traces
update-to-core-traces
This commit is contained in:
commit
08e146c863
@ -12,9 +12,9 @@ WITH base AS (
|
||||
to_address,
|
||||
MIN(block_number) AS start_block,
|
||||
MIN(block_timestamp) AS start_timestamp,
|
||||
MAX(_inserted_timestamp) AS _inserted_timestamp
|
||||
MAX(modified_timestamp) AS _inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__traces') }}
|
||||
{{ ref('core__fact_traces') }}
|
||||
WHERE
|
||||
TYPE = 'DELEGATECALL'
|
||||
AND trace_status
|
||||
@ -22,7 +22,7 @@ WITH base AS (
|
||||
AND from_address != to_address -- exclude self-calls
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
AND modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '24 hours'
|
||||
FROM
|
||||
|
||||
@ -473,7 +473,7 @@ valid_traces AS (
|
||||
SELECT
|
||||
base_address
|
||||
FROM
|
||||
{{ ref('silver__traces') }}
|
||||
{{ ref('core__fact_traces') }}
|
||||
JOIN function_mapping
|
||||
ON function_sig = LEFT(
|
||||
input,
|
||||
|
||||
@ -13,9 +13,9 @@ WITH contract_deployments AS (
|
||||
block_timestamp,
|
||||
from_address AS deployer_address,
|
||||
to_address AS contract_address,
|
||||
_inserted_timestamp
|
||||
modified_timestamp as _inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__traces') }}
|
||||
{{ ref('core__fact_traces') }}
|
||||
WHERE
|
||||
from_address = '0x5280c2d41dbbb9e17664a6c560194d99f329bbb6'
|
||||
AND to_address NOT IN (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user