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

Update/create stablecoin token sets. #6186

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions tokens/models/tokens/arbitrum/tokens_arbitrum_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,9 @@ FROM (VALUES
, (0x323665443cef804a3b5206103304bd4872ea4253, 'USDV', 6)
, (0x966570a84709d693463cdd69dcadb0121b2c9d26, 'taoUSD', 18)
, (0x993614e1c8c9c5abe49462ce5702431978fd767f, 'S*ETH', 18)
, (0xaf88d065e77c8cc2239327c5edb3a432268e5831, 'USDC', 6) -- Native
Copy link
Member

Choose a reason for hiding this comment

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

i'm still a bit confused on this approach here. these stablecoins already exist in tokens.erc20:

select
  *
from
  tokens.erc20
where
  contract_address = 0xaf88d065e77c8cc2239327c5edb3a432268e5831

keep in mind that erc20 token metadata now combines an automated source + these static files to handle outlier, long tail tokens missing. i would validate all of these already exist in the table, then remove from this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

keep in mind that erc20 token metadata now combines an automated source

Wow did I ever jump the gun on this. This hurts my soul.

, (0xff970a61a04b1ca14834a43f5de4533ebddb5cc8, 'USDC', 6) -- Bridged
, (0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9, 'USDT', 6)
, (0xda10009cbd5d07dd0cecc66161fc93d7c9000da1, 'DAI', 18)
, (0x17fc002b466eec40dae837fc4be5c67993ddbd6f, 'FRAX', 18)
) AS temp_table (contract_address, symbol, decimals)
2 changes: 1 addition & 1 deletion tokens/models/tokens/arbitrum/tokens_arbitrum_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ models:
blockchain: arbitrum
sector: tokens
project: erc20
contributors: soispoke, dot2dotseurat, mtitus6, maybeYonas
contributors: soispoke, dot2dotseurat, mtitus6, maybeYonas, thetroyharris
config:
tags: ['table', 'erc20']
description: "ERC20 Token Addresses, Symbols and Decimals"
Expand Down
3 changes: 3 additions & 0 deletions tokens/models/tokens/avalanche_c/tokens_avalanche_c_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,7 @@ FROM (VALUES
, (0x60b78d111382036abc5eed987a709b07d52df9d3, 'COM-LP', 18)
, (0xf0ed25fd26e0b64c86c6c78b661f2ef283e9b6ff, 'COM-LP', 18)
, (0xf105fb50fc6ddd8a857bbecd296c8a630e8ca857, 'PGL', 18)
, (0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E, 'USDC', 6)
, (0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664, 'USDC', 6) --bridged
, (0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7, 'USDT', 6)
) AS temp_table (contract_address, symbol, decimals)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ models:
blockchain: avalanche_c
sector: tokens
project: erc20
contributors: 0xManny
contributors: 0xManny, thetroyharris
config:
tags: ['tokens', 'erc20', 'avalanche_c']
description: "ERC20 Token Addresses, Symbols and Decimals"
Expand Down
4 changes: 4 additions & 0 deletions tokens/models/tokens/base/tokens_base_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,8 @@ FROM (VALUES
, (0x96419929d7949D6A801A6909c145C8EEf6A40431, 'SPEC', 18)
, (0x7ab8ea5ef610f979e1c59fbd9da9284672e5a136, 'KABOSU', 18)
, (0xd722e55c1d9d9fa0021a5215cbb904b92b3dc5d4, 'RDNT', 18)
, (0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'USDC', 6)
, (0xb79dd08ea68a908a97220c76d19a6aa9cbde4376, 'USD+', 6)
, (0x50c5725949a6f0c72e6c4a641f24049a917db0cb, 'DAI', 18)
, (0x4a3a6dd60a34bb2aba60d73b4c88315e9ceb6a3d, 'MIM', 18)
) AS temp_table (contract_address, symbol, decimals)
2 changes: 1 addition & 1 deletion tokens/models/tokens/base/tokens_base_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ models:
blockchain: base
sector: tokens
project: erc20
contributors: hildobby
contributors: hildobby, thetroyharris
config:
tags: ['table', 'erc20', 'base']
description: "All ERC20 Token Addresses on Base - with mapped Symbols and Decimals if known."
Expand Down
11 changes: 6 additions & 5 deletions tokens/models/tokens/blast/tokens_blast_erc20.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{
{{
config(
schema = 'tokens_blast'
,alias = 'erc20'
,tags = ['static']
,materialized = 'table'
)
, alias = 'erc20'
, tags = ['static']
, materialized = 'table'
)
}}

