Skip to content

Commit

Permalink
DUX-422: evms info downstream ref to sources (duneanalytics#6464)
Browse files Browse the repository at this point in the history
* add evms schema / tables to sources, cleanup old

* switch to sources
  • Loading branch information
jeff-dude authored Jul 31, 2024
1 parent ac83212 commit e992a38
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion macros/models/_sector/fungible/fungible_transfers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ INNER JOIN {{ transactions }} et ON et.block_number=t.block_number
AND et.hash=t.tx_hash
LEFT JOIN {{ source('prices','usd_forward_fill') }} pu ON pu.blockchain = '{{blockchain}}'
AND (pu.contract_address=t.contract_address
OR t.contract_address IS NULL AND pu.contract_address=(SELECT wrapped_native_token_address FROM {{ ref('evms_info') }} WHERE blockchain='{{blockchain}}')
OR t.contract_address IS NULL AND pu.contract_address=(SELECT wrapped_native_token_address FROM {{ source('evms','info') }} WHERE blockchain='{{blockchain}}')
)
AND pu.minute = date_trunc('minute', t.block_time)

Expand Down
2 changes: 1 addition & 1 deletion macros/models/_sector/social/enrich_social_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SELECT
, t.evt_index
, t.contract_address
FROM {{ base_trades }} t
INNER JOIN {{ref('evms_info')}} info
INNER JOIN {{ source('evms','info') }} info
ON info.blockchain = t.blockchain
LEFT JOIN {{source('tokens', 'erc20')}} tok
ON tok.blockchain = t.blockchain
Expand Down
10 changes: 9 additions & 1 deletion sources/_subprojects_outputs/daily_spellbook/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ sources:
- name: labels
tables:
- name: jelly_swap_pools_sei
- name: addresses
- name: addresses

- name: evms
description: "Cross-chain EVM raw data"
tables:
- name: info
description: "Blockchain metadata for all EVM compatible chains"
- name: evm_smart_account_method_ids
- name: base_evm_smart_account_method_ids
10 changes: 0 additions & 10 deletions sources/_subprojects_outputs/evms/_sources.yml

This file was deleted.

0 comments on commit e992a38

Please sign in to comment.