diff --git a/dbt_subprojects/tokens/models/prices/prices_tokens.sql b/dbt_subprojects/tokens/models/prices/prices_tokens.sql index 0f38cb25f82..2028a51ff25 100644 --- a/dbt_subprojects/tokens/models/prices/prices_tokens.sql +++ b/dbt_subprojects/tokens/models/prices/prices_tokens.sql @@ -27,6 +27,7 @@ , "scroll" , "sei" , "solana" + , "sonic" , "viction" , "worldchain" , "zksync" @@ -70,6 +71,7 @@ ref('prices_native_tokens') ,ref('prices_ronin_tokens') ,ref('prices_boba_tokens') ,ref('prices_viction_tokens') +,ref('prices_sonic_tokens') ] %} diff --git a/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql b/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql index cb20a76eda0..9521002ca68 100644 --- a/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql +++ b/dbt_subprojects/tokens/models/prices/prices_trusted_tokens.sql @@ -143,6 +143,9 @@ WITH trusted_tokens AS ( , ('solana', from_base58('mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So')) , ('solana', from_base58('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')) , ('solana', from_base58('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v')) + , ('sonic', 0x309C92261178fA0CF748A855e90Ae73FDb79EBc7) + , ('sonic', 0x29219dd400f2Bf60E5a23d13Be72B486D4038894) + , ('sonic', 0xe715cba7b5ccb33790cebff1436809d36cb17e57) , ('worldchain', 0x2cFc85d8E48F8EAB294be644d9E25C3030863003) , ('worldchain', 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1) , ('worldchain', 0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3) diff --git a/dbt_subprojects/tokens/models/prices/sonic/_schema.yml b/dbt_subprojects/tokens/models/prices/sonic/_schema.yml new file mode 100644 index 00000000000..57c0b61f02c --- /dev/null +++ b/dbt_subprojects/tokens/models/prices/sonic/_schema.yml @@ -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" diff --git a/dbt_subprojects/tokens/models/prices/sonic/prices_sonic_tokens.sql b/dbt_subprojects/tokens/models/prices/sonic/prices_sonic_tokens.sql new file mode 100644 index 00000000000..d440d1a5e0c --- /dev/null +++ b/dbt_subprojects/tokens/models/prices/sonic/prices_sonic_tokens.sql @@ -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)