Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mantle prices feed #6112

Merged
merged 8 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions models/prices/mantle/prices_mantle_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2

models:
- name: prices_mantle_tokens
meta:
blockchain: mantle
sector: prices
contributors: hosuke
config:
tags: ['prices', 'tokens', 'usd', 'mantle']
description: "Price tokens on mantle L2 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: [ "mantle" ]
- 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"
39 changes: 39 additions & 0 deletions models/prices/mantle/prices_mantle_tokens.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{ config(
schema='prices_mantle',
alias='tokens',
materialized='table',
file_format='delta',
tags=['static']
)
}}

SELECT
token_id,
blockchain,
symbol,
contract_address,
decimals
FROM
(
VALUES
-- verified
('mnt-mantle', 'mantle', 'MNT', 0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000, 18),
('mnt-mantle', 'mantle', 'WMNT', 0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8, 18),
('joe-trader-joe', 'mantle', 'JOE', 0x371c7ec6d8039ff7933a2aa28eb827ffe1f52f07, 18),
('usdc-usd-coin', 'mantle', 'USDC', 0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9, 6),
('weth-weth', 'mantle', 'WETH', 0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111, 18),
('meth-meth', 'mantle', 'mETH', 0xcda86a272531e8640cd7f1a92c01839911b90bb0, 18),
('usdt-tether', 'mantle', 'USDT', 0x201eba5cc46d216ce6dc03f6a759e8e766e956ae, 6),
('axlusdc-axelar-wrapped-usdc', 'mantle', 'axlUSDC', 0xeb466342c4d449bc9f53a865d5cb90586f405215, 6),

-- not verified
('stg-stargatetoken', 'mantle', 'STG', 0x8731d54e9d02c286767d56ac03e8037c07e01e98, 18),
('pendle-pendle', 'mantle', 'PENDLE', 0xd27b18915e7acc8fd6ac75db6766a80f8d2f5729, 18),
-- ('wbtc-wrapped-bitcoin', 'mantle', 'WBTC', 0xcabae6f6ea1ecab08ad02fe02ce9a44f09aebfa2, 8), not sure about authenticity
('ena-ethena', 'mantle', 'ENA', 0x58538e6a46e07434d7e7375bc268d3cb839c0133, 18),
('lend-ethlend', 'mantle', 'LEND', 0x25356aeca4210ef7553140edb9b8026089e49396, 18)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this one is returning as inactive, maybe we deactivate for now too?

-- ('pepe-pepe', 'mantle', 'PEPE', 0x2cb76c8949c7b7fae6dc0614c3b1bfd435f9a0bc, 18),
-- ('lusd-lusd', 'mantle', 'LUSD', 0xf93a85d53e4af0d62bdf3a83ccfc1ecf3eaf9f32, 18), not sure about authenticity
-- ('wsteth-wrapped-steth', 'mantle', 'wstETH', 0x636d4073738c071326aa70c9e5db7c334beb87be, 18), not sure about authenticity
-- ('usde-ethena-usde', 'mantle', 'USDe', 0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34, 18) not sure about authenticity
) as temp (token_id, blockchain, symbol, contract_address, decimals)
3 changes: 2 additions & 1 deletion models/prices/prices_tokens.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
post_hook = '{{ expose_spells(\'["ethereum", "solana", "arbitrum", "gnosis", "optimism", "bnb", "avalanche_c", "polygon", "fantom", "celo", "base", "zksync", "zora", "bitcoin", "cardano"]\',
"sector",
"prices",
\'["aalan3", "jeff-dude", "umer_h_adil", "0xBoxer", "rantum", "lgingerich", "hildobby", "cryptokoryo", "0xRob"]\') }}'
\'["aalan3", "jeff-dude", "umer_h_adil", "0xBoxer", "rantum", "lgingerich", "hildobby", "cryptokoryo", "0xRob", "hosuke"]\') }}'
)
}}

Expand All @@ -31,6 +31,7 @@ ref('prices_native_tokens')
,ref('prices_scroll_tokens')
,ref('prices_linea_tokens')
,ref('prices_zkevm_tokens')
,ref('prices_mantle_tokens')
] %}


Expand Down
3 changes: 2 additions & 1 deletion scripts/token_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def __init__(self):
"celo": "celo-celo",
"base": "base-base",
"zksync": "zksync-zksync",
"zora": "eth-ethereum"
"zora": "eth-ethereum",
"mantle": "mnt-mantle"
}
self.tokens_by_id = self.get_tokens()
self.contracts_by_chain = self.get_contracts()
Expand Down
Loading