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

Init flare chain #7222

Merged
merged 15 commits into from
Dec 4, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ FROM ( values
,('Metadium Mainnet' ,'META' ,'META' ,'11' ,'11' ,'https://metadium.com' ,'')
,('Metadium Testnet' ,'META' ,'KAL' ,'12' ,'12' ,'https://metadium.com' ,'')
,('Diode Testnet Staging' ,'DIODE' ,'sDIODE' ,'13' ,'13' ,'https://diode.io/staging' ,'')
,('Flare Mainnet' ,'FLR' ,'FLR' ,'14' ,'14' ,'https://flare.xyz' ,'https://flare-explorer.flare.network')
,('Flare Mainnet', 'FLR', 'FLR', '14', '14', 'https://flare.network', 'https://flare-explorer.flare.network')
,('Diode Prenet' ,'DIODE' ,'DIODE' ,'15' ,'15' ,'https://diode.io/prenet' ,'')
,('Flare Testnet Coston' ,'FLR' ,'CFLR' ,'16' ,'16' ,'https://flare.xyz' ,'https://coston-explorer.flare.network')
,('Flare Testnet Coston', 'CFLR', 'CFLR', '16', '16', 'https://flare.network', 'https://coston-explorer.flare.network')
,('ThaiChain 2.0 ThaiFi' ,'TCH' ,'TFI' ,'17' ,'17' ,'https://exp.thaifi.com' ,'')
,('ThunderCore Testnet' ,'TST' ,'TST' ,'18' ,'18' ,'https://thundercore.com' ,'https://explorer-testnet.thundercore.com')
,('Songbird Canary-Network' ,'SGB' ,'SGB' ,'19' ,'19' ,'https://flare.xyz' ,'https://songbird-explorer.flare.network')
,('Songbird Canary-Network' ,'SGB' ,'SGB' ,'19' ,'19' ,'https://flare.network' ,'https://songbird-explorer.flare.network')
,('Elastos Smart Chain' ,'ETH' ,'ELA' ,'20' ,'20' ,'https://www.elastos.org/' ,'https://esc.elastos.io')
,('Elastos Smart Chain Testnet' ,'ETH' ,'tELA' ,'21' ,'21' ,'https://www.elastos.org/' ,'https://esc-testnet.elastos.io')
,('ELA-DID-Sidechain Mainnet' ,'ETH' ,'ELA' ,'22' ,'22' ,'https://www.elastos.org/' ,'')
Expand Down
2 changes: 2 additions & 0 deletions dbt_subprojects/daily_spellbook/models/evms/evms_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
, "celo"
, "ethereum"
, "fantom"
, "flare"
, "gnosis"
, "kaia"
, "linea"
Expand Down Expand Up @@ -91,4 +92,5 @@ FROM (
, (5000, 'mantle', 'Mantle', 'Layer 2', 'Optimistic Rollup', 'MNT', 0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8, 'https://mantlescan.xyz/', timestamp '2023-07-02 18:21', 'Optimistic Virtual Machine', 'Ethereum', 'Ethereum', true)
, (42170, 'nova', 'Arbitrum Nova', 'Layer 2', 'Optimistic Rollup', 'ETH', 0x722e8bdd2ce80a4422e880164f2079488e115365, 'https://nova-explorer.arbitrum.io/', timestamp '2022-06-25 04:01', 'Arbitrum', 'Ethereum', 'Ethereum', true)
, (2020, 'ronin', 'Ronin', 'Layer 1', null, 'RON', 0xe514d9deb7966c8be0ca922de8a064264ea6bcd4, 'https://app.roninchain.com/', timestamp '2021-01-25 10:49', NULL, NULL, NULL, true)
, (14, 'flare', 'Flare', 'Layer 1', NULL, 'FLR', NULL, 'https://flare-explorer.flare.network/', timestamp '2022-07-13 15:32', NULL, NULL, NULL, true)
) AS temp_table (chain_id, blockchain, name, chain_type, rollup_type, native_token_symbol, wrapped_native_token_address, explorer_link, first_block_time, codebase, data_availability, settlement, is_on_dune)
29 changes: 29 additions & 0 deletions dbt_subprojects/tokens/models/prices/flare/_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2

models:
- name: prices_flare_tokens
meta:
blockchain: flare
sector: prices
contributors: hosuke, yakufff
config:
tags: ['prices', 'tokens', 'usd', 'flare']
description: "Price tokens on Flare Network EVM chain"
data_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"
data_tests:
- accepted_values:
values: [ "flare" ]
- 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"
25 changes: 25 additions & 0 deletions dbt_subprojects/tokens/models/prices/flare/prices_flare_tokens.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% set blockchain = 'flare' %}

