mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 15:31:49 +00:00
labels seed
This commit is contained in:
parent
b17372ba3d
commit
2eefd48018
12
data/seeds__token_labels.csv
Normal file
12
data/seeds__token_labels.csv
Normal file
@ -0,0 +1,12 @@
|
||||
token,symbol,token_contract
|
||||
NEAR,NEAR,wrap.near
|
||||
Wrapped Ether,wETH,c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.factory.bridge.near
|
||||
Wrapped Bitcoin,wBTC,2260fac5e5542a773aa44fbcfedf7c193bc2c599.factory.bridge.near
|
||||
Tether USD,USDT,dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near
|
||||
USN,USN,usn
|
||||
Bridged Aurora,AURORA,aaaaaa20d9e0e2461697782ef11675f668207961.factory.bridge.near
|
||||
USD Coin,USDC,a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near
|
||||
Meta Pool Liquid Staking Token,stNEAR,meta-pool.near
|
||||
Dai Stablecoin,DAI,6b175474e89094c44da98b954eedeac495271d0f.factory.bridge.near
|
||||
Aurora,AURORA,aurora
|
||||
LiNEAR,LiNEAR,linear-protocol.near
|
||||
|
@ -14,6 +14,12 @@ WITH txs AS (
|
||||
WHERE
|
||||
{{ incremental_load_filter('_inserted_timestamp') }}
|
||||
),
|
||||
token_labels AS (
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('seeds__token_labels') }}
|
||||
),
|
||||
oracle_msgs AS (
|
||||
SELECT
|
||||
block_id,
|
||||
@ -45,7 +51,7 @@ prices AS (
|
||||
tx_receiver,
|
||||
actions_len,
|
||||
INDEX,
|
||||
VALUE :asset_id :: STRING AS asset_id,
|
||||
VALUE :asset_id :: STRING AS token_contract,
|
||||
CASE
|
||||
WHEN asset_id = 'aurora' THEN VALUE :price :multiplier :: DOUBLE / pow (
|
||||
10,
|
||||
@ -62,8 +68,25 @@ prices AS (
|
||||
LATERAL FLATTEN(
|
||||
input => response :prices
|
||||
)
|
||||
),
|
||||
add_labels AS (
|
||||
SELECT
|
||||
p.block_id,
|
||||
p.tx_hash,
|
||||
p.block_timestamp,
|
||||
p.actions_len,
|
||||
p.index,
|
||||
l.token,
|
||||
l.symbol,
|
||||
p.token_contract,
|
||||
p.price_usd,
|
||||
p.tx_receiver AS source,
|
||||
p._inserted_timestamp
|
||||
FROM
|
||||
prices p
|
||||
LEFT JOIN token_labels l USING (token_contract)
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
prices
|
||||
add_labels
|
||||
|
||||
Loading…
Reference in New Issue
Block a user