Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prices.usd #6270

Merged
merged 4 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions models/prices/optimism/prices_optimism_tokens.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,28 @@

)
}}

WITH prices_op AS (
SELECT
token_id
, blockchain
, symbol
, contract_address
, decimals
FROM {{ ref('prices_optimism_tokens_curated') }}
UNION ALL
SELECT
token_id
, blockchain
, symbol
, contract_address
, decimals
FROM {{ ref('prices_optimism_tokens_bridged') }}
WHERE contract_address not in (select contract_address from {{ ref('prices_optimism_tokens_curated') }})
)
SELECT
token_id
, blockchain
, symbol
, contract_address
, decimals
FROM {{ ref('prices_optimism_tokens_curated') }}
UNION ALL
SELECT
token_id
, blockchain
, symbol
, contract_address
, decimals
FROM {{ ref('prices_optimism_tokens_bridged') }}
WHERE contract_address not in (select contract_address from {{ ref('prices_optimism_tokens_curated') }})
*
FROM
prices_op
WHERE
contract_address != 0x0000000000000000000000000000000000000000 -- safeguard as native tokens currently have null address
2 changes: 0 additions & 2 deletions models/prices/prices_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ models:
- &contract_address
name: contract_address
description: "Contract address of the token, if any"
tests:
- not_zero_address
- &symbol
name: symbol
description: "Token symbol"
Expand Down
1 change: 0 additions & 1 deletion models/prices/prices_tokens.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ FROM
, contract_address
, decimals
FROM {{ model }}
WHERE contract_address != 0x0000000000000000000000000000000000000000 -- safeguard as native tokens currently have null address
{% if not loop.last %}
UNION ALL
{% endif %}
Expand Down
6 changes: 0 additions & 6 deletions tests/generic/not_zero_address.sql

This file was deleted.

Loading