From 7a609e8835c9def99f06ad603de54da1d20478a1 Mon Sep 17 00:00:00 2001 From: grkhr Date: Wed, 19 Jun 2024 15:48:16 +0200 Subject: [PATCH] try sourcing --- .../_project/oneinch/oneinch_project_calls_macro.sql | 4 ++-- .../_project/oneinch/oneinch_project_orders_macro.sql | 4 ++-- .../_project/oneinch/oneinch_project_swaps_macro.sql | 6 +++--- sources/oneinch/arbitrum/oneinch_arbitrum_sources.yml | 10 +++++++++- .../avalanche_c/oneinch_avalanche_c_sources.yml | 9 ++++++++- sources/oneinch/base/oneinch_base_sources.yml | 9 ++++++++- sources/oneinch/bnb/oneinch_bnb_sources.yml | 9 ++++++++- sources/oneinch/ethereum/oneinch_ethereum_sources.yml | 7 +++++++ sources/oneinch/fantom/oneinch_fantom_sources.yml | 9 ++++++++- sources/oneinch/gnosis/oneinch_gnosis_sources.yml | 9 ++++++++- sources/oneinch/optimism/oneinch_optimism_sources.yml | 9 ++++++++- sources/oneinch/polygon/oneinch_polygon_sources.yml | 9 ++++++++- sources/oneinch/zksync/oneinch_zksync_sources.yml | 9 ++++++++- 13 files changed, 87 insertions(+), 16 deletions(-) diff --git a/macros/models/_project/oneinch/oneinch_project_calls_macro.sql b/macros/models/_project/oneinch/oneinch_project_calls_macro.sql index 547b3590927..877609bf3eb 100644 --- a/macros/models/_project/oneinch/oneinch_project_calls_macro.sql +++ b/macros/models/_project/oneinch/oneinch_project_calls_macro.sql @@ -1,7 +1,7 @@ {% macro oneinch_project_calls_macro( blockchain - , date_from = '2024-06-01' + , date_from = '2024-06-18' ) %} @@ -31,7 +31,7 @@ static as ( , any_value(project) as project , any_value(tag) as tag , any_value(flags) as flags - from {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} + from {{ source('oneinch_' + blockchain, 'mapped_contracts') }} where project not in ('MEVBot', 'Unknown') group by 1, 2 diff --git a/macros/models/_project/oneinch/oneinch_project_orders_macro.sql b/macros/models/_project/oneinch/oneinch_project_orders_macro.sql index b33ab4ce29b..e194e9bab89 100644 --- a/macros/models/_project/oneinch/oneinch_project_orders_macro.sql +++ b/macros/models/_project/oneinch/oneinch_project_orders_macro.sql @@ -1,6 +1,6 @@ {% macro oneinch_project_orders_macro( blockchain - , date_from = '2024-06-01' + , date_from = '2024-06-18' )%} -- EVENTS CONFIG @@ -787,7 +787,7 @@ logs as ( from {{ source(blockchain, 'traces') }} join ( select *, address as "to" - from {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} + from {{ source('oneinch_' + blockchain, 'mapped_contracts') }} where blockchain = '{{ blockchain }}' and '{{ project }}' in (project, tag) diff --git a/macros/models/_project/oneinch/oneinch_project_swaps_macro.sql b/macros/models/_project/oneinch/oneinch_project_swaps_macro.sql index 70eba97ba65..4cacaa1b71e 100644 --- a/macros/models/_project/oneinch/oneinch_project_swaps_macro.sql +++ b/macros/models/_project/oneinch/oneinch_project_swaps_macro.sql @@ -1,7 +1,7 @@ {% macro oneinch_project_swaps_macro( blockchain - , date_from = '2024-06-01' + , date_from = '2024-06-18' ) %} @@ -32,7 +32,7 @@ meta as ( , taker_asset , taking_amount , flags as order_flags - from {{ ref('oneinch_' + blockchain + '_project_orders') }} + from {{ source('oneinch_' + blockchain, 'project_orders') }} where {% if is_incremental() %} {{ incremental_predicate('block_time') }} @@ -57,7 +57,7 @@ meta as ( , flags as order_flags from ( select *, row_number() over(partition by block_number, tx_hash order by call_trace_address) as counter - from {{ ref('oneinch_' + blockchain + '_lop') }} + from {{ source('oneinch_' + blockchain, 'lop') }} where {% if is_incremental() %} {{ incremental_predicate('block_time') }} diff --git a/sources/oneinch/arbitrum/oneinch_arbitrum_sources.yml b/sources/oneinch/arbitrum/oneinch_arbitrum_sources.yml index cb73a21c2d2..d53bbb4b68f 100644 --- a/sources/oneinch/arbitrum/oneinch_arbitrum_sources.yml +++ b/sources/oneinch/arbitrum/oneinch_arbitrum_sources.yml @@ -128,4 +128,12 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time + \ No newline at end of file diff --git a/sources/oneinch/avalanche_c/oneinch_avalanche_c_sources.yml b/sources/oneinch/avalanche_c/oneinch_avalanche_c_sources.yml index cbe8467fa55..e3d5621b116 100644 --- a/sources/oneinch/avalanche_c/oneinch_avalanche_c_sources.yml +++ b/sources/oneinch/avalanche_c/oneinch_avalanche_c_sources.yml @@ -114,4 +114,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file diff --git a/sources/oneinch/base/oneinch_base_sources.yml b/sources/oneinch/base/oneinch_base_sources.yml index 1cf352284c7..7328957185e 100644 --- a/sources/oneinch/base/oneinch_base_sources.yml +++ b/sources/oneinch/base/oneinch_base_sources.yml @@ -78,4 +78,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file diff --git a/sources/oneinch/bnb/oneinch_bnb_sources.yml b/sources/oneinch/bnb/oneinch_bnb_sources.yml index 91134061637..33143d0db0b 100644 --- a/sources/oneinch/bnb/oneinch_bnb_sources.yml +++ b/sources/oneinch/bnb/oneinch_bnb_sources.yml @@ -136,4 +136,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file diff --git a/sources/oneinch/ethereum/oneinch_ethereum_sources.yml b/sources/oneinch/ethereum/oneinch_ethereum_sources.yml index 638141d8f5b..04b92f205bb 100644 --- a/sources/oneinch/ethereum/oneinch_ethereum_sources.yml +++ b/sources/oneinch/ethereum/oneinch_ethereum_sources.yml @@ -167,6 +167,13 @@ sources: loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time - name: onesplit_ethereum diff --git a/sources/oneinch/fantom/oneinch_fantom_sources.yml b/sources/oneinch/fantom/oneinch_fantom_sources.yml index 1a613dec536..5da5fc97d78 100644 --- a/sources/oneinch/fantom/oneinch_fantom_sources.yml +++ b/sources/oneinch/fantom/oneinch_fantom_sources.yml @@ -114,4 +114,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file diff --git a/sources/oneinch/gnosis/oneinch_gnosis_sources.yml b/sources/oneinch/gnosis/oneinch_gnosis_sources.yml index b1ac3a53334..40ce97f950d 100644 --- a/sources/oneinch/gnosis/oneinch_gnosis_sources.yml +++ b/sources/oneinch/gnosis/oneinch_gnosis_sources.yml @@ -114,4 +114,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file diff --git a/sources/oneinch/optimism/oneinch_optimism_sources.yml b/sources/oneinch/optimism/oneinch_optimism_sources.yml index f321ceef85d..d865be5dfb2 100644 --- a/sources/oneinch/optimism/oneinch_optimism_sources.yml +++ b/sources/oneinch/optimism/oneinch_optimism_sources.yml @@ -128,4 +128,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file diff --git a/sources/oneinch/polygon/oneinch_polygon_sources.yml b/sources/oneinch/polygon/oneinch_polygon_sources.yml index 98b2a6037ec..81aebca179c 100644 --- a/sources/oneinch/polygon/oneinch_polygon_sources.yml +++ b/sources/oneinch/polygon/oneinch_polygon_sources.yml @@ -130,4 +130,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file diff --git a/sources/oneinch/zksync/oneinch_zksync_sources.yml b/sources/oneinch/zksync/oneinch_zksync_sources.yml index 2070148afef..0a20e5d2871 100644 --- a/sources/oneinch/zksync/oneinch_zksync_sources.yml +++ b/sources/oneinch/zksync/oneinch_zksync_sources.yml @@ -78,4 +78,11 @@ sources: - name: AggregationRouterV6_call_fillContractOrder loaded_at_field: call_block_time - name: AggregationRouterV6_call_fillContractOrderArgs - loaded_at_field: call_block_time \ No newline at end of file + loaded_at_field: call_block_time + - name: mapped_contracts + - name: project_orders + loaded_at_field: block_time + - name: project_calls + loaded_at_field: block_time + - name: lop + loaded_at_field: block_time \ No newline at end of file