-
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.
* Init sonic chain * Update dbt_subprojects/daily_spellbook/models/evms/evms_info.sql * Add docs * Modify docs * Update dbt_subprojects/daily_spellbook/models/evms/evms_info.sql * Add sonic prices * Add beets * fix BEETS * fix weth address, update prices and trusted tokens, add unique test --------- Co-authored-by: jeff-dude <[email protected]> Co-authored-by: 0xRob <[email protected]> Co-authored-by: jeff-dude <[email protected]>
- Loading branch information
1 parent
23d8110
commit 70f01d0
Showing
8 changed files
with
920 additions
and
3 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
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 @@ | ||
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" | ||
data_tests: | ||
- unique | ||
- name: decimals | ||
description: "Number of decimal places for the token" |
26 changes: 26 additions & 0 deletions
26
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,26 @@ | ||
{% 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 | ||
('ftm-fantom', 'wS', 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38, 18) -- looks like FTM <--> S token are same price and 1:1 upgrade according to docs | ||
, ('usdc-usd-coin', 'USDC.e', 0x29219dd400f2Bf60E5a23d13Be72B486D4038894, 6) | ||
, ('weth-weth', 'WETH', 0x50c42dEAcD8Fc9773493ED674b675bE577f2634b, 18) | ||
, ('euroc-euro-coin', 'EURC.e', 0xe715cba7b5ccb33790cebff1436809d36cb17e57, 6) | ||
, ('beets-beethoven-x', 'BEETS', 0x2d0e0814e62d80056181f5cd932274405966e4f0, 18) | ||
) as temp (token_id, symbol, contract_address, decimals) |
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
Oops, something went wrong.