Skip to content

Commit

Permalink
add all-entities-details
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshchur committed Dec 11, 2024
1 parent 7658a62 commit 3928229
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
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
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

0 comments on commit 3928229

Please sign in to comment.