From 2af8b10be7f036b0e02a775de9a60b93490541c9 Mon Sep 17 00:00:00 2001 From: SebMelendez01 <78228475+SebMelendez01@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:21:36 -0500 Subject: [PATCH] Stablecoins: adding updatine timezone for mantle (#637) --- macros/decode/token_transfer_events.sql | 2 +- models/staging/mantle/fact_mantle_transactions.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/macros/decode/token_transfer_events.sql b/macros/decode/token_transfer_events.sql index 3df6c7d2..e132f29b 100644 --- a/macros/decode/token_transfer_events.sql +++ b/macros/decode/token_transfer_events.sql @@ -1,7 +1,7 @@ {% macro token_transfer_events(chain) %} {% if chain in ('mantle') %} select - block_time as block_timestamp + CONVERT_TIMEZONE('UTC', block_time) as block_timestamp , block_date as raw_date , block_number , block_hash_hex as block_hash diff --git a/models/staging/mantle/fact_mantle_transactions.sql b/models/staging/mantle/fact_mantle_transactions.sql index c3aba082..0d41af03 100644 --- a/models/staging/mantle/fact_mantle_transactions.sql +++ b/models/staging/mantle/fact_mantle_transactions.sql @@ -23,8 +23,8 @@ with select hash_hex as tx_hash, coalesce(to_hex, t.from_hex) as contract_address, - block_time as block_timestamp, - block_date raw_date, + CONVERT_TIMEZONE('UTC', block_time) as block_timestamp, + block_timestamp::date raw_date, t.from_hex as from_address, l1_fee / 1E18 + gas_price * gas_used/1E18 as tx_fee, (tx_fee * price) gas_usd,