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 boba chain #7209

Merged
merged 8 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 2 additions & 2 deletions dbt_subprojects/daily_spellbook/models/evms/evms_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
, "base"
, "blast"
, "bnb"
, "boba"
, "celo"
, "ethereum"
, "fantom"
Expand Down Expand Up @@ -63,7 +64,7 @@ FROM (
, (1101, 'zkevm', 'Polygon zkEVM', 'Layer 2', 'ZK Rollup', 'ETH', 0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9, 'https://zkevm.polygonscan.com/', timestamp '2023-03-24 05:30', 'Polygon', 'Ethereum', 'Ethereum', true)
, (1088, 'metis_andromeda', 'Metis Andromeda', NULL, NULL, NULL, NULL, 'https://andromeda-explorer.metis.io/', timestamp '2021-11-18 22:19', 'Optimistic Virtual Machine', 'Ethereum', 'Ethereum', false)
, (59144, 'linea', 'Linea', 'Layer 2', 'ZK Rollup', 'ETH', 0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f, 'https://lineascan.build/', timestamp '2023-07-06 13:15', NULL, 'Ethereum Blobs', 'Ethereum', true)
, (288, 'boba', 'Boba Network', 'Layer 2', 'Optimistic Rollup', 'ETH', NULL, 'https://bobascan.com/', timestamp '2021-10-28 05:03', 'Optimistic Virtual Machine', 'Ethereum', 'Ethereum', false)
, (288, 'boba', 'Boba Network', 'Layer 2', 'Optimistic Rollup', 'ETH', 0x4200000000000000000000000000000000000006, 'https://bobascan.com/', timestamp '2021-10-28 05:03', 'OP Stack', 'Ethereum', 'Ethereum', true)
, (7700, 'canto', 'Canto', 'Layer 2', NULL, 'ETH', NULL, 'https://evm.explorer.canto.io/', timestamp '2022-07-26 19:27', NULL, 'Ethereum', 'Ethereum', false)
, (420, 'optimism_goerli', 'Optimism Goerli', 'Testnet', 'Optimistic Rollup', 'GTH', 0x4200000000000000000000000000000000000006, 'https://optimism-goerli.blockscout.com/', timestamp '2022-06-09 16:55', 'OP Stack', 'Goerli', 'Goerli', false)
, (1313161554, 'aurora', 'Aurora', 'Layer 2', NULL, 'ETH', 0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB, 'https://explorer.aurora.dev/', timestamp '2020-07-21 21:50:11', NULL, NULL, NULL, false)
Expand Down Expand Up @@ -91,4 +92,3 @@ FROM (
, (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)
) 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/boba/_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2

models:
- name: prices_boba_tokens
meta:
blockchain: boba
sector: prices
contributors: hosuke
config:
tags: ['prices', 'tokens', 'usd', 'boba']
description: "Price tokens on Boba 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: [ "boba" ]
- 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"
28 changes: 28 additions & 0 deletions dbt_subprojects/tokens/models/prices/boba/prices_boba_tokens.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% set blockchain = 'boba' %}