SELECT
Expand All @@ -19,4 +19,5 @@ FROM (VALUES
, (0x5ffd9ebd27f2fcab044c0f0a26a45cb62fa29c06, 'PAC', 18)
, (0x2416092f143378750bb29b79ed961ab195cceea5, 'ezETH', 18)
, (0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A, 'weETH', 18)
, (0x76da31d7c9cbeae102aff34d3398bc450c8374c1, 'MIM', 18)
) AS temp_table (contract_address, symbol, decimals)
6 changes: 3 additions & 3 deletions tokens/models/tokens/blast/tokens_blast_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ models:
blockchain: blast
sector: tokens
project: erc20
contributors: Henrystats
contributors: Henrystats, thetroyharris
config:
tags: ['table', 'erc20']
tags: ['table', 'erc20', 'blast' ]
description: "ERC20 Token Addresses, Symbols and Decimals"
columns:
- name: contract_address
Expand All @@ -18,4 +18,4 @@ models:
- name: symbol
description: "ERC20 token symbol"
- name: decimals
description: "Number of decimals, refers to how divisible an ERC20 token can be"
description: "Number of decimals, refers to how divisible an ERC20 token can be"
9 changes: 8 additions & 1 deletion tokens/models/tokens/bnb/tokens_bnb_bep20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -587,4 +587,11 @@ FROM (VALUES
, (0x188738e1177a994fd3f1a1daa07c14e148ef03d0, 'CHOPIN', 18)
, (0x1cebf8735c8d1365cb4c2117787dc811ea6148e0, 'DUSD', 18)
, (0xefc41e176a20ae15c7c20da48d40d83d098845d8, 'SPRT', 18)
) AS temp_table (contract_address, symbol, decimals)
, (0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d, 'USDC', 18)
, (0x55d398326f99059ff775485246999027b3197955, 'USDT', 18)
, (0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3, 'DAI', 18)
, (0xd17479997F34dd9156Deef8F95A52D81D265be9c, 'USDD', 18)
, (0xe80772eaf6e2e18b651f160bc9158b2a5cafca65, 'USD+', 6)
, (0xb7f8cd00c5a06c0537e2abff0b58033d02e5e094, 'PAX', 18)
, (0x8965349fb649a33a30cbfda057d8ec2c48abe2a2, 'USDC', 18)
) AS temp_table (contract_address, symbol, decimals)
2 changes: 1 addition & 1 deletion tokens/models/tokens/bnb/tokens_bnb_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ models:
blockchain: bnb
sector: tokens
project: bep20
contributors: hildobby
contributors: hildobby, thetroyharris
config:
tags: ['tokens', 'metadata', 'bep20', 'bnb']
description: "BEP20 Token Addresses, Symbols and Decimals"
Expand Down
8 changes: 7 additions & 1 deletion tokens/models/tokens/celo/tokens_celo_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -351,4 +351,10 @@ FROM (VALUES
, (0x1a648004d8ab84ee34d2d1cd2f2a7a7828d6939f, 'MobLP-gauge', 18)
, (0x3b07929950357629c7cb353ba298ed092ab51b2e, 'D2D', 18)
, (0x653ead45a8c49c6d86b430fb742a5bff55bae53f, 'CPC02STG', 18)
) AS temp_table (contract_address, symbol, decimals)
, (0xceba9300f2b948710d2653dd7b07f33a8b32118c, 'USDC', 6) --native
, (0xef4229c8c3250c675f21bcefa42f58efbff6002a, 'USDC', 6) --bridged
, (0x37f750b7cc259a2f741af45294f6a16572cf5cad, 'USDC', 6) --bridged
, (0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e, 'USDT', 6) --native
, (0x617f3112bf5397d0467d315cc709ef968d9ba546, 'USDT', 6) --bridged
, (0x765de816845861e75a25fca122bb6898b8b1282a, 'cUSD', 18)
) AS temp_table (contract_address, symbol, decimals)
2 changes: 1 addition & 1 deletion tokens/models/tokens/celo/tokens_celo_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ models:
blockchain: celo
sector: tokens
project: erc20
contributors: hosuke
contributors: hosuke, thetroyharris
config:
tags: ['table', 'erc20', 'celo']
description: "All ERC20 Token Addresses on Celo - with mapped Symbols and Decimals if known."
Expand Down
29 changes: 29 additions & 0 deletions tokens/models/tokens/ethereum/tokens_ethereum_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4565,4 +4565,33 @@ FROM (VALUES
, ( 0x988567FE094570cCE1FFdA29D1f2d842B70492be, 'ZERO', 6)
, ( 0x10dea67478c5f8c5e2d90e5e9b26dbe60c54d800, 'TAIKO', 18)
, ( 0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b, 'syrupUSDC', 6)
, (0xbc6da0fe9ad5f3b0d58160288917aa56653660e9, 'alUSD', 18)
, (0xd46ba6d942050d489dbd938a2c909a5d5039a161, 'AMPL', 9)
, (0x4fabb145d64652a948d72533023f6e7a623c7c53, 'BUSD', 18)
, (0x6b175474e89094c44da98b954eedeac495271d0f, 'DAI', 18)
, (0xdb25f211ab05b1c97d595516f45794528a807ad8, 'EURS', 18)
, (0x956f47f50a910163d8bf957cf5846d573e7f87ca, 'FEI', 18)
, (0x853d955acef822db058eb8505911ed77f175b99e, 'FRAX', 18)
, (0x056fd409e1d7a124bd7017459dfea2f387b6d5cd, 'GUSD', 2)
, (0xdf574c24545e5ffecb9a659c229253d4111d87e1, 'HUSD', 8)
, (0x5f98805A4E8be255a32880FDeC7F6728C6568bA0, 'LUSD', 18)
, (0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3, 'MIM', 18)
, (0xe2f2a5c287993345a840db3b0845fbc70f5935a5, 'MUSD', 18)
, (0x8e870d67f660d95d5be530380d0ec0bd388289e1, 'PAX', 18)
, (0x03ab458634910aad20ef5f1c8ee96f1d6ac54919, 'RAI', 18)
, (0x57Ab1ec28D129707052df4dF418D58a2D46d5f51, 'sUSD', 18)
, (0x0000000000085d4780b73119b644ae5ecd22b376, 'TUSD', 18)
, (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 'USDC', 6)
, (0x674c6ad92fd080e4004b2312b45f796a192d27a0, 'USDN', 18)
, (0x1456688345527bE1f37E9e627DA0837D6f08C925, 'USDP', 18)
, (0xdac17f958d2ee523a2206206994597c13d831ec7, 'USDT', 6)
, (0xa47c8bf37f92abed4a126bda807a7b7498661acd, 'UST', 18)
, (0xa693b19d2931d498c5b318df961919bb4aee87a5, 'UST', 6)
, (0xe07F9D810a48ab5c3c914BA3cA53AF14E4491e8A, 'GYD', 18)
, (0x4c9edd5852cd905f086c759e8383e09bff1e68b3, 'USDe', 18)
, (0xf939e0a03fb07f59a73314e73794be0e57ac1b4e, 'crvUSD',18)
, (0xc5f0f7b66764f6ec8c8dff7ba683102295e16409, 'FDUSD', 18)
, (0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f, 'GHO', 18)
, (0x865377367054516e17014CcdED1e7d814EDC9ce4, 'DOLA', 18)
, (0x6c3ea9036406852006290770bedfcaba0e23a0e8, 'PYUSD', 6)
) AS temp_table (contract_address, symbol, decimals)
Copy link
Member

