This commit is contained in:
Eric Laurello 2026-01-23 09:58:49 -05:00
parent b3efed7dc8
commit 6a20f2016b
2 changed files with 4 additions and 14 deletions

View File

@ -7,7 +7,7 @@
{{ config(
materialized = 'table',
unique_key = 'monad_delegator_rewards_reads_id',
tags = ['silver', 'contract_reads', 'gov']
tags = ['streamline', 'contract_reads', 'records']
) }}
@ -37,7 +37,7 @@ WITH active_delegators AS (
WHERE
active_balance > 0
AND balance_date >= (
SELECT MAX(balance_date) - 3
SELECT MAX(balance_date) - 4
FROM {{ source('gold_gov_monad','ez_staking_balances_daily') }}
)
),
@ -46,10 +46,6 @@ delegator_reads AS (
SELECT
validator_id,
delegator_address,
-- getDelegator(uint64 validatorId, address delegator)
-- Selector: 0x573c1ce0
-- validatorId: uint64 padded to 32 bytes
-- delegator: address padded to 32 bytes
CONCAT(
'0x573c1ce0',
LPAD(LTRIM(utils.udf_int_to_hex(validator_id), '0x'), 64, '0'),
@ -80,10 +76,4 @@ SELECT
SYSDATE() AS modified_timestamp,
'{{ invocation_id }}' AS _invocation_id
FROM
delegator_reads
{# {% if is_incremental() %}
WHERE input NOT IN (
SELECT input
FROM {{ this }}
)
{% endif %} #}
delegator_reads

View File

@ -166,4 +166,4 @@ sources:
schema: beacon_chain
tables:
- name: fact_validators
- name: fact_blocks
- name: fact_blocks