{{ 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
('flr-flare-network', 'WFLR', 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d, 18)
, ('joule-kinetic', 'JOULE', 0xE6505f92583103AF7ed9974DEC451A7Af4e3A3bE, 18)
, ('usdc.e-usd-coin.e', 'USDC.e', 0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6, 6)
, ('usdt-tether', 'USDT', 0x0B38e83B86d491735fEaa0a791F65c2B99535396, 6)
) as temp (token_id, symbol, contract_address, decimals)
2 changes: 2 additions & 0 deletions dbt_subprojects/tokens/models/prices/prices_tokens.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
, "celo"
, "ethereum"
, "fantom"
, "flare"
, "gnosis"
, "kaia"
, "linea"
Expand Down Expand Up @@ -46,6 +47,7 @@ ref('prices_native_tokens')
,ref('prices_cardano_tokens')
,ref('prices_ethereum_tokens')
,ref('prices_fantom_tokens')
,ref('prices_flare_tokens')
,ref('prices_gnosis_tokens')
,ref('prices_optimism_tokens')
,ref('prices_polygon_tokens')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ WITH trusted_tokens AS (
, ('ethereum', 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599)
, ('ethereum', 0xf939e0a03fb07f59a73314e73794be0e57ac1b4e)
, ('fantom', 0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83)
, ('flare', 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d)
jeff-dude marked this conversation as resolved.
Show resolved Hide resolved
, ('fantom', 0x04068da6c83afcfa0e13ba15a6696662335d5b75)
, ('fantom', 0x74b23882a30290451a17c44f4f05243b6b58c76d)
, ('fantom', 0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e)
Expand Down
5 changes: 3 additions & 2 deletions dbt_subprojects/tokens/models/tokens/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ version: 2
models:
- name: tokens_erc20
meta:
blockchain: arbitrum, avalanche_c, bnb, ethereum, gnosis, mantle, optimism, fantom, polygon, base, blast, sepolia, sei, nova, worldchain, kaia, ronin, boba
blockchain: arbitrum, avalanche_c, bnb, ethereum, gnosis, mantle, optimism, fantom, polygon, base, blast, sepolia, sei, nova, worldchain, kaia, ronin, boba, flare
sector: tokens
contributors: hildobby, 0xManny, dot2dotseurat, soispoke, mtitus6, wuligy, angus_1, Henrystats, viniabussafi, jeff-dude, rantum, hosuke
config:
tags: ['tokens','erc20', 'arbitrum', 'avalanche_c', 'bnb', 'ethereum', 'gnosis', 'mantle', 'optimism', 'fantom', 'base', 'blast', 'sei', 'nova', 'linea', 'worldchain', 'kaia', 'ronin', 'boba']
tags: ['tokens','erc20', 'arbitrum', 'avalanche_c', 'bnb', 'ethereum', 'gnosis', 'mantle', 'optimism', 'fantom', 'base', 'blast', 'sei', 'nova', 'linea', 'worldchain', 'kaia', 'ronin', 'boba', 'flare']

description: >
Crosschain ERC20 tokens
data_tests:
Expand Down
21 changes: 21 additions & 0 deletions dbt_subprojects/tokens/models/tokens/flare/_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

models:
- name: tokens_flare_erc20
meta:
blockchain: flare
sector: tokens
project: erc20
contributors: hosuke, yakufff
config:
tags: ['table', 'erc20', 'flare']
description: "ERC20 Token Addresses, Symbols and Decimals on flare Network"
columns:
- name: contract_address
description: "ERC20 token contract address"
data_tests:
- unique
- name: symbol
description: "ERC20 token symbol"
- name: decimals
description: "Number of decimals, refers to how divisible an ERC20 token can be"
32 changes: 32 additions & 0 deletions dbt_subprojects/tokens/models/tokens/flare/tokens_flare_erc20.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{
config(
schema = 'tokens_flare'
, alias = 'erc20'
, tags = ['static']
, materialized = 'table'
)
}}

SELECT
contract_address
, symbol
, decimals
FROM (VALUES
(0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d, 'WFLR', 18)
, (0xE6505f92583103AF7ed9974DEC451A7Af4e3A3bE, 'JOULE', 18)
, (0x12e605bc104e93B45e1aD99F9e555f659051c2BB, 'sFLR', 18)
, (0xfF56Eb5b1a7FAa972291117E5E9565dA29bc808d, 'APS', 18)
, (0x4A771Cc1a39FDd8AA08B8EA51F7Fd412e73B3d2B, 'USDX', 6)
, (0x140D8d3649Ec605CF69018C627fB44cCC76eC89f, 'HLN', 18)
, (0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6, 'USDC.e', 6)
, (0x0B38e83B86d491735fEaa0a791F65c2B99535396, 'USDT', 6)
, (0x22757fb83836e3F9F0F353126cACD3B1Dc82a387, 'FLX', 18)
, (0xC18f99CE6DD6278BE2D3f1e738Ed11623444aE33, 'POODLE', 18)
, (0x96B41289D90444B8adD57e6F265DB5aE8651DF29, 'eUSDT', 6)
, (0x932E691aA8c8306C4bB0b19F3f00a284371be8Ba, 'PHIL', 18)
, (0xB5010D5Eb31AA8776b52C7394B76D6d627501C73, 'PFL', 18)
, (0x908BB3E15040801fd29E542221A31Baaa7A4bE19, 'FODO', 18)
, (0xe2bBf70A52Ee84837E9E2e245E5aFc560E259249, 'ZOINK', 18)
, (0x1aa5282692398c078e71Fb3e4A85660d1BF8F586, 'BUNNY', 18)
, (0xc6B19B06A92B337Cbca5f7334d29d45ec4d5E532, 'Moon', 18)
) as temp (contract_address, symbol, decimals)
1 change: 1 addition & 0 deletions dbt_subprojects/tokens/models/tokens/tokens_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
,'tokens_tron': {'blockchain': 'tron', 'model': ref('tokens_tron_erc20')}
,'tokens_ronin': {'blockchain': 'ronin', 'model': ref('tokens_ronin_erc20')}
,'tokens_bob': {'blockchain': 'bob', 'model': ref('tokens_bob_erc20')}
,'tokens_flare': {'blockchain': 'flare', 'model': ref('tokens_flare_erc20')}
,'tokens_boba': {'blockchain': 'boba', 'model': ref('tokens_boba_erc20')}
} %}

Expand Down
Loading
Loading