-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add Abstract blockchain base sources and docs Add base sources and documentation for Abstract blockchain including: - Core tables (blocks, transactions, traces, logs) - Decoded logs and creation traces - ERC20/721/1155 event tables Note: Following tables are pending data availability: - traces_decoded - contracts - contracts_submitted * Update evms_info.sql * Update abstract_base_sources.yml * Add abstract files * Update tokens * update wrapped address in evmc --------- Co-authored-by: jeff-dude <[email protected]>
- Loading branch information
Showing
11 changed files
with
846 additions
and
3 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_abstract_tokens | ||
meta: | ||
blockchain: abstract | ||
sector: prices | ||
contributors: hosuke | ||
config: | ||
tags: ['prices', 'tokens', 'usd', 'abstract'] | ||
description: "Price tokens on Abstract 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: [ "abstract" ] | ||
- 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
25
dbt_subprojects/tokens/models/prices/abstract/prices_abstract_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,25 @@ | ||
{% set blockchain = 'abstract' %} | ||
|
||
{{ 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 | ||
('weth-weth', 'WETH', 0x3439153EB7AF838Ad19d56E1571FBD09333C2809, 18) | ||
, ('usdc-usd-coin', 'USDC.e', 0x84a71ccd554cc1b02749b35d22f684cc8ec987e1, 6) | ||
, ('pengu-pudgy-penguins', 'PENGU', 0x9ebe3a824ca958e4b3da772d2065518f009cba62, 18) | ||
, ('eth-ethereum', 'ETH', 0x000000000000000000000000000000000000800a, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: tokens_abstract_erc20 | ||
meta: | ||
blockchain: abstract | ||
sector: tokens | ||
project: erc20 | ||
contributors: hosuke | ||
config: | ||
tags: ['table', 'erc20', 'abstract'] | ||
description: "ERC20 Token Addresses, Symbols and Decimals" | ||
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" |
19 changes: 19 additions & 0 deletions
19
dbt_subprojects/tokens/models/tokens/abstract/tokens_abstract_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,19 @@ | ||
{{ | ||
config( | ||
schema = 'tokens_abstract' | ||
,alias = 'erc20' | ||
,tags = ['static'] | ||
,materialized = 'table' | ||
) | ||
}} | ||
|
||
SELECT | ||
contract_address | ||
, symbol | ||
, decimals | ||
FROM (VALUES | ||
(0x3439153EB7AF838Ad19d56E1571FBD09333C2809, 'WETH', 18) | ||
, (0x84a71ccd554cc1b02749b35d22f684cc8ec987e1, 'USDC.e', 6) | ||
, (0x9ebe3a824ca958e4b3da772d2065518f009cba62, 'PENGU', 18) | ||
, (0x000000000000000000000000000000000000800a, 'ETH', 18) | ||
) AS temp_table (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
Oops, something went wrong.