Choose a reason for hiding this comment

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

i'm not sure we should delete these, as they may have downstream dependencies or get used by a few users/dashboards on dune?

This file was deleted.

23 changes: 1 addition & 22 deletions tokens/models/tokens/ethereum/tokens_ethereum_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ models:
blockchain: ethereum
sector: tokens
project: erc20
contributors: soispoke, dot2dotseurat
contributors: soispoke, dot2dotseurat, gentrexha, thetroyharris
config:
tags: ['table', 'erc20']
description: "ERC20 Token Addresses, Symbols and Decimals"
Expand Down Expand Up @@ -85,27 +85,6 @@ models:
to be compatible with the common standards. Accepted values are presently standards represented.
If you are adding a token with a new standard, remember to add it the accepted values list.

- name: tokens_ethereum_erc20_stablecoins
meta:
blockchain: ethereum
sector: tokens
project: erc20
contributors: gentrexha
config:
tags: [ 'table', 'erc20', 'stablecoins' ]
description: "ERC20 Stablecoin Token Addresses, Symbols and Decimals"
columns:
- name: contract_address
description: "ERC20 stablecoin token contract address"
tests:
- unique
- name: symbol
description: "ERC20 stablecoin token symbol"
- name: decimals
description: "Number of decimals, refers to how divisible an ERC20 stablecoin token can be"
- name: name
description: "ERC20 stablecoin token name"

