From f6d21d993c6270bde1d375dca581ac09aba0871b Mon Sep 17 00:00:00 2001 From: RantumBits Date: Tue, 1 Jun 2021 14:07:23 -0700 Subject: [PATCH 01/15] initial Socialtokens view --- ethereum/erc20/socialTokens | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ethereum/erc20/socialTokens diff --git a/ethereum/erc20/socialTokens b/ethereum/erc20/socialTokens new file mode 100644 index 00000000000..c46b3a9a8ab --- /dev/null +++ b/ethereum/erc20/socialTokens @@ -0,0 +1,19 @@ +CREATE TABLE IF NOT EXISTS erc20.socialtokens ( + contract_address bytea, + symbol text, + decimals numeric, + name text +); + +BEGIN; +DELETE FROM erc20.socialtokens *; + +COPY erc20.socialtokens(contract_address, symbol, decimals, name) FROM stdin; +\\x9355372396e3f6daf13359b7b607a3374cc638e0 WHALE 2 Whale +\\xfb5453340c03db5ade474b27e68b6a9c6b2823eb ROBOT 2 MetaFactory +\\x35bd01fc9d6d5d81ca9e055db88dc49aa2c699a8 FWB 2 Freinds with Benefits +\\x2d94aa3e47d9d5024503ca8491fce9a2fb4da198 BANK 4 BanklessDAO + +\. + +COMMIT; From e7ace1e66edbbabb8371c2f79543a68a31eeff30 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Tue, 1 Jun 2021 14:08:18 -0700 Subject: [PATCH 02/15] Rename socialTokens to socialtokens.sql --- ethereum/erc20/{socialTokens => socialtokens.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ethereum/erc20/{socialTokens => socialtokens.sql} (100%) diff --git a/ethereum/erc20/socialTokens b/ethereum/erc20/socialtokens.sql similarity index 100% rename from ethereum/erc20/socialTokens rename to ethereum/erc20/socialtokens.sql From 1499c7f54bd074b0059d1e8f2b5d5d4267f08cd6 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Tue, 1 Jun 2021 15:58:25 -0700 Subject: [PATCH 03/15] Addded new tokens to list --- ethereum/erc20/socialtokens.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ethereum/erc20/socialtokens.sql b/ethereum/erc20/socialtokens.sql index c46b3a9a8ab..975005acb7e 100644 --- a/ethereum/erc20/socialtokens.sql +++ b/ethereum/erc20/socialtokens.sql @@ -11,8 +11,16 @@ DELETE FROM erc20.socialtokens *; COPY erc20.socialtokens(contract_address, symbol, decimals, name) FROM stdin; \\x9355372396e3f6daf13359b7b607a3374cc638e0 WHALE 2 Whale \\xfb5453340c03db5ade474b27e68b6a9c6b2823eb ROBOT 2 MetaFactory -\\x35bd01fc9d6d5d81ca9e055db88dc49aa2c699a8 FWB 2 Freinds with Benefits +\\x35bd01fc9d6d5d81ca9e055db88dc49aa2c699a8 FWB 2 Freinds with Benefits \\x2d94aa3e47d9d5024503ca8491fce9a2fb4da198 BANK 4 BanklessDAO +\\x35872fea6a4843facbcdbce99e3b69596a3680b8 E1337 2 E1337 Luxury Sports Apparel +\\xc22b30e4cce6b78aaaadae91e44e73593929a3e9 RAC 2 RAC Music +\\xf552b656022c218c26dad43ad88881fc04116f76 MORK 5 Hackatao art community +\\x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 ALEX 5 Alex Masmej human IPO +\\xca3fe04c7ee111f0bbb02c328c699226acf9fd33 SEEN 2 Seen.haus nft/physical art +\\x6307b25a665efc992ec1c1bc403c38f3ddd7c661 GCR 5 Global Coin Research +\\xbcc66ed2ab491e9ae7bf8386541fb17421fa9d35 SKULL 5 Skeenee artist currency +\\x87b008e57f640d94ee44fd893f0323af933f9195 COIN 4 Social token of Marguerite DeCourcelle \. From f578d63668480baf49dae607d8d67eb64da3d8ae Mon Sep 17 00:00:00 2001 From: RantumBits Date: Wed, 22 Sep 2021 14:02:35 -0700 Subject: [PATCH 04/15] Update socialtokens.sql --- ethereum/erc20/socialtokens.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ethereum/erc20/socialtokens.sql b/ethereum/erc20/socialtokens.sql index 975005acb7e..bbe5e3e4811 100644 --- a/ethereum/erc20/socialtokens.sql +++ b/ethereum/erc20/socialtokens.sql @@ -17,10 +17,15 @@ COPY erc20.socialtokens(contract_address, symbol, decimals, name) FROM stdin; \\xc22b30e4cce6b78aaaadae91e44e73593929a3e9 RAC 2 RAC Music \\xf552b656022c218c26dad43ad88881fc04116f76 MORK 5 Hackatao art community \\x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 ALEX 5 Alex Masmej human IPO -\\xca3fe04c7ee111f0bbb02c328c699226acf9fd33 SEEN 2 Seen.haus nft/physical art +\\xca3fe04c7ee111f0bbb02c328c699226acf9fd33 SEEN 2 Seen.haus nft/physical art0x35bd01fc9d6d5d81ca9e055db88dc49aa2c699a8 \\x6307b25a665efc992ec1c1bc403c38f3ddd7c661 GCR 5 Global Coin Research \\xbcc66ed2ab491e9ae7bf8386541fb17421fa9d35 SKULL 5 Skeenee artist currency \\x87b008e57f640d94ee44fd893f0323af933f9195 COIN 4 Social token of Marguerite DeCourcelle +\\x64d91f12ece7362f91a6f8e7940cd55f05060b92 ASH 18 Burn (ASH) +\\x7e9d8f07a64e363e97a648904a89fb4cd5fb94cd FF 18 Forefront +\\x32353a6c91143bfd6c7d363b546e62a9a2489a20 AGLD 18 Adventure Gold +\\xf1f955016ecbcd7321c7266bccfb96c68ea5e49b RLY 18 Rally + \. From 9a68b8470628272316693f104562064347c8718f Mon Sep 17 00:00:00 2001 From: RantumBits Date: Mon, 9 Jan 2023 08:34:12 -0800 Subject: [PATCH 05/15] rmv social tokens file --- ethereum/erc20/socialtokens.sql | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 ethereum/erc20/socialtokens.sql diff --git a/ethereum/erc20/socialtokens.sql b/ethereum/erc20/socialtokens.sql deleted file mode 100644 index bbe5e3e4811..00000000000 --- a/ethereum/erc20/socialtokens.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE IF NOT EXISTS erc20.socialtokens ( - contract_address bytea, - symbol text, - decimals numeric, - name text -); - -BEGIN; -DELETE FROM erc20.socialtokens *; - -COPY erc20.socialtokens(contract_address, symbol, decimals, name) FROM stdin; -\\x9355372396e3f6daf13359b7b607a3374cc638e0 WHALE 2 Whale -\\xfb5453340c03db5ade474b27e68b6a9c6b2823eb ROBOT 2 MetaFactory -\\x35bd01fc9d6d5d81ca9e055db88dc49aa2c699a8 FWB 2 Freinds with Benefits -\\x2d94aa3e47d9d5024503ca8491fce9a2fb4da198 BANK 4 BanklessDAO -\\x35872fea6a4843facbcdbce99e3b69596a3680b8 E1337 2 E1337 Luxury Sports Apparel -\\xc22b30e4cce6b78aaaadae91e44e73593929a3e9 RAC 2 RAC Music -\\xf552b656022c218c26dad43ad88881fc04116f76 MORK 5 Hackatao art community -\\x8ba6dcc667d3ff64c1a2123ce72ff5f0199e5315 ALEX 5 Alex Masmej human IPO -\\xca3fe04c7ee111f0bbb02c328c699226acf9fd33 SEEN 2 Seen.haus nft/physical art0x35bd01fc9d6d5d81ca9e055db88dc49aa2c699a8 -\\x6307b25a665efc992ec1c1bc403c38f3ddd7c661 GCR 5 Global Coin Research -\\xbcc66ed2ab491e9ae7bf8386541fb17421fa9d35 SKULL 5 Skeenee artist currency -\\x87b008e57f640d94ee44fd893f0323af933f9195 COIN 4 Social token of Marguerite DeCourcelle -\\x64d91f12ece7362f91a6f8e7940cd55f05060b92 ASH 18 Burn (ASH) -\\x7e9d8f07a64e363e97a648904a89fb4cd5fb94cd FF 18 Forefront -\\x32353a6c91143bfd6c7d363b546e62a9a2489a20 AGLD 18 Adventure Gold -\\xf1f955016ecbcd7321c7266bccfb96c68ea5e49b RLY 18 Rally - - -\. - -COMMIT; From 613d3d8ea2ca0020c0fdde010a886e1897bf31a8 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Wed, 19 Apr 2023 15:10:37 -0700 Subject: [PATCH 06/15] add zeroex to dex_aggregator.trades --- models/dex/dex_aggregator_trades.sql | 1 + models/dex/dex_schema.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/models/dex/dex_aggregator_trades.sql b/models/dex/dex_aggregator_trades.sql index 9e083615dbf..89d850d909c 100644 --- a/models/dex/dex_aggregator_trades.sql +++ b/models/dex/dex_aggregator_trades.sql @@ -27,6 +27,7 @@ spells with issues, to be excluded in short term: ,ref('lifi_trades') ,ref('yield_yak_avalanche_c_trades') ,ref('bebop_trades') + ,ref('zeroex_trades') ] %} SELECT * diff --git a/models/dex/dex_schema.yml b/models/dex/dex_schema.yml index 58f548f8f90..27784776555 100644 --- a/models/dex/dex_schema.yml +++ b/models/dex/dex_schema.yml @@ -93,7 +93,7 @@ models: - name: dex_aggregator_trades meta: - blockchain: ethereum, gnosis, avalanche_c, fantom + blockchain: ethereum, gnosis, avalanche_c, fantom, optimism, arbitrum, bnb sector: dex_aggregator contributors: bh2smith, Henrystats, jeff-dude config: From 66d2759b240baa919212da9ca6a4f70ee95c4f6b Mon Sep 17 00:00:00 2001 From: RantumBits Date: Mon, 14 Aug 2023 10:25:12 -0700 Subject: [PATCH 07/15] remove old branches --- ...inflagPoly chainflageth cln contract dedup | 66 +++++++++++++++++++ ..._btc_view layer_1_eth_view main matcha-fee | 37 +++++++++++ 2 files changed, 103 insertions(+) create mode 100644 h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup create mode 100644 h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee diff --git a/h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup b/h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup new file mode 100644 index 00000000000..8b3a7711ac0 --- /dev/null +++ b/h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup @@ -0,0 +1,66 @@ + base + base-tokens +* celo + celo_tokens + master + remotes/origin/HEAD -> origin/master + remotes/origin/base + remotes/origin/base-tokens + remotes/origin/bnb3 + remotes/origin/bnbB + remotes/origin/bnbuni + remotes/origin/brew + remotes/origin/celo + remotes/origin/celo_tokens + remotes/origin/chainflag + remotes/origin/chainflagPoly + remotes/origin/chainflageth + remotes/origin/cln + remotes/origin/contract + remotes/origin/dedup + remotes/origin/dex + remotes/origin/dex-native + remotes/origin/ex + remotes/origin/fantom + remotes/origin/fix + remotes/origin/fix-dex-trades + remotes/origin/fix-uniswap_v3 + remotes/origin/fix2 + remotes/origin/fix_0x_cron + remotes/origin/fixb + remotes/origin/fixc + remotes/origin/fixnolimits + remotes/origin/ftm + remotes/origin/ftm-mim + remotes/origin/layer_1_btc_view + remotes/origin/layer_1_eth_view + remotes/origin/main + remotes/origin/master + remotes/origin/matcha-fee + remotes/origin/multi2 + remotes/origin/names-arb + remotes/origin/names-ava + remotes/origin/names-ftm + remotes/origin/names-op + remotes/origin/names-poly + remotes/origin/names2 + remotes/origin/names_B + remotes/origin/native + remotes/origin/nativeB + remotes/origin/nopricefix + remotes/origin/op3 + remotes/origin/patch-1 + remotes/origin/patch-2 + remotes/origin/poly + remotes/origin/polyfix + remotes/origin/polynft + remotes/origin/polynft2 + remotes/origin/r-others + remotes/origin/r-poly + remotes/origin/r-polyNFT + remotes/origin/rantum-social-token-addition + remotes/origin/rmv + remotes/origin/schemas + remotes/origin/timeout-dex + remotes/origin/token_balances + remotes/origin/topic diff --git a/h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee b/h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee new file mode 100644 index 00000000000..91bc5f04b2e --- /dev/null +++ b/h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee @@ -0,0 +1,37 @@ + base + base-tokens +* celo + celo_tokens + master + remotes/origin/HEAD -> origin/master + remotes/origin/base + remotes/origin/base-tokens + remotes/origin/celo + remotes/origin/celo_tokens + remotes/origin/master + remotes/origin/names-arb + remotes/origin/names-ava + remotes/origin/names-ftm + remotes/origin/names-op + remotes/origin/names-poly + remotes/origin/names2 + remotes/origin/names_B + remotes/origin/native + remotes/origin/nativeB + remotes/origin/nopricefix + remotes/origin/op3 + remotes/origin/patch-1 + remotes/origin/patch-2 + remotes/origin/poly + remotes/origin/polyfix + remotes/origin/polynft + remotes/origin/polynft2 + remotes/origin/r-others + remotes/origin/r-poly + remotes/origin/r-polyNFT + remotes/origin/rantum-social-token-addition + remotes/origin/rmv + remotes/origin/schemas + remotes/origin/timeout-dex + remotes/origin/token_balances + remotes/origin/topic From c6e4fd5336292f9df5bd7fde8ee1183fe3bf4277 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Wed, 6 Sep 2023 10:56:24 -0700 Subject: [PATCH 08/15] reset profiles.yml --- profiles.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles.yml b/profiles.yml index e75c70b43f7..10d52bd460f 100644 --- a/profiles.yml +++ b/profiles.yml @@ -9,4 +9,4 @@ spellbook-local: port: 1234 database: hive schema: wizard - threads: 1 + threads: 1 \ No newline at end of file From e3cb3da3e286f836105051113155434fb620f1f8 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Tue, 28 Nov 2023 10:10:54 -0800 Subject: [PATCH 09/15] remove --- ...inflagPoly chainflageth cln contract dedup | 66 ------------------- ..._btc_view layer_1_eth_view main matcha-fee | 37 ----------- 2 files changed, 103 deletions(-) delete mode 100644 h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup delete mode 100644 h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee diff --git a/h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup b/h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup deleted file mode 100644 index 8b3a7711ac0..00000000000 --- a/h origin -d bnb2 bnbB bnbuni brew chainflag chainflagPoly chainflageth cln contract dedup +++ /dev/null @@ -1,66 +0,0 @@ - base - base-tokens -* celo - celo_tokens - master - remotes/origin/HEAD -> origin/master - remotes/origin/base - remotes/origin/base-tokens - remotes/origin/bnb3 - remotes/origin/bnbB - remotes/origin/bnbuni - remotes/origin/brew - remotes/origin/celo - remotes/origin/celo_tokens - remotes/origin/chainflag - remotes/origin/chainflagPoly - remotes/origin/chainflageth - remotes/origin/cln - remotes/origin/contract - remotes/origin/dedup - remotes/origin/dex - remotes/origin/dex-native - remotes/origin/ex - remotes/origin/fantom - remotes/origin/fix - remotes/origin/fix-dex-trades - remotes/origin/fix-uniswap_v3 - remotes/origin/fix2 - remotes/origin/fix_0x_cron - remotes/origin/fixb - remotes/origin/fixc - remotes/origin/fixnolimits - remotes/origin/ftm - remotes/origin/ftm-mim - remotes/origin/layer_1_btc_view - remotes/origin/layer_1_eth_view - remotes/origin/main - remotes/origin/master - remotes/origin/matcha-fee - remotes/origin/multi2 - remotes/origin/names-arb - remotes/origin/names-ava - remotes/origin/names-ftm - remotes/origin/names-op - remotes/origin/names-poly - remotes/origin/names2 - remotes/origin/names_B - remotes/origin/native - remotes/origin/nativeB - remotes/origin/nopricefix - remotes/origin/op3 - remotes/origin/patch-1 - remotes/origin/patch-2 - remotes/origin/poly - remotes/origin/polyfix - remotes/origin/polynft - remotes/origin/polynft2 - remotes/origin/r-others - remotes/origin/r-poly - remotes/origin/r-polyNFT - remotes/origin/rantum-social-token-addition - remotes/origin/rmv - remotes/origin/schemas - remotes/origin/timeout-dex - remotes/origin/token_balances - remotes/origin/topic diff --git a/h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee b/h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee deleted file mode 100644 index 91bc5f04b2e..00000000000 --- a/h origin -d fixc fixnolimits ftm ftm-mim layer_1_btc_view layer_1_eth_view main matcha-fee +++ /dev/null @@ -1,37 +0,0 @@ - base - base-tokens -* celo - celo_tokens - master - remotes/origin/HEAD -> origin/master - remotes/origin/base - remotes/origin/base-tokens - remotes/origin/celo - remotes/origin/celo_tokens - remotes/origin/master - remotes/origin/names-arb - remotes/origin/names-ava - remotes/origin/names-ftm - remotes/origin/names-op - remotes/origin/names-poly - remotes/origin/names2 - remotes/origin/names_B - remotes/origin/native - remotes/origin/nativeB - remotes/origin/nopricefix - remotes/origin/op3 - remotes/origin/patch-1 - remotes/origin/patch-2 - remotes/origin/poly - remotes/origin/polyfix - remotes/origin/polynft - remotes/origin/polynft2 - remotes/origin/r-others - remotes/origin/r-poly - remotes/origin/r-polyNFT - remotes/origin/rantum-social-token-addition - remotes/origin/rmv - remotes/origin/schemas - remotes/origin/timeout-dex - remotes/origin/token_balances - remotes/origin/topic From e8f368a4abea0cfed6ed4fe82eaca384d7e61c8a Mon Sep 17 00:00:00 2001 From: RantumBits Date: Tue, 28 Nov 2023 10:22:24 -0800 Subject: [PATCH 10/15] save --- .../erc20/transfers_ethereum_erc20.sql | 111 ++++++++---------- .../transfers_ethereum_erc20_agg_day.sql | 26 ++-- .../transfers_ethereum_erc20_agg_hour.sql | 26 ++-- .../transfers_ethereum_erc20_rolling_day.sql | 30 ++--- .../transfers_ethereum_erc20_rolling_hour.sql | 33 ++---- 5 files changed, 101 insertions(+), 125 deletions(-) diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql index d4c8d5deb3b..a76a14d9743 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql @@ -1,69 +1,58 @@ {{ config( -tags=['prod_exclude'],materialized='view', alias = 'erc20', - post_hook='{{ expose_spells(\'["ethereum"]\', + schema = tranfers_ethereum, + materialized = 'incremental', + partition_by = ['block_month'], + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['transfer_type', 'evt_tx_hash', 'evt_index', 'wallet_address'], + alias = 'erc20', + post_hook='{{ expose_spells(\'["ethereum"]\', "sector", "transfers", - \'["soispoke","dot2dotseurat"]\') }}') }} -/* - note: this spell has not been migrated to dunesql, therefore is only a view on spark - please migrate to dunesql to ensure up-to-date logic & data -*/ -with - sent_transfers as ( - select - CAST('send' AS VARCHAR(4)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(`to` AS VARCHAR(100)) as unique_transfer_id, - `to` as wallet_address, - contract_address as token_address, + \'["soispoke","dot2dotseurat","rantum"]\') }}') }} +WITH + +erc20_transfers as ( + SELECT + 'receive' as transfer_type, + evt_tx_hash, + evt_index, evt_block_time, - value as amount_raw - from - {{ source('erc20_ethereum', 'evt_transfer') }} - ) + to as wallet_address, + contract_address as token_address, + CAST(value as double) as amount_raw + FROM + {{ source('erc20_ethereum', 'evt_transfer') }} + {% if is_incremental() %} + WHERE evt_block_time >= date_trunc('day', now() - interval '3' Day) + {% endif %} - , - received_transfers as ( - select - CAST('receive' AS VARCHAR(7)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(`from` AS VARCHAR(100)) as unique_transfer_id, - `from` as wallet_address, - contract_address as token_address, - evt_block_time, - '-' || CAST(value AS VARCHAR(100)) as amount_raw - from - {{ source('erc20_ethereum', 'evt_transfer') }} - ) + UNION ALL - , - deposited_weth as ( - select - CAST('deposit' AS VARCHAR(7)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(dst AS VARCHAR(100)) as unique_transfer_id, - dst as wallet_address, - contract_address as token_address, + SELECT + 'send' as transfer_type, + evt_tx_hash, + evt_index, evt_block_time, - wad as amount_raw - from - {{ source('zeroex_ethereum', 'weth9_evt_deposit') }} - ) - - , - withdrawn_weth as ( - select - CAST('withdrawn' AS VARCHAR(9)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(src AS VARCHAR(100)) as unique_transfer_id, - src as wallet_address, + "from" as wallet_address, contract_address as token_address, - evt_block_time, - '-' || CAST(wad AS VARCHAR(100)) as amount_raw - from - {{ source('zeroex_ethereum', 'weth9_evt_withdrawal') }} - ) - -select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw -from sent_transfers -union -select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw -from received_transfers -union -select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw -from deposited_weth -union -select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw -from withdrawn_weth \ No newline at end of file + -CAST(value as double) as amount_raw + FROM + {{ source('erc20_ethereum', 'evt_transfer') }} + {% if is_incremental() %} + WHERE evt_block_time >= date_trunc('day', now() - interval '3' Day) + {% endif %} +) + +SELECT + 'ethereum' as blockchain, + transfer_type, + evt_tx_hash, + evt_index, + evt_block_time, + CAST(date_trunc('month', evt_block_time) as date) as block_month, + wallet_address, + token_address, + amount_raw +FROM +erc20_transfers \ No newline at end of file diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql index 9544613210d..ab740d774ae 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql @@ -1,29 +1,29 @@ {{ config( -tags=['prod_exclude'], + schema = tranfers_ethereum, alias = 'erc20_agg_day', materialized ='incremental', + partition_by = ['block_month'], file_format ='delta', incremental_strategy='merge', - unique_key='unique_transfer_id' + unique_key = ['block_day', 'wallet_address', 'token_address'] ) }} -/* - note: this spell has not been migrated to dunesql, therefore is only a view on spark - please migrate to dunesql to ensure up-to-date logic & data -*/ + select - 'ethereum' as blockchain, - date_trunc('day', tr.evt_block_time) as day, + tr.blockchain, + date_trunc('day', tr.evt_block_time) as block_day, + block_month, tr.wallet_address, tr.token_address, t.symbol, - tr.wallet_address || '-' || tr.token_address || '-' || date_trunc('day', tr.evt_block_time) as unique_transfer_id, sum(tr.amount_raw) as amount_raw, sum(tr.amount_raw / power(10, t.decimals)) as amount -from {{ ref('transfers_ethereum_erc20') }} tr -left join {{ ref('tokens_ethereum_erc20') }} t on t.contract_address = tr.token_address +FROM +{{ ref('transfers_ethereum_erc20') }} tr +LEFT JOIN +{{ ref('tokens_ethereum_erc20') }} t on t.contract_address = tr.token_address {% if is_incremental() %} -- this filter will only be applied on an incremental run -where tr.evt_block_time >= date_trunc('day', now() - interval '1 week') +WHERE tr.evt_block_time >= date_trunc('day', now() - interval '3' Day) {% endif %} -group by 1, 2, 3, 4, 5, 6 +GROUP BY 1, 2, 3, 4, 5, 6 \ No newline at end of file diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql index ff54444e404..64d73f4dd45 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql @@ -1,29 +1,29 @@ {{ config( -tags=['prod_exclude'], + schema = tranfers_ethereum, alias = 'erc20_agg_hour', materialized ='incremental', + partition_by = ['block_month'], file_format ='delta', incremental_strategy='merge', - unique_key='unique_transfer_id' + unique_key = ['block_hour', 'wallet_address', 'token_address'] ) }} -/* - note: this spell has not been migrated to dunesql, therefore is only a view on spark - please migrate to dunesql to ensure up-to-date logic & data -*/ + select - 'ethereum' as blockchain, - date_trunc('hour', tr.evt_block_time) as hour, + tr.blockchain, + date_trunc('hour', tr.evt_block_time) as block_hour, + block_month, tr.wallet_address, tr.token_address, t.symbol, - tr.wallet_address || '-' || tr.token_address || '-' || date_trunc('hour', tr.evt_block_time) as unique_transfer_id, sum(tr.amount_raw) as amount_raw, sum(tr.amount_raw / power(10, t.decimals)) as amount -from {{ ref('transfers_ethereum_erc20') }} tr -left join {{ ref('tokens_ethereum_erc20') }} t on t.contract_address = tr.token_address +FROM +{{ ref('transfers_ethereum_erc20') }} tr +LEFT JOIN +{{ ref('tokens_ethereum_erc20') }} t on t.contract_address = tr.token_address {% if is_incremental() %} -- this filter will only be applied on an incremental run -where tr.evt_block_time >= date_trunc('hour', now() - interval '1 week') +WHERE tr.evt_block_time >= date_trunc('hour', now() - interval '3' Day) {% endif %} -group by 1, 2, 3, 4, 5, 6 +GROUP BY 1, 2, 3, 4, 5, 6 \ No newline at end of file diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql index 8188a031584..4db06c74df8 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql @@ -1,23 +1,17 @@ {{ config( -tags=['prod_exclude'], + schema = tranfers_ethereum, alias = 'erc20_rolling_day') }} -/* - note: this spell has not been migrated to dunesql, therefore is only a view on spark - please migrate to dunesql to ensure up-to-date logic & data -*/ - select - 'ethereum' as blockchain, - day, + + SELECT + blockchain, + block_day, wallet_address, token_address, - symbol, - NOW() as last_updated, - row_number() over (partition by token_address, wallet_address order by day desc) as recency_index, - sum(amount_raw) over ( - partition by token_address, wallet_address order by day - ) as amount_raw, - sum(amount) over ( - partition by token_address, wallet_address order by day - ) as amount - from {{ ref('transfers_ethereum_erc20_agg_day') }} \ No newline at end of file + symbol, + CAST(NOW() as timestamp) as last_updated, + ROW_NUMBER() OVER (PARTITION BY token_address, wallet_address ORDER BY block_day DESC) as recency_index, + SUM(amount_raw) OVER (PARTITION BY token_address, wallet_address ORDER BY block_day) as amount_raw, + SUM(amount) OVER (PARTITION BY token_address, wallet_address ORDER BY block_day) as amount + FROM + {{ ref('transfers_ethereum_erc20_agg_day') }} \ No newline at end of file diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql index 186a849619f..ad96a7a0262 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql @@ -1,24 +1,17 @@ {{ config( -tags=['prod_exclude'], - alias = 'erc20_rolling_hour' - ) + schema = tranfers_ethereum, + alias = 'erc20_rolling_hour') }} -/* - note: this spell has not been migrated to dunesql, therefore is only a view on spark - please migrate to dunesql to ensure up-to-date logic & data -*/ - select - 'ethereum' as blockchain, - hour, + + SELECT + blockchain, + block_hour, wallet_address, token_address, - symbol, - NOW() as last_updated, - row_number() over (partition by token_address, wallet_address order by hour desc) as recency_index, - sum(amount_raw) over ( - partition by token_address, wallet_address order by hour - ) as amount_raw, - sum(amount) over ( - partition by token_address, wallet_address order by hour - ) as amount - from {{ ref('transfers_ethereum_erc20_agg_hour') }} \ No newline at end of file + symbol, + CAST(NOW() as timestamp) as last_updated, + ROW_NUMBER() OVER (PARTITION BY token_address, wallet_address ORDER BY block_hour DESC) as recency_index, + SUM(amount_raw) OVER (PARTITION BY token_address, wallet_address ORDER BY block_hour) as amount_raw, + SUM(amount) OVER (PARTITION BY token_address, wallet_address ORDER BY block_hour) as amount + FROM + {{ ref('transfers_ethereum_erc20_agg_hour') }} \ No newline at end of file From 50f23a38591654e61aab2ab1961506ceb8cee03e Mon Sep 17 00:00:00 2001 From: RantumBits Date: Wed, 29 Nov 2023 14:46:17 -0800 Subject: [PATCH 11/15] schema --- .../transfers_ethereum_erc20_agg_hour.sql | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql index 64d73f4dd45..5743e59aa85 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql @@ -1,29 +1,29 @@ {{ config( - schema = tranfers_ethereum, +tags=['prod_exclude'], alias = 'erc20_agg_hour', materialized ='incremental', - partition_by = ['block_month'], file_format ='delta', incremental_strategy='merge', - unique_key = ['block_hour', 'wallet_address', 'token_address'] + unique_key='unique_transfer_id' ) }} - +/* + note: this spell has not been migrated to dunesql, therefore is only a view on spark + please migrate to dunesql to ensure up-to-date logic & data +*/ select - tr.blockchain, - date_trunc('hour', tr.evt_block_time) as block_hour, - block_month, + 'ethereum' as blockchain, + date_trunc('hour', tr.evt_block_time) as hour, tr.wallet_address, tr.token_address, t.symbol, + tr.wallet_address || '-' || tr.token_address || '-' || date_trunc('hour', tr.evt_block_time) as unique_transfer_id, sum(tr.amount_raw) as amount_raw, sum(tr.amount_raw / power(10, t.decimals)) as amount -FROM -{{ ref('transfers_ethereum_erc20') }} tr -LEFT JOIN -{{ ref('tokens_ethereum_erc20') }} t on t.contract_address = tr.token_address +from {{ ref('transfers_ethereum_erc20') }} tr +left join {{ ref('tokens_ethereum_erc20') }} t on t.contract_address = tr.token_address {% if is_incremental() %} -- this filter will only be applied on an incremental run -WHERE tr.evt_block_time >= date_trunc('hour', now() - interval '3' Day) +where tr.evt_block_time >= date_trunc('hour', now() - interval '1 week') {% endif %} -GROUP BY 1, 2, 3, 4, 5, 6 \ No newline at end of file +group by 1, 2, 3, 4, 5, 6 \ No newline at end of file From dadcabfdb7621333c86934bd1115305c7ceb4c27 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Mon, 11 Mar 2024 11:43:54 -0700 Subject: [PATCH 12/15] undo trnsfesr changes --- .../erc20/transfers_ethereum_erc20.sql | 111 ++++++++++-------- .../transfers_ethereum_erc20_agg_day.sql | 20 ++-- .../transfers_ethereum_erc20_agg_hour.sql | 2 +- .../transfers_ethereum_erc20_rolling_day.sql | 30 +++-- .../transfers_ethereum_erc20_rolling_hour.sql | 33 ++++-- 5 files changed, 111 insertions(+), 85 deletions(-) diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql index a76a14d9743..d4c8d5deb3b 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20.sql @@ -1,58 +1,69 @@ {{ config( - schema = tranfers_ethereum, - materialized = 'incremental', - partition_by = ['block_month'], - file_format = 'delta', - incremental_strategy = 'merge', - unique_key = ['transfer_type', 'evt_tx_hash', 'evt_index', 'wallet_address'], - alias = 'erc20', - post_hook='{{ expose_spells(\'["ethereum"]\', +tags=['prod_exclude'],materialized='view', alias = 'erc20', + post_hook='{{ expose_spells(\'["ethereum"]\', "sector", "transfers", - \'["soispoke","dot2dotseurat","rantum"]\') }}') }} -WITH - -erc20_transfers as ( - SELECT - 'receive' as transfer_type, - evt_tx_hash, - evt_index, - evt_block_time, - to as wallet_address, + \'["soispoke","dot2dotseurat"]\') }}') }} +/* + note: this spell has not been migrated to dunesql, therefore is only a view on spark + please migrate to dunesql to ensure up-to-date logic & data +*/ +with + sent_transfers as ( + select + CAST('send' AS VARCHAR(4)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(`to` AS VARCHAR(100)) as unique_transfer_id, + `to` as wallet_address, contract_address as token_address, - CAST(value as double) as amount_raw - FROM - {{ source('erc20_ethereum', 'evt_transfer') }} - {% if is_incremental() %} - WHERE evt_block_time >= date_trunc('day', now() - interval '3' Day) - {% endif %} + evt_block_time, + value as amount_raw + from + {{ source('erc20_ethereum', 'evt_transfer') }} + ) - UNION ALL + , + received_transfers as ( + select + CAST('receive' AS VARCHAR(7)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(`from` AS VARCHAR(100)) as unique_transfer_id, + `from` as wallet_address, + contract_address as token_address, + evt_block_time, + '-' || CAST(value AS VARCHAR(100)) as amount_raw + from + {{ source('erc20_ethereum', 'evt_transfer') }} + ) - SELECT - 'send' as transfer_type, - evt_tx_hash, - evt_index, - evt_block_time, - "from" as wallet_address, + , + deposited_weth as ( + select + CAST('deposit' AS VARCHAR(7)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(dst AS VARCHAR(100)) as unique_transfer_id, + dst as wallet_address, contract_address as token_address, - -CAST(value as double) as amount_raw - FROM - {{ source('erc20_ethereum', 'evt_transfer') }} - {% if is_incremental() %} - WHERE evt_block_time >= date_trunc('day', now() - interval '3' Day) - {% endif %} -) + evt_block_time, + wad as amount_raw + from + {{ source('zeroex_ethereum', 'weth9_evt_deposit') }} + ) -SELECT - 'ethereum' as blockchain, - transfer_type, - evt_tx_hash, - evt_index, - evt_block_time, - CAST(date_trunc('month', evt_block_time) as date) as block_month, - wallet_address, - token_address, - amount_raw -FROM -erc20_transfers \ No newline at end of file + , + withdrawn_weth as ( + select + CAST('withdrawn' AS VARCHAR(9)) || CAST('-' AS VARCHAR(1)) || CAST(evt_tx_hash AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(evt_index AS VARCHAR(100)) || CAST('-' AS VARCHAR(1)) || CAST(src AS VARCHAR(100)) as unique_transfer_id, + src as wallet_address, + contract_address as token_address, + evt_block_time, + '-' || CAST(wad AS VARCHAR(100)) as amount_raw + from + {{ source('zeroex_ethereum', 'weth9_evt_withdrawal') }} + ) + +select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw +from sent_transfers +union +select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw +from received_transfers +union +select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw +from deposited_weth +union +select unique_transfer_id, 'ethereum' as blockchain, wallet_address, token_address, evt_block_time, CAST(amount_raw AS VARCHAR(100)) as amount_raw +from withdrawn_weth \ No newline at end of file diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql index a87ac6f911a..fb45b868faa 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_day.sql @@ -1,27 +1,29 @@ {{ config( - schema = tranfers_ethereum, +tags=['prod_exclude'], alias = 'erc20_agg_day', materialized ='incremental', - partition_by = ['block_month'], file_format ='delta', incremental_strategy='merge', - unique_key = ['block_day', 'wallet_address', 'token_address'] + unique_key='unique_transfer_id' ) }} - +/* + note: this spell has not been migrated to dunesql, therefore is only a view on spark + please migrate to dunesql to ensure up-to-date logic & data +*/ select - tr.blockchain, - date_trunc('day', tr.evt_block_time) as block_day, - block_month, + 'ethereum' as blockchain, + date_trunc('day', tr.evt_block_time) as day, tr.wallet_address, tr.token_address, t.symbol, + tr.wallet_address || '-' || tr.token_address || '-' || date_trunc('day', tr.evt_block_time) as unique_transfer_id, sum(tr.amount_raw) as amount_raw, sum(tr.amount_raw / power(10, t.decimals)) as amount from {{ ref('transfers_ethereum_erc20') }} tr left join {{ source('tokens_ethereum', 'erc20') }} t on t.contract_address = tr.token_address {% if is_incremental() %} -- this filter will only be applied on an incremental run -WHERE tr.evt_block_time >= date_trunc('day', now() - interval '3' Day) +where tr.evt_block_time >= date_trunc('day', now() - interval '1 week') {% endif %} -GROUP BY 1, 2, 3, 4, 5, 6 \ No newline at end of file +group by 1, 2, 3, 4, 5, 6 diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql index 76c904ac0ae..b73c6416635 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_agg_hour.sql @@ -26,4 +26,4 @@ left join {{ source('tokens_ethereum', 'erc20') }} t on t.contract_address = tr. -- this filter will only be applied on an incremental run where tr.evt_block_time >= date_trunc('hour', now() - interval '1 week') {% endif %} -group by 1, 2, 3, 4, 5, 6 \ No newline at end of file +group by 1, 2, 3, 4, 5, 6 diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql index 4db06c74df8..8188a031584 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_day.sql @@ -1,17 +1,23 @@ {{ config( - schema = tranfers_ethereum, +tags=['prod_exclude'], alias = 'erc20_rolling_day') }} - - SELECT - blockchain, - block_day, +/* + note: this spell has not been migrated to dunesql, therefore is only a view on spark + please migrate to dunesql to ensure up-to-date logic & data +*/ + select + 'ethereum' as blockchain, + day, wallet_address, token_address, - symbol, - CAST(NOW() as timestamp) as last_updated, - ROW_NUMBER() OVER (PARTITION BY token_address, wallet_address ORDER BY block_day DESC) as recency_index, - SUM(amount_raw) OVER (PARTITION BY token_address, wallet_address ORDER BY block_day) as amount_raw, - SUM(amount) OVER (PARTITION BY token_address, wallet_address ORDER BY block_day) as amount - FROM - {{ ref('transfers_ethereum_erc20_agg_day') }} \ No newline at end of file + symbol, + NOW() as last_updated, + row_number() over (partition by token_address, wallet_address order by day desc) as recency_index, + sum(amount_raw) over ( + partition by token_address, wallet_address order by day + ) as amount_raw, + sum(amount) over ( + partition by token_address, wallet_address order by day + ) as amount + from {{ ref('transfers_ethereum_erc20_agg_day') }} \ No newline at end of file diff --git a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql index ad96a7a0262..186a849619f 100644 --- a/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql +++ b/models/transfers/ethereum/erc20/transfers_ethereum_erc20_rolling_hour.sql @@ -1,17 +1,24 @@ {{ config( - schema = tranfers_ethereum, - alias = 'erc20_rolling_hour') +tags=['prod_exclude'], + alias = 'erc20_rolling_hour' + ) }} - - SELECT - blockchain, - block_hour, +/* + note: this spell has not been migrated to dunesql, therefore is only a view on spark + please migrate to dunesql to ensure up-to-date logic & data +*/ + select + 'ethereum' as blockchain, + hour, wallet_address, token_address, - symbol, - CAST(NOW() as timestamp) as last_updated, - ROW_NUMBER() OVER (PARTITION BY token_address, wallet_address ORDER BY block_hour DESC) as recency_index, - SUM(amount_raw) OVER (PARTITION BY token_address, wallet_address ORDER BY block_hour) as amount_raw, - SUM(amount) OVER (PARTITION BY token_address, wallet_address ORDER BY block_hour) as amount - FROM - {{ ref('transfers_ethereum_erc20_agg_hour') }} \ No newline at end of file + symbol, + NOW() as last_updated, + row_number() over (partition by token_address, wallet_address order by hour desc) as recency_index, + sum(amount_raw) over ( + partition by token_address, wallet_address order by hour + ) as amount_raw, + sum(amount) over ( + partition by token_address, wallet_address order by hour + ) as amount + from {{ ref('transfers_ethereum_erc20_agg_hour') }} \ No newline at end of file From c751784afcb4cf5e631c17def68845b561321dd0 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Wed, 3 Apr 2024 15:08:18 -0700 Subject: [PATCH 13/15] add avax tokens --- .../avalanche_c/prices_avalanche_c_tokens.sql | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/models/prices/avalanche_c/prices_avalanche_c_tokens.sql b/models/prices/avalanche_c/prices_avalanche_c_tokens.sql index 86ac38fb990..5723b30b4af 100644 --- a/models/prices/avalanche_c/prices_avalanche_c_tokens.sql +++ b/models/prices/avalanche_c/prices_avalanche_c_tokens.sql @@ -79,5 +79,16 @@ FROM ('roco-roco-finance','avalanche_c','ROCO',0xb2a85C5ECea99187A977aC34303b80AcbDdFa208,18), ('vchf-vnx-swiss-franc','avalanche_c','VCHF',0x228a48df6819ccc2eca01e2192ebafffdad56c19,18), ('veur-vnx-euro','avalanche_c','VEUR',0x7678e162f38ec9ef2bfd1d0aaf9fd93355e5fa0b,18), - ('yyavax-yieldyak-gavax','avalanche_c','YYAVAX',0xf7d9281e8e363584973f946201b82ba72c965d27,18) + ('yyavax-yieldyak-gavax','avalanche_c','YYAVAX',0xf7d9281e8e363584973f946201b82ba72c965d27,18), + ('kimbo-kimbo','avalanche_c','KIMBO',0x184ff13b3ebcb25be44e860163a5d8391dd568c1,18), + ('gec-gecko-inu','avalanche_c','GEC',0xe8385cecb013561b69beb63ff59f4d10734881f3,18), + ('hec-heroeschained','avalanche_c','HEC',0xc7f4debc8072e23fe9259a5c0398326d8efb7f5c,18), + ('png-pangolin','avalanche_c','PNG',0x60781c2586d68229fde47564546784ab3faca982,18), + ('cly-colony','avalanche_c','CLY',0xec3492a2508ddf4fdc0cd76f31f340b30d1793e6,18), + ('rocket-team-rocket','avalanche_c','ROCKET',0x5039af99956f13a4e2c4b29e745e4d27e07b45ff,18), + ('spell-spell-token','avalanche_c','SPELL',0xce1bffbd5374dac86a2893119683f4911a2f7814,18), + ('gurs-gursonavax','avalanche_c','GURS',0x223a368ad0e7396165fc629976d77596a51f155c,18), + ('hon-heroes-of-nft','avalanche_c','HON',0xed2b42d3c9c6e97e11755bb37df29b6375ede3eb,18), + ('hbobs-bobs','avalanche_c','BOBS',0xf5f3216e9fed36f8ccf08d310fec6fbf7f06200f,18), + ('bawls-bawls-onu','avalanche_c','BAWLS',0x2da8312e2c08b79104c6b18ba26bc7065abec704,18) ) as temp (token_id, blockchain, symbol, contract_address, decimals) From 5cb643271ceb63e27acf9479cc3d0ec6b242d597 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Wed, 3 Apr 2024 15:19:35 -0700 Subject: [PATCH 14/15] remove BOBS --- models/prices/avalanche_c/prices_avalanche_c_tokens.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/prices/avalanche_c/prices_avalanche_c_tokens.sql b/models/prices/avalanche_c/prices_avalanche_c_tokens.sql index 5723b30b4af..92427d86e0c 100644 --- a/models/prices/avalanche_c/prices_avalanche_c_tokens.sql +++ b/models/prices/avalanche_c/prices_avalanche_c_tokens.sql @@ -75,7 +75,7 @@ FROM --('snowy-fantastic-protocol-snowy-token','avalanche_c','SNOWY',0x6da767394f079c1524B3e797D2110C23c3ecf322,18), ('monk-monkoshi','avalanche_c','MONK',0x7a5424A1AfB6C786f5dd603847683980Fdb2cda7,18), ('man-man-man-man','avalanche_c','MAN',0xBEd472c62A5Aa4dD734B6bF5EbA1413d86AAbA6b,18), - ('bobs-bobs','avalanche_c','BOBS',0xf5f3216E9fed36F8cCf08D310FEc6FBf7f06200f,18), + --('bobs-bobs','avalanche_c','BOBS',0xf5f3216E9fed36F8cCf08D310FEc6FBf7f06200f,18), ('roco-roco-finance','avalanche_c','ROCO',0xb2a85C5ECea99187A977aC34303b80AcbDdFa208,18), ('vchf-vnx-swiss-franc','avalanche_c','VCHF',0x228a48df6819ccc2eca01e2192ebafffdad56c19,18), ('veur-vnx-euro','avalanche_c','VEUR',0x7678e162f38ec9ef2bfd1d0aaf9fd93355e5fa0b,18), @@ -89,6 +89,5 @@ FROM ('spell-spell-token','avalanche_c','SPELL',0xce1bffbd5374dac86a2893119683f4911a2f7814,18), ('gurs-gursonavax','avalanche_c','GURS',0x223a368ad0e7396165fc629976d77596a51f155c,18), ('hon-heroes-of-nft','avalanche_c','HON',0xed2b42d3c9c6e97e11755bb37df29b6375ede3eb,18), - ('hbobs-bobs','avalanche_c','BOBS',0xf5f3216e9fed36f8ccf08d310fec6fbf7f06200f,18), ('bawls-bawls-onu','avalanche_c','BAWLS',0x2da8312e2c08b79104c6b18ba26bc7065abec704,18) ) as temp (token_id, blockchain, symbol, contract_address, decimals) From f5fe0237ba2f92b0edcf0e2f462d437511da3457 Mon Sep 17 00:00:00 2001 From: RantumBits Date: Wed, 3 Apr 2024 15:21:34 -0700 Subject: [PATCH 15/15] remove --- models/prices/avalanche_c/prices_avalanche_c_tokens.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/prices/avalanche_c/prices_avalanche_c_tokens.sql b/models/prices/avalanche_c/prices_avalanche_c_tokens.sql index 92427d86e0c..7196c0a11c2 100644 --- a/models/prices/avalanche_c/prices_avalanche_c_tokens.sql +++ b/models/prices/avalanche_c/prices_avalanche_c_tokens.sql @@ -79,7 +79,7 @@ FROM ('roco-roco-finance','avalanche_c','ROCO',0xb2a85C5ECea99187A977aC34303b80AcbDdFa208,18), ('vchf-vnx-swiss-franc','avalanche_c','VCHF',0x228a48df6819ccc2eca01e2192ebafffdad56c19,18), ('veur-vnx-euro','avalanche_c','VEUR',0x7678e162f38ec9ef2bfd1d0aaf9fd93355e5fa0b,18), - ('yyavax-yieldyak-gavax','avalanche_c','YYAVAX',0xf7d9281e8e363584973f946201b82ba72c965d27,18), + -- ('yyavax-yieldyak-gavax','avalanche_c','YYAVAX',0xf7d9281e8e363584973f946201b82ba72c965d27,18), -- inactive ('kimbo-kimbo','avalanche_c','KIMBO',0x184ff13b3ebcb25be44e860163a5d8391dd568c1,18), ('gec-gecko-inu','avalanche_c','GEC',0xe8385cecb013561b69beb63ff59f4d10734881f3,18), ('hec-heroeschained','avalanche_c','HEC',0xc7f4debc8072e23fe9259a5c0398326d8efb7f5c,18),