diff --git a/dbt_subprojects/dex/models/_projects/zeroex/mode/zeroex_mode_schema.yml b/dbt_subprojects/dex/models/_projects/zeroex/mode/zeroex_mode_schema.yml deleted file mode 100644 index 080d07968bf..00000000000 --- a/dbt_subprojects/dex/models/_projects/zeroex/mode/zeroex_mode_schema.yml +++ /dev/null @@ -1,111 +0,0 @@ -version: 2 - -models: - - name: zeroex_v2_mode_trades - meta: - blockchain: mode - project: zeroex - contributors: rantum - config: - tags: ['mode','0x','dex_aggregator','dex','aggregator'] - description: > - 0x API erc20 trades through 0x v2 contracts. No fills, only deduped transactions. - data_tests: - - dbt_utils.unique_combination_of_columns: - combination_of_columns: - - block_month - - block_date - - tx_hash - - evt_index - - check_seed: - seed_file: ref('zeroex_v2_mode_trades_sample') - match_columns: - - tx_hash - check_columns: - - taker - - maker_token - - taker_token - columns: - - &blockchain - name: blockchain - description: "Blockchain which the aggregator project is deployed" - - &block_date - name: block_date - description: "UTC event block date of each trade" - - &block_month - name: block_month - description: "UTC event block month of each trade" - - &block_time - name: block_time - description: "UTC event block time of each trade" - - &taker_symbol - name: taker_symbol - description: "Symbol of the token taker sells" - - &maker_symbol - name: maker_symbol - description: "Symbol of the token taker buys" - - &token_pair - name: token_pair - description: "Token pair traded" - - &taker_token_amount - name: taker_token_amount - description: "The after-decimal amount of the token taker sells" - - &taker_token_amount_raw - name: taker_token_amount_raw - description: "The raw amount of the token taker sells" - - &maker_token_amount - name: maker_token_amount - description: "The after-decimal amount of the token taker buys" - - &maker_token_amount_raw - name: maker_token_amount_raw - description: "The raw amount of the token taker buys" - - &volume_usd - name: volume_usd - description: "Trading volume measured in USD value" - - &taker_token - name: taker_token - description: "Contract address of the token taker sells" - - &maker_token - name: maker_token - description: "Contract address of the token taker buys" - - &maker - name: maker - description: "buyer of the trade" - - &taker - name: taker - description: "seller of the trade" - - &affiliate_address - name: affiliate_address - description: "The recipient address of the affiliate, or the applications that is using 0x API, for receiving affiliate fee" - - &tx_hash - name: tx_hash - description: "Transaction hash of the fill" - - &tx_from - name: tx_from - description: "Address which initiated the trade" - - &tx_to - name: tx_to - description: "Address which received the trade" - - &evt_index - name: evt_index - description: "Index of the corresponding order filled event" - - &type - name: type - description: "The liquidity route the order went thru" - - &swap_flag - name: swap_flag - description: "If the swap was filled/consumed thru 0x API" - - &contract_address - name: contract_address - desctiption: "The address of the contract which fired the fill/swap event" - - &fills_within - name: fills_within - description: "fills in then multihop, if present" - - - - - - - - \ No newline at end of file diff --git a/dbt_subprojects/dex/models/_projects/zeroex/mode/zeroex_v2_mode_trades.sql b/dbt_subprojects/dex/models/_projects/zeroex/mode/zeroex_v2_mode_trades.sql deleted file mode 100644 index 03a74e6e745..00000000000 --- a/dbt_subprojects/dex/models/_projects/zeroex/mode/zeroex_v2_mode_trades.sql +++ /dev/null @@ -1,61 +0,0 @@ -{{ config( - schema = 'zeroex_v2_mode', - alias = 'trades', - materialized='incremental', - partition_by = ['block_month'], - unique_key = ['block_month', 'block_date', 'tx_hash', 'evt_index'], - on_schema_change='sync_all_columns', - file_format ='delta', - incremental_strategy='merge', - incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')] -)}} - -{% set zeroex_settler_start_date = '2024-07-15' %} -{% set blockchain = 'mode' %} - -WITH zeroex_tx AS ( - {{ - zeroex_settler_txs_cte( - blockchain = blockchain, - start_date = zeroex_settler_start_date - ) - }} -), -zeroex_v2_trades_direct AS ( - {{ - zeroex_v2_trades_direct( - blockchain = blockchain, - start_date = zeroex_settler_start_date - - ) - }} -), -zeroex_v2_trades_indirect AS ( - {{ - zeroex_v2_trades_indirect( - blockchain = blockchain, - start_date = zeroex_settler_start_date - - ) - }} -), -tbl_trades AS ( - SELECT * - FROM zeroex_v2_trades_direct - UNION ALL - SELECT * - FROM zeroex_v2_trades_indirect -), -trade_details as ( - {{ - zeroex_v2_trades_detail( - blockchain = blockchain, - start_date = zeroex_settler_start_date - - ) - }} - -) -select - * - from trade_details diff --git a/dbt_subprojects/dex/models/_projects/zeroex/zeroex_api_fills_deduped.sql b/dbt_subprojects/dex/models/_projects/zeroex/zeroex_api_fills_deduped.sql index 6d4eeabfcf8..51563852cb7 100644 --- a/dbt_subprojects/dex/models/_projects/zeroex/zeroex_api_fills_deduped.sql +++ b/dbt_subprojects/dex/models/_projects/zeroex/zeroex_api_fills_deduped.sql @@ -1,7 +1,7 @@ {{ config( schema = 'zeroex' , alias = 'api_fills_deduped' - , post_hook='{{ expose_spells(\'["arbitrum", "avalanche_c", "base", "bnb", "celo", "ethereum", "fantom", "optimism", "polygon","scroll", "linea","blast","mantle","mode"]\', + , post_hook='{{ expose_spells(\'["arbitrum", "avalanche_c", "base", "bnb", "celo", "ethereum", "fantom", "optimism", "polygon","scroll", "linea","blast","mantle"]\', "project", "zeroex", \'["rantum","bakabhai993"]\') }}' diff --git a/dbt_subprojects/dex/models/_projects/zeroex/zeroex_schema.yml b/dbt_subprojects/dex/models/_projects/zeroex/zeroex_schema.yml index 7cab763d18a..c18ff3eb4d2 100644 --- a/dbt_subprojects/dex/models/_projects/zeroex/zeroex_schema.yml +++ b/dbt_subprojects/dex/models/_projects/zeroex/zeroex_schema.yml @@ -105,7 +105,7 @@ models: - name: zeroex_api_fills_deduped meta: - blockchain: ethereum, optimism, polygon, arbitrum, fantom, avalanche, bnb, base, scroll, linea, blast, mantle, mode + blockchain: ethereum, optimism, polygon, arbitrum, fantom, avalanche, bnb, base, scroll, linea, blast, mantle sector: dex project: zeroex contributors: rantum, bakabhai993 diff --git a/dbt_subprojects/dex/seeds/_project/zeroex/mode/_schema.yml b/dbt_subprojects/dex/seeds/_project/zeroex/mode/_schema.yml deleted file mode 100644 index 0f47baa5698..00000000000 --- a/dbt_subprojects/dex/seeds/_project/zeroex/mode/_schema.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 - -seeds: - - name: zeroex_v2_mode_trades_sample - config: - column_types: - tx_hash: varbinary - taker: varbinary - taker_token: varbinary - maker_token: varbinary - taker_token_amount: double \ No newline at end of file diff --git a/dbt_subprojects/dex/seeds/_project/zeroex/mode/zeroex_v2_mode_trades_sample.csv b/dbt_subprojects/dex/seeds/_project/zeroex/mode/zeroex_v2_mode_trades_sample.csv deleted file mode 100644 index 0f4fc0c98d2..00000000000 --- a/dbt_subprojects/dex/seeds/_project/zeroex/mode/zeroex_v2_mode_trades_sample.csv +++ /dev/null @@ -1,4 +0,0 @@ -tx_hash,taker,taker_token,maker_token,taker_token_amount -0xd7ace13835ceb119b071c508e8ee262fcecb5a0f2a1bfdd1b9b1f04afa73d94d,0x44c20316a06371ca5acb975974c18abfa7a14a5a,0xf0f161fda2712db8b566946122a5af183995e2ed,0x4200000000000000000000000000000000000006, -0xd10163ac93593667d3922a05c09580856b1b4c1dc015738c67968912a42c46dc,0x8a6bfcae15e729fd1440574108437dea281a9b3e,0x6a660e56fa3b630a786cc4ae98859f8532d03de9,0x2416092f143378750bb29b79ed961ab195cceea5,238973 -0xd84a08f6d48b5c34cde908452602088cdb42beceef29074b8a8d5c7e45f2a3dc,0x8a6bfcae15e729fd1440574108437dea281a9b3e,0x4200000000000000000000000000000000000006,0x6a660e56fa3b630a786cc4ae98859f8532d03de9,