-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: prices_sonic_tokens | ||
meta: | ||
blockchain: sonic | ||
sector: tokens | ||
contributors: hosuke | ||
config: | ||
tags: ['tokens', 'sonic', 'prices'] | ||
description: "Token prices and metadata on Sonic" | ||
columns: | ||
- name: token_id | ||
description: "Unique identifier for the token" | ||
- name: blockchain | ||
description: "Blockchain where the token is deployed" | ||
- name: symbol | ||
description: "Token symbol" | ||
- name: contract_address | ||
description: "Contract address of the token" | ||
- name: decimals | ||
description: "Number of decimal places for the token" |
24 changes: 24 additions & 0 deletions
24
dbt_subprojects/tokens/models/prices/sonic/prices_sonic_tokens.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'sonic' %} | ||
|
||
{{ config( | ||
schema = 'prices_' + blockchain, | ||
alias = 'tokens', | ||
materialized = 'table', | ||
file_format = 'delta', | ||
tags = ['static'] | ||
) | ||
}} | ||
|
||
SELECT | ||
token_id | ||
, '{{ blockchain }}' as blockchain | ||
, symbol | ||
, contract_address | ||
, decimals | ||
FROM | ||
( | ||
VALUES | ||
('weth-weth', 'WETH', 0x309C92261178fA0CF748A855e90Ae73FDb79EBc7, 18) | ||
, ('usdc-usd-coin', 'USDC.e', 0x29219dd400f2Bf60E5a23d13Be72B486D4038894, 6) | ||
, ('euroc-euro-coin', 'EURC.e', 0xe715cba7b5ccb33790cebff1436809d36cb17e57, 6) | ||
) as temp (token_id, symbol, contract_address, decimals) |