From df86c9e410cb43e72c80f5c6751bd663f5a6bcae Mon Sep 17 00:00:00 2001 From: Patel Princi Date: Thu, 5 Dec 2024 02:09:28 +0530 Subject: [PATCH] Added Stablebase for Base (#7221) * Added Stablebase for Base * Schema configuration added in _schema.yml file * modified code in _schema.yml file * modified code in _schema.yml file * modified code in _schema.yml file * modified code in _schema.yml file * replaced id with address in token bought and sold, chnaged schmea and alias name in base trades file of stablebase * chnaged in timestamo in csv * changed the type of column mismatch * Changed the type in seed file * trying to remove the issue in trade seed file * changed the X username of the protocol * changed the _schema.yml file * changed the _schema.yml file * changed the _schema.yml file * changed the _schema.yml file * changed the _schema.yml file * took pull --- dbt_subprojects/dex/models/dex_info.sql | 1 + .../dex/models/trades/base/_schema.yml | 142 ++++++++------- .../trades/base/dex_base_base_trades.sql | 1 + .../platforms/stablebase_base_base_trades.sql | 50 ++++++ dbt_subprojects/dex/seeds/trades/_schema.yml | 164 ++++++++++-------- .../stablebase_base_base_trades_seed.csv | 2 + sources/_sector/dex/trades/base/_sources.yml | 3 + 7 files changed, 214 insertions(+), 149 deletions(-) create mode 100644 dbt_subprojects/dex/models/trades/base/platforms/stablebase_base_base_trades.sql create mode 100644 dbt_subprojects/dex/seeds/trades/stablebase_base_base_trades_seed.csv diff --git a/dbt_subprojects/dex/models/dex_info.sql b/dbt_subprojects/dex/models/dex_info.sql index 42fd54da190..214f25e6c75 100644 --- a/dbt_subprojects/dex/models/dex_info.sql +++ b/dbt_subprojects/dex/models/dex_info.sql @@ -185,6 +185,7 @@ FROM (VALUES , ('kaia_swap', 'KaiaSwap', 'Direct', 'KaiaSwap') , ('defi_kingdoms', 'DeFi Kingdoms', 'Direct', 'DeFiKingdoms') , ('hyperjump', 'HyperJump', 'Direct', 'Hyperjump_fi') + , ('stablebase', 'StableBase', 'Direct', 'stablebasefi') , ('flashliquidity', 'Flashliquidity', 'Direct', 'flashliquidity') , ('akronswap', 'Akronswap', 'Direct', 'AkronFinance') ) AS temp_table (project, name, marketplace_type, x_username) diff --git a/dbt_subprojects/dex/models/trades/base/_schema.yml b/dbt_subprojects/dex/models/trades/base/_schema.yml index 76c546922e4..b7b9bea1fce 100644 --- a/dbt_subprojects/dex/models/trades/base/_schema.yml +++ b/dbt_subprojects/dex/models/trades/base/_schema.yml @@ -12,7 +12,7 @@ models: project: uniswap contributors: wuligy config: - tags: [ 'base', 'dex', 'trades', 'uniswap', 'v3' ] + tags: ["base", "dex", "trades", "uniswap", "v3"] description: "uniswap base v3 base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -24,7 +24,6 @@ models: filter: version: 3 - - name: aerodrome_base_base_trades meta: blockchain: base @@ -32,7 +31,7 @@ models: project: aerodrome contributors: msilb7, tomfutago, Henrystats config: - tags: [ 'base', 'dex', 'trades', 'aerodrome' ] + tags: ["base", "dex", "trades", "aerodrome"] description: aerodrome base trades data_tests: - dbt_utils.unique_combination_of_columns: @@ -42,6 +41,22 @@ models: - check_dex_base_trades_seed: seed_file: ref('aerodrome_base_base_trades_seed') + - name: stablebase_base_base_trades + meta: + blockchain: base + sector: dex + project: stablebase + contributors: principatel + config: + tags: ["base", "dex", "trades", "stablebase"] + description: stablebase base trades + data_tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - tx_hash + - evt_index + - check_dex_base_trades_seed: + seed_file: ref('stablebase_base_base_trades_seed') - name: sushiswap_v1_base_base_trades meta: @@ -50,7 +65,7 @@ models: project: sushiswap contributors: tomfutago config: - tags: [ 'base', 'dex', 'trades', 'sushiswap', 'v1' ] + tags: ["base", "dex", "trades", "sushiswap", "v1"] description: "sushiswap base v1 base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -62,7 +77,6 @@ models: filter: version: 1 - - name: sushiswap_v2_base_base_trades meta: blockchain: base @@ -70,7 +84,7 @@ models: project: sushiswap contributors: wuligy, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'sushiswap', 'v2' ] + tags: ["base", "dex", "trades", "sushiswap", "v2"] description: "sushiswap base v2 base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -89,7 +103,7 @@ models: project: pancakeswap contributors: chef_seaweed, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'pancakeswap', 'uniswap', 'v2' ] + tags: ["base", "dex", "trades", "pancakeswap", "uniswap", "v2"] description: "Pancakeswap Base v2 base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -108,7 +122,7 @@ models: project: balancer contributors: bizzyvinci, thetroyharris, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'balancer' ] + tags: ["base", "dex", "trades", "balancer"] description: "Balancer v2 base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -127,7 +141,7 @@ models: project: pancakeswap contributors: chef_seaweed, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'pancakeswap', 'uniswap', 'v3' ] + tags: ["base", "dex", "trades", "pancakeswap", "uniswap", "v3"] description: "Pancakeswap Base v3 base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -146,7 +160,7 @@ models: project: dodo contributors: owen05, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'dodo' ] + tags: ["base", "dex", "trades", "dodo"] description: "Dodo base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -165,7 +179,7 @@ models: project: maverick contributors: get620v, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'maverick' ] + tags: ["base", "dex", "trades", "maverick"] description: "Maverick Base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -184,7 +198,7 @@ models: project: maverick contributors: get620v config: - tags: [ 'base', 'dex', 'trades', 'maverick' ] + tags: ["base", "dex", "trades", "maverick"] description: "Maverick Base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -203,7 +217,7 @@ models: project: smardex contributors: Chain_L config: - tags: [ 'base', 'dex', 'trades', 'smardex' ] + tags: ["base", "dex", "trades", "smardex"] description: "smardex base trades on base" data_tests: - dbt_utils.unique_combination_of_columns: @@ -220,7 +234,7 @@ models: project: baseswap contributors: ARDev097 config: - tags: [ 'base', 'dex', 'trades', 'baseswap' ] + tags: ["base", "dex", "trades", "baseswap"] description: "baseswap base trades on base" data_tests: - dbt_utils.unique_combination_of_columns: @@ -239,7 +253,7 @@ models: project: baseswap contributors: chef_seaweed config: - tags: [ 'base', 'dex', 'trades', 'baseswap' ] + tags: ["base", "dex", "trades", "baseswap"] description: "baseswap base trades on base" data_tests: - dbt_utils.unique_combination_of_columns: @@ -258,7 +272,7 @@ models: project: dackieswap contributors: Chain_L config: - tags: [ 'base', 'dex', 'trades', 'dackieswap' ] + tags: ["base", "dex", "trades", "dackieswap"] description: "dackieswap base trades on base" data_tests: - dbt_utils.unique_combination_of_columns: @@ -275,7 +289,7 @@ models: project: scale contributors: ARDev097 config: - tags: [ 'base', 'dex', 'trades', 'scale' ] + tags: ["base", "dex", "trades", "scale"] description: "scale base trades on base" data_tests: - dbt_utils.unique_combination_of_columns: @@ -292,7 +306,7 @@ models: project: rubicon contributors: denver, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'rubicon' ] + tags: ["base", "dex", "trades", "rubicon"] description: "rubicon base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -302,7 +316,6 @@ models: - check_dex_base_trades_seed: seed_file: ref('rubicon_base_base_trades_seed') - - name: kyberswap_base_base_trades meta: blockchain: base @@ -310,7 +323,7 @@ models: project: kyberswap contributors: lldao config: - tags: [ 'base', 'dex', 'trades', 'kyberswap' ] + tags: ["base", "dex", "trades", "kyberswap"] description: "kyberswap base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -322,7 +335,6 @@ models: filter: version: 2 - - name: woofi_base_base_trades meta: blockchain: base @@ -330,7 +342,7 @@ models: project: woofi contributors: lldao config: - tags: [ 'base', 'dex', 'trades', 'woofi' ] + tags: ["base", "dex", "trades", "woofi"] description: "woofi base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -342,7 +354,6 @@ models: filter: version: 2 - - name: velocimeter_v2_base_base_trades meta: blockchain: base @@ -350,7 +361,7 @@ models: project: velocimeter_v2 contributors: lldao config: - tags: [ 'base', 'dex', 'trades', 'velocimeter_v2' ] + tags: ["base", "dex", "trades", "velocimeter_v2"] description: "velocimeter_v2 base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -362,7 +373,6 @@ models: filter: version: 2 - - name: moonbase_base_base_trades meta: blockchain: base @@ -370,7 +380,7 @@ models: project: moonbase contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'moonbase' ] + tags: ["base", "dex", "trades", "moonbase"] description: "moonbase base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -382,7 +392,6 @@ models: filter: version: 1 - - name: sobal_base_base_trades meta: blockchain: base @@ -390,7 +399,7 @@ models: project: sobal contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'sobal' ] + tags: ["base", "dex", "trades", "sobal"] description: "sobal base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -402,7 +411,6 @@ models: filter: version: 1 - - name: plantbaseswap_base_base_trades meta: blockchain: base @@ -410,7 +418,7 @@ models: project: plantbaseswap contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'plantbaseswap' ] + tags: ["base", "dex", "trades", "plantbaseswap"] description: "plantbaseswap base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -422,7 +430,6 @@ models: filter: version: 2 - - name: derpdex_base_base_trades meta: blockchain: base @@ -430,7 +437,7 @@ models: project: derpdex contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'derpdex' ] + tags: ["base", "dex", "trades", "derpdex"] description: "derpdex base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -442,8 +449,6 @@ models: filter: version: 1 - - - name: torus_base_base_trades meta: blockchain: base @@ -451,7 +456,7 @@ models: project: torus contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'torus', 'v1' ] + tags: ["base", "dex", "trades", "torus", "v1"] description: "torus base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -461,7 +466,6 @@ models: - check_dex_base_trades_seed: seed_file: ref('torus_base_base_trades_seed') - - name: throne_exchange_v2_base_base_trades meta: blockchain: base @@ -469,7 +473,7 @@ models: project: throne_exchange contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'throne_exchange' ] + tags: ["base", "dex", "trades", "throne_exchange"] description: "throne_exchange base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -481,7 +485,6 @@ models: filter: version: 2 - - name: sharkswap_base_base_trades meta: blockchain: base @@ -489,7 +492,7 @@ models: project: sharkswap contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'sharkswap' ] + tags: ["base", "dex", "trades", "sharkswap"] description: "sharkswap base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -501,7 +504,6 @@ models: filter: version: 1 - - name: throne_exchange_v3_base_base_trades meta: blockchain: base @@ -509,7 +511,7 @@ models: project: throne_exchange contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'throne_exchange' ] + tags: ["base", "dex", "trades", "throne_exchange"] description: "throne_exchange base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -521,7 +523,6 @@ models: filter: version: 3 - - name: horizondex_base_base_trades meta: blockchain: base @@ -529,7 +530,7 @@ models: project: horizondex contributors: p2c2e config: - tags: [ 'base', 'dex', 'trades', 'horizondex' ] + tags: ["base", "dex", "trades", "horizondex"] description: "horizondex dex swaps on base chain" data_tests: - dbt_utils.unique_combination_of_columns: @@ -541,7 +542,6 @@ models: filter: version: 1 - - name: citadelswap_base_base_trades meta: blockchain: base @@ -549,7 +549,7 @@ models: project: citadelswap contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'citadelswap' ] + tags: ["base", "dex", "trades", "citadelswap"] description: "citadelswap base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -561,7 +561,6 @@ models: filter: version: 1 - - name: autotronic_base_base_trades meta: blockchain: base @@ -569,7 +568,7 @@ models: project: autotronic contributors: LLDAO config: - tags: [ 'base', 'dex', 'trades', 'autotronic' ] + tags: ["base", "dex", "trades", "autotronic"] description: "autotronic base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -581,7 +580,6 @@ models: filter: version: 1 - - name: uniswap_v2_base_base_trades meta: blockchain: base @@ -589,7 +587,7 @@ models: project: uniswap contributors: Henrystats config: - tags: [ 'base', 'dex', 'trades', 'uniswap', 'v2' ] + tags: ["base", "dex", "trades", "uniswap", "v2"] description: "uniswap base v2 base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -601,7 +599,6 @@ models: filter: version: 2 - - name: soswap_base_base_trades meta: blockchain: base @@ -609,7 +606,7 @@ models: project: soswap contributors: archie config: - tags: [ 'base', 'dex', 'trades', 'soswap' ] + tags: ["base", "dex", "trades", "soswap"] description: "soswap base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -621,7 +618,6 @@ models: filter: version: 1 - - name: elk_finance_base_base_trades meta: blockchain: base @@ -629,7 +625,7 @@ models: project: elk_finance contributors: archie config: - tags: [ 'base', 'dex', 'trades', 'elk_finance' ] + tags: ["base", "dex", "trades", "elk_finance"] description: "elk_finance base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -641,7 +637,6 @@ models: filter: version: 1 - - name: oasisswap_base_base_trades meta: blockchain: base @@ -649,7 +644,7 @@ models: project: oasisswap contributors: archie config: - tags: [ 'base', 'dex', 'trades', 'oasisswap' ] + tags: ["base", "dex", "trades", "oasisswap"] description: "oasisswap base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -661,7 +656,6 @@ models: filter: version: 1 - - name: leetswap_v2_base_base_trades meta: blockchain: base @@ -669,7 +663,7 @@ models: project: leetswap_v2 contributors: archie config: - tags: [ 'base', 'dex', 'trades', 'leetswap' ] + tags: ["base", "dex", "trades", "leetswap"] description: "leetswap_v2 base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -688,7 +682,7 @@ models: project: openocean contributors: Henrystats, tomfutago config: - tags: [ 'base', 'dex', 'trades', 'openocean' ] + tags: ["base", "dex", "trades", "openocean"] description: "openocean base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -705,7 +699,7 @@ models: project: rocketswap contributors: intensodefi config: - tags: [ 'base', 'dex', 'trades', 'rocketswap' ] + tags: ["base", "dex", "trades", "rocketswap"] description: "rocketswap base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -724,7 +718,7 @@ models: project: wombat_exchange contributors: Henrystats config: - tags: [ 'base', 'dex', 'trades', 'wombat_exchange' ] + tags: ["base", "dex", "trades", "wombat_exchange"] description: "wombat exchange base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -743,7 +737,7 @@ models: project: icecreamswap contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'icecreamswap' ] + tags: ["base", "dex", "trades", "icecreamswap"] description: "icecreamswap base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -760,7 +754,7 @@ models: project: alienbase contributors: intensodefi config: - tags: [ 'base', 'dex', 'trades', 'alienbase' ] + tags: ["base", "dex", "trades", "alienbase"] description: "alienbase base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -779,7 +773,7 @@ models: project: swapbased contributors: intensodefi config: - tags: [ 'base', 'dex', 'trades', 'swapbased' ] + tags: ["base", "dex", "trades", "swapbased"] description: "swapbased base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -798,7 +792,7 @@ models: project: gridex contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'gridex' ] + tags: ["base", "dex", "trades", "gridex"] description: "gridex base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -817,7 +811,7 @@ models: project: baseswap contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'baseswap' ] + tags: ["base", "dex", "trades", "baseswap"] description: "baseswap base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -836,7 +830,7 @@ models: project: synthswap contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'synthswap' ] + tags: ["base", "dex", "trades", "synthswap"] description: "synthswap base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -855,7 +849,7 @@ models: project: solidly contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'solidly' ] + tags: ["base", "dex", "trades", "solidly"] description: "solidly base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -874,7 +868,7 @@ models: project: energon contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'energon' ] + tags: ["base", "dex", "trades", "energon"] description: "energon base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -893,7 +887,7 @@ models: project: voltswap contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'voltswap' ] + tags: ["base", "dex", "trades", "voltswap"] description: "voltswap base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -912,7 +906,7 @@ models: project: crescentswap contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'crescentswap' ] + tags: ["base", "dex", "trades", "crescentswap"] description: "crescentswap base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -931,7 +925,7 @@ models: project: baso_finance contributors: sofiat config: - tags: [ 'base', 'dex', 'trades', 'baso_finance' ] + tags: ["base", "dex", "trades", "baso_finance"] description: "baso finance base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -948,7 +942,7 @@ models: project: clipper contributors: amalashkevich config: - tags: [ 'base', 'dex', 'trades', 'clipper' ] + tags: ["base", "dex", "trades", "clipper"] description: "clipper base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -968,7 +962,7 @@ models: project: swaap contributors: borelien config: - tags: [ 'base', 'dex', 'trades', 'swaap', 'v2'] + tags: ["base", "dex", "trades", "swaap", "v2"] description: "swaap v2 base base trades" data_tests: - dbt_utils.unique_combination_of_columns: @@ -987,7 +981,7 @@ models: project: xchange contributors: mike-x7f config: - tags: [ 'base', 'dex', 'trades', 'xchange' ] + tags: ["base", "dex", "trades", "xchange"] description: "xchange base base trades" data_tests: - dbt_utils.unique_combination_of_columns: diff --git a/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql b/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql index 9cbced710cb..27346a29e34 100644 --- a/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql +++ b/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql @@ -9,6 +9,7 @@ ref('uniswap_v3_base_base_trades') , ref('sushiswap_v1_base_base_trades') , ref('sushiswap_v2_base_base_trades') + , ref('stablebase_base_base_trades') , ref('aerodrome_base_base_trades') , ref('pancakeswap_v2_base_base_trades') , ref('pancakeswap_v3_base_base_trades') diff --git a/dbt_subprojects/dex/models/trades/base/platforms/stablebase_base_base_trades.sql b/dbt_subprojects/dex/models/trades/base/platforms/stablebase_base_base_trades.sql new file mode 100644 index 00000000000..f2c2df02aef --- /dev/null +++ b/dbt_subprojects/dex/models/trades/base/platforms/stablebase_base_base_trades.sql @@ -0,0 +1,50 @@ +{{ config( + schema = 'stablebase_base', + alias = 'base_trades', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['block_date', 'blockchain', 'project', 'version', 'tx_hash', 'evt_index'] +) }} + +WITH token_swaps AS ( + SELECT + evt_block_number AS block_number, + CAST(evt_block_time AS timestamp(3) with time zone) AS block_time, + evt_tx_from AS maker, + evt_tx_to AS taker, + tokensSold AS token_sold_amount_raw, + tokensBought AS token_bought_amount_raw, + CAST(soldId AS varbinary) AS token_sold_address, + CAST(boughtId AS varbinary) AS token_bought_address, + contract_address AS project_contract_address, + evt_tx_hash AS tx_hash, + evt_index AS evt_index + FROM + {{ source('stablebase_base', 'SwapFlashLoan_evt_TokenSwap') }} + {% if is_incremental() %} + WHERE + {{ incremental_predicate('evt_block_time') }} + {% endif %} +) + +SELECT + 'base' AS blockchain, + 'stablebase' AS project, + '1' AS version, + CAST(date_trunc('month', token_swaps.block_time) AS date) AS block_month, + CAST(date_trunc('day', token_swaps.block_time) AS date) AS block_date, + token_swaps.block_time, + token_swaps.block_number, + token_swaps.token_sold_amount_raw, + token_swaps.token_bought_amount_raw, + token_swaps.token_sold_address, + token_swaps.token_bought_address, + token_swaps.maker, + token_swaps.taker, + token_swaps.project_contract_address, + token_swaps.tx_hash, + token_swaps.evt_index +FROM + token_swaps diff --git a/dbt_subprojects/dex/seeds/trades/_schema.yml b/dbt_subprojects/dex/seeds/trades/_schema.yml index 3c8a3436252..24f8e049c5e 100644 --- a/dbt_subprojects/dex/seeds/trades/_schema.yml +++ b/dbt_subprojects/dex/seeds/trades/_schema.yml @@ -1079,7 +1079,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: iziswap_scroll_base_trades_seed config: column_types: @@ -2098,7 +2098,7 @@ seeds: token_sold_address: varbinary token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 - block_date: timestamp + block_date: timestamp - name: velodrome_optimism_base_trades_seed config: @@ -2264,7 +2264,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: xchange_base_base_trades_seed config: column_types: @@ -2339,7 +2339,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: hashflow_optimism_base_trades_seed config: column_types: @@ -2369,7 +2369,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: baseswap_base_base_trades_seed config: column_types: @@ -2414,7 +2414,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: smardex_base_base_trades_seed config: column_types: @@ -2432,18 +2432,18 @@ seeds: - name: dackieswap_base_base_trades_seed config: - column_types: - blockchain: varchar - project: varchar - version: varchar - tx_hash: varbinary - evt_index: uint256 - block_number: uint256 - token_bought_address: varbinary - token_sold_address: varbinary - token_bought_amount_raw: uint256 - token_sold_amount_raw: uint256 - block_date: timestamp + column_types: + blockchain: varchar + project: varchar + version: varchar + tx_hash: varbinary + evt_index: uint256 + block_number: uint256 + token_bought_address: varbinary + token_sold_address: varbinary + token_bought_amount_raw: uint256 + token_sold_amount_raw: uint256 + block_date: timestamp - name: ramses_arbitrum_base_trades_seed config: @@ -2459,7 +2459,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: chainhop_optimism_base_trades_seed config: column_types: @@ -2474,7 +2474,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: fraxswap_arbitrum_base_trades_seed config: column_types: @@ -2534,7 +2534,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: apeswap_arbitrum_base_trades_seed config: column_types: @@ -2564,7 +2564,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: smardex_arbitrum_base_trades_seed config: column_types: @@ -2609,7 +2609,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swaap_arbitrum_base_trades_seed config: column_types: @@ -2639,7 +2639,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: woofi_arbitrum_base_trades_seed config: column_types: @@ -2714,7 +2714,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: plantbaseswap_base_base_trades_seed config: column_types: @@ -2744,7 +2744,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: derpdex_base_base_trades_seed config: column_types: @@ -2759,7 +2759,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: torus_base_base_trades_seed config: column_types: @@ -2775,7 +2775,6 @@ seeds: token_sold_amount_raw: uint256 block_date: timestamp - - name: gridex_optimism_base_trades_seed config: column_types: @@ -2955,7 +2954,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: autotronic_base_base_trades_seed config: column_types: @@ -3015,7 +3014,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: sharkyswap_arbitrum_base_trades_seed config: column_types: @@ -3075,7 +3074,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: auragi_arbitrum_base_trades_seed config: column_types: @@ -3135,7 +3134,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: oasisswap_base_base_trades_seed config: column_types: @@ -3150,7 +3149,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: leetswap_v2_base_base_trades_seed config: column_types: @@ -3195,7 +3194,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: openocean_base_base_trades_seed config: column_types: @@ -3240,7 +3239,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: alienbase_base_base_trades_seed config: column_types: @@ -3255,7 +3254,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swapbased_base_base_trades_seed config: column_types: @@ -3270,7 +3269,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: gridex_base_base_trades_seed config: column_types: @@ -3315,7 +3314,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: solidly_base_base_trades_seed config: column_types: @@ -3330,7 +3329,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: energon_base_base_trades_seed config: column_types: @@ -3345,7 +3344,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: voltswap_base_base_trades_seed config: column_types: @@ -3360,7 +3359,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: crescentswap_base_base_trades_seed config: column_types: @@ -3405,7 +3404,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: uniswap_zksync_base_trades_seed config: column_types: @@ -3420,7 +3419,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: uniswap_zora_base_trades_seed config: column_types: @@ -3435,7 +3434,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: syncswap_zksync_base_trades_seed config: column_types: @@ -3480,7 +3479,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: mute_zksync_base_trades_seed config: column_types: @@ -3540,7 +3539,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: zkswap_finance_zksync_base_trades_seed config: column_types: @@ -3555,7 +3554,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: gemswap_zksync_base_trades_seed config: column_types: @@ -3570,7 +3569,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: vesync_zksync_base_trades_seed config: column_types: @@ -3585,7 +3584,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: dracula_finance_zksync_base_trades_seed config: column_types: @@ -3735,7 +3734,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: smardex_polygon_base_trades_seed config: column_types: @@ -3765,7 +3764,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: horizondex_linea_base_trades_seed config: column_types: @@ -3780,7 +3779,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: dackieswap_v3_arbitrum_base_trades_seed config: column_types: @@ -3795,7 +3794,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: dackieswap_v2_arbitrum_base_trades_seed config: column_types: @@ -3810,7 +3809,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: thruster_blast_base_trades_seed config: column_types: @@ -4050,7 +4049,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swaap_linea_base_trades_seed config: column_types: @@ -4065,7 +4064,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swaap_mantle_base_trades_seed config: column_types: @@ -4080,7 +4079,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swaap_scroll_base_trades_seed config: column_types: @@ -4109,8 +4108,8 @@ seeds: token_sold_address: varbinary token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 - block_date: timestamp - + block_date: timestamp + - name: dackieswap_v2_blast_base_trades_seed config: column_types: @@ -4139,8 +4138,8 @@ seeds: token_sold_address: varbinary token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 - block_date: timestamp - + block_date: timestamp + - name: spacefi_scroll_base_trades_seed config: column_types: @@ -4155,7 +4154,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: uniswap_mantle_base_trades_seed config: column_types: @@ -4200,7 +4199,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: tropicalswap_mantle_base_trades_seed config: column_types: @@ -4229,8 +4228,8 @@ seeds: token_sold_address: varbinary token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 - block_date: timestamp - + block_date: timestamp + - name: sushiswap_blast_base_trades_seed config: column_types: @@ -4245,7 +4244,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: dackieswap_v3_blast_base_trades_seed config: column_types: @@ -4275,7 +4274,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swapblast_blast_base_trades_seed config: column_types: @@ -4305,7 +4304,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: yoshiexchange_fantom_base_trades_seed config: column_types: @@ -4350,7 +4349,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: icecreamswap_v2_blast_base_trades_seed config: column_types: @@ -4380,7 +4379,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: dragon_swap_kaia_base_trades_seed config: column_types: @@ -4395,7 +4394,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: klay_swap_kaia_base_trades_seed config: column_types: @@ -4410,7 +4409,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: neopin_kaia_base_trades_seed config: column_types: @@ -4425,7 +4424,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: defi_kingdoms_kaia_base_trades_seed config: column_types: @@ -4455,7 +4454,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: flashliquidity_base_base_trades_seed config: column_types: @@ -4470,6 +4469,21 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp + + - name: stablebase_base_base_trades_seed + config: + column_types: + blockchain: varchar + project: varchar + version: varchar + tx_hash: varbinary + evt_index: uint256 + block_number: uint256 + token_bought_address: varbinary + token_sold_address: varbinary + token_bought_amount_raw: uint256 + token_sold_amount_raw: uint256 + block_date: timestamp - name: akronswap_base_base_trades_seed config: @@ -4484,4 +4498,4 @@ seeds: token_sold_address: varbinary token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 - block_date: timestamp \ No newline at end of file + block_date: timestamp diff --git a/dbt_subprojects/dex/seeds/trades/stablebase_base_base_trades_seed.csv b/dbt_subprojects/dex/seeds/trades/stablebase_base_base_trades_seed.csv new file mode 100644 index 00000000000..998c8e33f1b --- /dev/null +++ b/dbt_subprojects/dex/seeds/trades/stablebase_base_base_trades_seed.csv @@ -0,0 +1,2 @@ +blockchain,project,version,block_month,block_date,block_time,block_number,token_sold_amount_raw,token_bought_amount_raw,token_sold_address,token_bought_address,maker,taker,project_contract_address,tx_hash,evt_index +base,stablebase,1,2023-08-01,2023-08-28,2023-08-28 19:18:00.000,3230470,129976172599579374396,135180385,0x0000000000000000000000000000000000000000000000000000000000000001,0x0000000000000000000000000000000000000000000000000000000000000000,0x19fbc29d72476365a62151ffdbf4764e54774a81,0x8c59cc9b958635710957e751a9b4e77cd771baf2,0x8c59cc9b958635710957e751a9b4e77cd771baf2,0xc2dec669877f4edfcb7debd2eb23288a0fba8cd57d6f3fb3e45e8b15a6458d43,31 diff --git a/sources/_sector/dex/trades/base/_sources.yml b/sources/_sector/dex/trades/base/_sources.yml index 3411997a305..b7f7ad8a6ba 100644 --- a/sources/_sector/dex/trades/base/_sources.yml +++ b/sources/_sector/dex/trades/base/_sources.yml @@ -172,6 +172,9 @@ sources: tables: - name: PairFactory_evt_PairCreated - name: Pair_evt_Swap + - name: stablebase_base + tables: + - name: SwapFlashLoan_evt_TokenSwap - name: basex_base tables: - name: UniswapV3Pool_evt_Swap