Merge pull request #61 from FlipsideCrypto/AN-6387-verified-prices

AN-6387 add verified token flag
This commit is contained in:
eric-laurello 2025-07-02 14:44:36 -04:00 committed by GitHub
commit f7104aaf85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 45 additions and 18 deletions

View File

@ -23,18 +23,15 @@ FROM
) }}
WHERE
(
(
platform ILIKE 'aptos'
AND token_address LIKE '%:%'
)
OR (
platform = 'ethereum'
AND token_address IN (
'0xdac17f958d2ee523a2206206994597c13d831ec7',
'0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
'0xd31a59c85ae9d8edefec411d448f90841571b89c',
'0x4e15361fd6b4bb609fa63c81a2be19d873717870',
'0x7c9f4c87d911613fe9ca58b579f737911aad2d43'
)
platform ILIKE 'aptos' {# AND token_address LIKE '%:%' #}
)
OR (
platform = 'ethereum'
AND token_address IN (
'0xdac17f958d2ee523a2206206994597c13d831ec7',
'0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
'0xd31a59c85ae9d8edefec411d448f90841571b89c',
'0x4e15361fd6b4bb609fa63c81a2be19d873717870',
'0x7c9f4c87d911613fe9ca58b579f737911aad2d43'
)
)

View File

@ -25,5 +25,4 @@ FROM
'complete_token_asset_metadata'
) }}
WHERE
blockchain ILIKE 'aptos'
AND token_address LIKE '%:%'
blockchain ILIKE 'aptos' {# AND token_address LIKE '%:%' #}

View File

@ -21,7 +21,8 @@ SELECT
inserted_timestamp,
modified_timestamp,
complete_token_prices_id,
_invocation_id
_invocation_id,
is_verified
FROM
{{ source(
'crosschain_silver',

View File

@ -134,4 +134,10 @@ Lowest price of the recorded hour in USD
Closing price of the recorded hour in USD
{% enddocs %}
{% docs prices_is_verified %}
A flag indicating if the asset has been verified by the Flipside team.
{% enddocs %}

View File

@ -37,6 +37,10 @@ SELECT
) IS NOT NULL THEN amount_unadj / pow(10, COALESCE(t.decimals, p.decimals))
END AS amount,
amount * p.price AS amount_in_usd,
COALESCE(
is_verified,
FALSE
) AS token_is_verified,
event_index,
fact_bridge_activity_id AS ez_bridge_activity_id,
A.inserted_timestamp,

View File

@ -60,6 +60,8 @@ models:
name: test_defi__destination_chain_name_not_null
- name: TOKEN_ADDRESS
description: '{{ doc("bridge_token_address") }}'
- name: TOKEN_IS_VERIFIED
description: '{{ doc("prices_is_verified") }}'
- name: SYMBOL
description: '{{ doc("symbol") }}'
- name: AMOUNT_UNADJ

View File

@ -19,11 +19,19 @@ SELECT
event_address,
swapper,
token_in,
COALESCE(
p_in.is_verified,
FALSE
) AS token_in_is_verified,
COALESCE(
t_in.symbol,
p_in.symbol
) AS symbol_in,
token_out,
COALESCE(
p_out.is_verified,
FALSE
) AS token_out_is_verified,
COALESCE(
t_out.symbol,
p_out.symbol

View File

@ -69,6 +69,10 @@ models:
description: '{{ doc("swap_platform") }}'
tests:
- not_null
- name: TOKEN_IN_IS_VERIFIED
description: '{{ doc("prices_is_verified") }}'
- name: TOKEN_OUT_IS_VERIFIED
description: '{{ doc("prices_is_verified") }}'
- name: EZ_DEX_SWAPS_ID
description: '{{ doc("pk") }}'
- name: INSERTED_TIMESTAMP

View File

@ -12,6 +12,10 @@ SELECT
FALSE AS is_native,
is_deprecated,
is_imputed,
COALESCE(
is_verified,
FALSE
) AS is_verified,
inserted_timestamp,
modified_timestamp,
hourly_prices_priority_id AS ez_prices_hourly_id

View File

@ -22,6 +22,8 @@ models:
description: '{{ doc("prices_is_imputed") }}'
- name: IS_DEPRECATED
description: '{{ doc("prices_is_deprecated") }}'
- name: IS_VERIFIED
description: '{{ doc("prices_is_verified") }}'
- name: EZ_PRICES_HOURLY_ID
description: '{{ doc("pk") }}'
- name: INSERTED_TIMESTAMP

View File

@ -28,6 +28,7 @@ SELECT
C.name,
m.name
) AS NAME,
p.is_verified,
complete_token_prices_id AS hourly_prices_priority_id,
SYSDATE() AS inserted_timestamp,
SYSDATE() AS modified_timestamp,
@ -57,8 +58,7 @@ FROM
WHERE
(
(
p.blockchain = 'aptos'
AND p.token_address LIKE '%:%'
p.blockchain = 'aptos' {# AND p.token_address LIKE '%:%' #}
)
OR (
p.blockchain = 'ethereum'