Skip to content

Commit b014323

Browse files
authored
feat: monad prices (#9047)
1 parent 0f045f9 commit b014323

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
3+
models:
4+
- name: prices_monad_tokens
5+
meta:
6+
blockchain: monad
7+
sector: prices
8+
contributors: tomfutago
9+
config:
10+
tags: ['prices', 'tokens', 'usd', 'monad']
11+
description: "Price tokens on monad EVM chain"
12+
data_tests:
13+
- dbt_utils.unique_combination_of_columns:
14+
combination_of_columns:
15+
- contract_address
16+
- test_prices_tokens_against_erc20
17+
columns:
18+
- name: token_id
19+
description: "Id of the token at coinpaprika. This id is required to pull the price feed data. NOTE: Not all tokens are listed at coinpaprika - consider using price data from DEX sources in this case or submit a listing request at coinpaprika."
20+
- name: blockchain
21+
description: "Native blockchain of the token, if any"
22+
data_tests:
23+
- accepted_values:
24+
values: [ "monad" ]
25+
- name: contract_address
26+
description: "Contract address of the token, if any"
27+
- name: symbol
28+
description: "Token symbol"
29+
- name: decimals
30+
description: "Number of decimals for the token contract"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{% set blockchain = 'monad' %}
2+
3+
{{ config(
4+
schema = 'prices_' + blockchain,
5+
alias = 'tokens',
6+
materialized = 'table',
7+
file_format = 'delta',
8+
tags = ['static']
9+
)
10+
}}
11+
12+
SELECT
13+
token_id
14+
, '{{ blockchain }}' as blockchain
15+
, symbol
16+
, contract_address
17+
, decimals
18+
FROM
19+
(
20+
VALUES
21+
('usdc-usd-coin', 'USDC', 0x754704Bc059F8C67012fEd69BC8A327a5aafb603, 6)
22+
, ('ausd-agora-dollar', 'AUSD', 0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a, 6)
23+
, ('weth-weth', 'WETH', 0xEE8c0E9f1BFFb4Eb878d8f15f368A02a35481242, 18)
24+
, ('sol-solana', 'WSOL', 0xea17E5a9efEBf1477dB45082d67010E2245217f1, 9)
25+
) as temp (token_id, symbol, contract_address, decimals)

dbt_subprojects/tokens/models/prices/prices_tokens.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
,ref('prices_somnia_tokens')
6666
,ref('prices_plasma_tokens')
6767
,ref('prices_mezo_tokens')
68+
,ref('prices_monad_tokens')
6869
] %}
6970

7071
with fungible_tokens as (

0 commit comments

Comments
 (0)