forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7658a62
commit 3928229
Showing
2 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
dbt_subprojects/dex/models/_projects/paraswap/all-entities-details.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- NB: this is a generated query, do not edit it directly, instead edit the template and re-generate the query | ||
-- hydrate the generated ouput here: https://dune.com/queries/4407620 | ||
{% set blockchain_var = "{{blockchain}}" %} | ||
{% set contract_address_var = "{{contract_address}}" %} | ||
{{ paraswap_all_entities() }} | ||
select | ||
entity, blockchain, contract_address, block_time, tx_hash | ||
from entities | ||
where blockchain = '{{blockchain_var}}' and contract_address = {{contract_address_var}} | ||
order by block_time, tx_hash |
106 changes: 106 additions & 0 deletions
106
dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-details.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
-- NB: this is a generated query, do not edit it directly, instead edit the template and re-generate the query | ||
-- hydrate the generated ouput here: https://dune.com/queries/4407620 | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
with entities as ( | ||
|
||
select 'delta-v1-single' as entity, 'ethereum' as blockchain, contract_address as contract_address, call_block_time as block_time, call_tx_hash as tx_hash from paraswapdelta_ethereum.ParaswapDeltav1_call_settleSwap | ||
where | ||
(call_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
union all | ||
|
||
select 'delta-v1-batch' as entity, 'ethereum' as blockchain, contract_address as contract_address, call_block_time as block_time, call_tx_hash as tx_hash from paraswapdelta_ethereum.ParaswapDeltav1_call_safeSettleBatchSwap | ||
where | ||
(call_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
union all | ||
|
||
select 'delta-v2' as entity, 'ethereum' as blockchain, contract_address as contract_address, evt_block_time as block_time, evt_tx_hash as tx_hash from paraswapdelta_ethereum.ParaswapDeltav2_evt_OrderSettled | ||
where | ||
(evt_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
union all | ||
|
||
select 'delta-v2' as entity, 'base' as blockchain, contract_address as contract_address, evt_block_time as block_time, evt_tx_hash as tx_hash from paraswapdelta_base.ParaswapDeltav2_evt_OrderSettled | ||
where | ||
(evt_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'ethereum' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='ethereum' | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'polygon' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='polygon' | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'bnb' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='bnb' | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'arbitrum' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='arbitrum' | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'avalanche_c' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='avalanche_c' | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'fantom' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='fantom' | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'optimism' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='optimism' | ||
|
||
union all | ||
|
||
select 'augustus' as entity, 'base' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash from dex_aggregator.trades | ||
where | ||
(block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') | ||
|
||
AND project='paraswap' and blockchain='base' | ||
|
||
|
||
|
||
) | ||
|
||
select | ||
entity, blockchain, contract_address, block_time, tx_hash | ||
from entities | ||
where blockchain = '{{blockchain}}' and contract_address = {{contract_address}} | ||
order by block_time, tx_hash |