{{ 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
('usdt-tether', 'USDT', 0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d, 6)
, ('usdc-usd-coin', 'USDC', 0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc, 6)
, ('eth-ethereum', 'WETH', 0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000, 18)
, ('boba-boba-network', 'BOBA', 0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7, 18)
, ('dai-dai', 'DAI', 0xf74195Bb8a5cf652411867c5C2C5b8C2a402be35, 18)
, ('frax-frax', 'FRAX', 0x7562F525106F5d54E891e005867Bf489B5988CD9, 18)
, ('bnb-binance-coin', 'BNB', 0x68ac1623ACf9eB9F88b65B5F229fE3e2c0d5789E, 18)
) as temp (token_id, symbol, contract_address, decimals)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ FROM
('avax-avalanche', null, 'AVAX', null, null),
('bch-bitcoin-cash', null, 'BCH', null, null),
('bnb-binance-coin', null, 'BNB', null, null),
('boba-boba-network', null, 'BOBA', null, null),
('bsv-bitcoin-sv', null, 'BSV', null, null),
('btc-bitcoin', null, 'BTC', null, null),
('celo-celo', null, 'CELO', null, null),
Expand Down
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 @@ -11,6 +11,7 @@
, "bitcoin"
, "blast"
, "bnb"
, "boba"
, "cardano"
, "celo"
, "ethereum"
Expand Down Expand Up @@ -64,6 +65,7 @@ ref('prices_native_tokens')
,ref('prices_kaia_tokens')
,ref('prices_tron_tokens')
,ref('prices_ronin_tokens')
,ref('prices_boba_tokens')
] %}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ WITH trusted_tokens AS (
, ('bnb', 0x2170ed0880ac9a755fd29b2688956bd959f933f8)
, ('bnb', 0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c)
, ('bnb', 0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3)
, ('boba', 0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d)
, ('boba', 0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc)
, ('boba', 0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000)
, ('boba', 0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7)
, ('boba', 0xf74195Bb8a5cf652411867c5C2C5b8C2a402be35)
, ('boba', 0x7562F525106F5d54E891e005867Bf489B5988CD9)
, ('boba', 0x68ac1623ACf9eB9F88b65B5F229fE3e2c0d5789E)
, ('celo', 0x765de816845861e75a25fca122bb6898b8b1282a)
, ('celo', 0x471ece3750da237f93b8e339c536989b8978a438)
, ('celo', 0xceba9300f2b948710d2653dd7b07f33a8b32118c)
Expand Down
4 changes: 2 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,11 @@ 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
blockchain: arbitrum, avalanche_c, bnb, ethereum, gnosis, mantle, optimism, fantom, polygon, base, blast, sepolia, sei, nova, worldchain, kaia, ronin, boba
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']
tags: ['tokens','erc20', 'arbitrum', 'avalanche_c', 'bnb', 'ethereum', 'gnosis', 'mantle', 'optimism', 'fantom', 'base', 'blast', 'sei', 'nova', 'linea', 'worldchain', 'kaia', 'ronin', 'boba']
description: >
Crosschain ERC20 tokens
data_tests:
Expand Down
21 changes: 21 additions & 0 deletions dbt_subprojects/tokens/models/tokens/boba/_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

models:
- name: tokens_boba_erc20
meta:
blockchain: boba
sector: tokens
project: erc20
contributors: hosuke
config:
tags: ['table', 'erc20', 'boba']
description: "ERC20 Token Addresses, Symbols and Decimals on Boba 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"
21 changes: 21 additions & 0 deletions dbt_subprojects/tokens/models/tokens/boba/tokens_boba_erc20.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{
config(
schema = 'tokens_boba'
,alias = 'erc20'
,tags = ['static']
,materialized = 'table'
)
}}

SELECT
contract_address
, symbol
, decimals
FROM (VALUES
(0xa18bf3994c0cc6e3b63ac420308e5383f53120d7, 'BOBA', 18)
, (0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000, 'ETH', 18)
, (0x66a2a913e447d6b4bf33efbec43aaef87890fbbc, 'USDC', 6)
, (0x5de1677344d3cb0d7d465c10b72a8f60699c062d, 'USDT', 6)
, (0xf74195bb8a5cf652411867c5c2c5b8c2a402be35, 'DAI', 18)
, (0xd203de32170130082896b4111edf825a4774c18e, 'WETH', 18)
) as temp (contract_address, symbol, decimals)
2 changes: 2 additions & 0 deletions dbt_subprojects/tokens/models/tokens/tokens_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
,"base"
,"blast"
,"bnb"
,"boba"
,"celo"
,"ethereum"
,"fantom"
Expand Down Expand Up @@ -71,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_boba': {'blockchain': 'boba', 'model': ref('tokens_boba_erc20')}
} %}

with automated_source as (
Expand Down
3 changes: 2 additions & 1 deletion scripts/token_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def __init__(self):
"zkevm": "eth-ethereum",
"ronin": "ron-ronin-token",
"cardano": "ada-cardano",
"tron": "trx-tron"
"tron": "trx-tron",
"boba": "eth-ethereum"
}
self.tokens_by_id = self.get_tokens()
self.contracts_by_chain = self.get_contracts()
Expand Down
Loading
Loading