- name: tokens_ethereum_nft_standards
meta:
blockchain: ethereum
Expand Down
13 changes: 13 additions & 0 deletions tokens/models/tokens/fantom/tokens_fantom_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,17 @@ FROM (VALUES
, (0xe8cea5f5098b237bc8291dca2694db2f503f08da, 'oft_fuse_VOLT', 18)
, (0x50799f9c292e800780d339d17e1f664eb04ff126, 'oft_fuse_sFUSE', 18)
, (0x8b6f1c276410d8bac84d8ed587cc0f9d30f52ee2, 'oft_arbitrum_GRAI', 18)
, (0xc54A1684fD1bef1f077a336E6be4Bd9a3096a6Ca, '2SHARES', 18)
, (0x04068DA6C83AFCFA0e13ba15A6696662335D5B75, 'USDC', 6)
, (0x049d68029688eAbF473097a2fC38ef61633A3C7A, 'fUSDT', 6)
, (0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E, 'DAI', 18)
, (0xdc301622e621166BD8E82f2cA0A26c13Ad0BE355, 'FRAX', 18)
, (0xAd84341756Bf337f5a0164515b1f6F993D194E1f, 'FUSD', 18)
, (0x7a6e4E3CC2ac9924605DCa4bA31d1831c84b44aE, '2OMB', 18)
, (0x846e4D51d7E2043C1a87E0Ab7490B93FB940357b, 'UST', 6)
, (0x87a5C9B60A3aaf1064006FE64285018e50e0d020, 'MAGIK', 18)
, (0x9879aBDea01a879644185341F7aF7d8343556B7a, 'TUSD', 18)
, (0x1D3918043d22de2D799a4d80f72Efd50Db90B5Af, 'sPDO', 18)
, (0x5f0456F728E2D59028b4f5B8Ad8C604100724C6A, 'L3USD', 18)
, (0xb9D62c829fbF7eAff1EbA4E50F3D0480b66c1748, 'PDO', 18)
) AS temp_table (contract_address, symbol, decimals)
26 changes: 0 additions & 26 deletions tokens/models/tokens/fantom/tokens_fantom_erc20_stablecoins.sql

This file was deleted.

21 changes: 0 additions & 21 deletions tokens/models/tokens/fantom/tokens_fantom_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,27 +86,6 @@ models:
to be compatible with the common standards. Accepted values are presently standards represented.
If you are adding a token with a new standard, remember to add it the accepted values list.

