From b301ee4d1877735c54b7090d304b55d87f89f90f Mon Sep 17 00:00:00 2001 From: Austin <93135983+austinFlipside@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:58:30 -0400 Subject: [PATCH] fee calc (#156) --- models/silver/core/silver__transactions.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/models/silver/core/silver__transactions.sql b/models/silver/core/silver__transactions.sql index 2f2238af..a55b04f1 100644 --- a/models/silver/core/silver__transactions.sql +++ b/models/silver/core/silver__transactions.sql @@ -159,6 +159,10 @@ new_records AS ( ) :: bigint ) + FLOOR( r.l1_gas_price * r.l1_gas_used * r.l1_fee_scalar + ) + IFF( + r.l1_fee_scalar = 0, + r.l1_fee, + 0 ), 18 ) AS tx_fee_precise, @@ -237,6 +241,10 @@ missing_data AS ( ) :: bigint ) + FLOOR( r.l1_gas_price * r.l1_gas_used * r.l1_fee_scalar + ) + IFF( + r.l1_fee_scalar = 0, + r.l1_fee, + 0 ), 18 ) AS tx_fee_precise_heal,