Skip to content

Commit

Permalink
Polygon ZkEVM prices (#5856)
Browse files Browse the repository at this point in the history
* init zkevm prices

* remove invalid id

---------

Co-authored-by: jeff-dude <102681548+jeff-dude@users.noreply.github.com>
  • Loading branch information
viniabussafi and jeff-dude authored May 1, 2024
1 parent d4bd1bb commit 3244a4b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/prices/prices_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version: 2
models:
- name: prices_tokens
meta:
blockchain: arbitrum, avalanche_c, gnosis, polygon, optimism, ethereum, bnb, solana, fantom, celo, base, zksync, zora
blockchain: arbitrum, avalanche_c, gnosis, polygon, optimism, ethereum, bnb, solana, fantom, celo, base, zksync, zora, zkevm
sector: prices
contributors: aalan3, hildobby
contributors: aalan3, hildobby, viniabussafi
config:
tags: ['prices', 'tokens', 'usd']
description: "Price tokens"
Expand Down
1 change: 1 addition & 0 deletions models/prices/prices_tokens.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ref('prices_native_tokens')
,ref('prices_zksync_tokens')
,ref('prices_zora_tokens')
,ref('prices_scroll_tokens')
,ref('prices_zkevm_tokens')
] %}


Expand Down
29 changes: 29 additions & 0 deletions models/prices/zkevm/prices_zkevm_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2

models:
- name: prices_zkevm_tokens
meta:
blockchain: zkevm
sector: prices
contributors: viniabussafi
config:
tags: ['prices', 'tokens', 'usd', 'zkevm']
description: "Price tokens on polygon zkevm chain"
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- contract_address
columns:
- name: token_id
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."
- name: blockchain
description: "Native blockchain of the token, if any"
tests:
- accepted_values:
values: [ "zkevm" ]
- name: contract_address
description: "Contract address of the token, if any"
- name: symbol
description: "Token symbol"
- name: decimals
description: "Number of decimals for the token contract"
29 changes: 29 additions & 0 deletions models/prices/zkevm/prices_zkevm_tokens.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ config(
schema='prices_zkevm',
alias = 'tokens',
materialized='table',
file_format = 'delta',
tags = ['static']
)
}}
SELECT
token_id
, blockchain
, symbol
, contract_address
, decimals
FROM
(
VALUES
('weth-weth','zkevm','WETH',0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9,18),
('reth-rocket-pool-eth','zkevm','RETH',0xb23c20efce6e24acca0cef9b7b7aa196b84ec942,18),
('usdc-usdc','zkevm','USDC',0x37eaa0ef3549a5bb7d431be78a3d99bd360d19e5,6),
('dai-dai','zkevm','DAI',0x744c5860ba161b5316f7e80d9ec415e2727e5bd5,18),
('rseth-rseth','zkevm','RSETH',0x8c7d118b5c47a5bcbd47cc51789558b98dad17c5,18),
('aura-aura-finance','zkevm','AURA',0x1509706a6c66ca549ff0cb464de88231ddbe213b,18),
('matic-polygon','zkevm','MATIC',0xa2036f0538221a77a3937f1379699f44945018d0,18),
('aeth-ankreth','zkevm','AETH',0x12d8ce035c5de3ce39b1fdd4c1d5a745eaba3b8c,18),
('bal-balancer','zkevm','BAL',0x120ef59b80774f02211563834d8e3b72cb1649d6,18),
('usdt-tether','zkevm','USDT',0x1e4a5963abfd975d8c9021ce480b42188849d41d,6)
) as temp (token_id, blockchain, symbol, contract_address, decimals)

0 comments on commit 3244a4b

Please sign in to comment.