-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init boba chain * Fix evm info: * Add native token * Update token checker * Remove not existed transfers sources * Match raw data schema * Rewrite boba docs block --------- Co-authored-by: jeff-dude <[email protected]>
- Loading branch information
Showing
13 changed files
with
614 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
28
dbt_subprojects/tokens/models/prices/boba/prices_boba_tokens.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
21
dbt_subprojects/tokens/models/tokens/boba/tokens_boba_erc20.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.