- name: tokens_fantom_erc20_stablecoins
meta:
blockchain: fantom
sector: tokens
project: erc20
contributors: Henrystats
config:
tags: [ 'table', 'erc20', 'stablecoins' ]
description: "ERC20 Stablecoin Token Addresses, Symbols and Decimals"
columns:
- name: contract_address
description: "ERC20 stablecoin token contract address"
tests:
- unique
- name: symbol
description: "ERC20 stablecoin token symbol"
- name: decimals
description: "Number of decimals, refers to how divisible an ERC20 stablecoin token can be"
- name: name
description: "ERC20 stablecoin token name"

- name: tokens_fantom_nft_standards
meta:
blockchain: fantom
Expand Down
3 changes: 3 additions & 0 deletions tokens/models/tokens/gnosis/tokens_gnosis_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7795,4 +7795,7 @@ FROM (VALUES
, ( 0x270ba1f35d8b87510d24f693fccc0da02e6e4eeb, 'stataGnoUSDC', 6)
, ( 0x1a8805194d0ef2f73045a00c70da399d9e74221c, 'GNOBBY', 18)
, ( 0xF4F3c1666E750E014DE65c50d0e98B1263E678B8, 'SLX', 18)
, (0xddafbb505ad214d7b80b1f830fccc89b60fb7a83, 'USDC', 6)
, (0x4ecaba5870353805a9f068101a40e0f32ed605c6, 'USDT', 6)
, (0xe91d153e0b41518a2ce8dd3d7944fa863463a97d, 'WXDAI', 18)
) AS temp_table (contract_address, symbol, decimals)
2 changes: 1 addition & 1 deletion tokens/models/tokens/gnosis/tokens_gnosis_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ models:
blockchain: gnosis
sector: tokens
project: erc20
contributors: hildobby
contributors: hildobby, thetroyharris
config:
tags: ['table', 'metadata', 'gnosis', 'erc20']
description: "ERC20 Token Addresses, Symbols and Decimals"
Expand Down
19 changes: 19 additions & 0 deletions tokens/models/tokens/linea/tokens_linea_erc20.sql
Copy link
Member

Choose a reason for hiding this comment

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

similar to all other chains, i would check these already exist, but since this is a net new file it's worth a close look. we can remove the file altogether if they exist

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{
config(
schema = 'tokens_linea'
, alias = 'erc20'
, tags = ['static']
, materialized = 'table'
)
}}

SELECT contract_address, symbol, decimals
FROM (
VALUES
(0x176211869ca2b568f2a7d4ee941e073a821ee1ff, 'USDC', 6) --bridged
, (0xb79dd08ea68a908a97220c76d19a6aa9cbde4376, 'USD+', 6)
, (0xA219439258ca9da29E9Cc4cE5596924745e12B93, 'USDT', 6)
, (0x4af15ec2a0bd43db75dd04e62faa3b8ef36b00d5, 'DAI', 18)
, (0xd2bc272EA0154A93bf00191c8a1DB23E67643EC5, 'USDP', 18)
, (0xDD3B8084AF79B9BaE3D1b668c0De08CCC2C9429A, 'MIM', 18)
) AS temp_table (contract_address, symbol, decimals)
21 changes: 21 additions & 0 deletions tokens/models/tokens/linea/tokens_linea_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

models:
- name: tokens_linea_erc20
meta:
blockchain: linea
sector: tokens
project: erc20
contributors: thetroyharris
config:
tags: [ 'table', 'erc20', 'linea' ]
description: "ERC20 Token Addresses, Symbols and Decimals"
columns:
- name: contract_address
description: "ERC20 token contract address"
tests:
- unique
- name: symbol
description: "ERC20 token symbol"
- name: decimals
description: "Number of decimals, refers to how divisible an ERC20 token can be"
1 change: 0 additions & 1 deletion tokens/models/tokens/optimism/tokens_optimism_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,3 @@ models:
description: "Percent Royalty in decimal form (i.e. 0.01 = 1% royalty)"
- name: platform
description: "Where was the NFT minted"

Loading
Loading