From 350ea7201b5e527f39f62e9e01e7c57dfb765fa5 Mon Sep 17 00:00:00 2001 From: Matt Romano <42412983+mattromano@users.noreply.github.com> Date: Mon, 29 Jan 2024 22:45:36 -0800 Subject: [PATCH] moonwell and sonne deposit fix (#132) --- .../defi/lending/moonwell/silver__moonwell_deposits.sql | 4 ++-- models/silver/defi/lending/sonne/silver__sonne_deposits.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/silver/defi/lending/moonwell/silver__moonwell_deposits.sql b/models/silver/defi/lending/moonwell/silver__moonwell_deposits.sql index f3c5ecac..908d459e 100644 --- a/models/silver/defi/lending/moonwell/silver__moonwell_deposits.sql +++ b/models/silver/defi/lending/moonwell/silver__moonwell_deposits.sql @@ -33,10 +33,10 @@ moonwell_deposits AS ( contract_address AS token_address, regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}') AS segmented_data, utils.udf_hex_to_int( - segmented_data [3] :: STRING + segmented_data [2] :: STRING ) :: INTEGER AS minttokens_raw, utils.udf_hex_to_int( - segmented_data [2] :: STRING + segmented_data [1] :: STRING ) :: INTEGER AS mintAmount_raw, CONCAT('0x', SUBSTR(segmented_data [0] :: STRING, 25, 40)) AS supplier, 'Moonwell' AS platform, diff --git a/models/silver/defi/lending/sonne/silver__sonne_deposits.sql b/models/silver/defi/lending/sonne/silver__sonne_deposits.sql index 6c61225e..7bd4aece 100644 --- a/models/silver/defi/lending/sonne/silver__sonne_deposits.sql +++ b/models/silver/defi/lending/sonne/silver__sonne_deposits.sql @@ -33,10 +33,10 @@ sonne_deposits AS ( contract_address AS token_address, regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}') AS segmented_data, utils.udf_hex_to_int( - segmented_data [3] :: STRING + segmented_data [2] :: STRING ) :: INTEGER AS minttokens_raw, utils.udf_hex_to_int( - segmented_data [2] :: STRING + segmented_data [1] :: STRING ) :: INTEGER AS mintAmount_raw, CONCAT('0x', SUBSTR(segmented_data [0] :: STRING, 25, 40)) AS supplier, 'Sonne' AS platform,