mirror of
https://github.com/FlipsideCrypto/scroll-models.git
synced 2026-02-06 09:16:57 +00:00
initial set up
This commit is contained in:
parent
f325722846
commit
2d97b64368
@ -1,11 +1,11 @@
|
||||
## Repo Set Up
|
||||
1. Create a new repository from the [evm-models-template](https://github.com/FlipsideCrypto/evm-models-template)
|
||||
2. Update all references to `<evm_chain>` to the new chain name, in lowercase by using find and replace
|
||||
2. Update all references to `scroll` to the new chain name, in lowercase by using find and replace
|
||||
3. Update the fsc-evm package version in `packages.yml` to the latest version
|
||||
4. Set up the rest of the dbt project, where applicable, including but not limited to:
|
||||
- `dbt_project.yml` (enable/disable packages, vars, etc.)
|
||||
- `.github/workflows` (update tags, etc.)
|
||||
- `overview.md` (update `<evm_chain>`, table references, docs etc.)
|
||||
- `overview.md` (update `scroll`, table references, docs etc.)
|
||||
- `sources.yml` (update schemas, tables etc.)
|
||||
- `requirements.txt` (update dependencies)
|
||||
- other files where applicable
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
# Name your project! Project names should contain only lowercase characters
|
||||
# and underscores. A good package name should reflect your organization's
|
||||
# name or the intended use of these models
|
||||
name: "<evm_chain>_models" # replace with the name of the chain
|
||||
name: "scroll_models" # replace with the name of the chain
|
||||
version: "1.0.0"
|
||||
config-version: 2
|
||||
|
||||
# This setting configures which "profile" dbt uses for this project.
|
||||
profile: "<evm_chain>" # replace with the name of the chain
|
||||
profile: "scroll" # replace with the name of the chain
|
||||
|
||||
# These configurations specify where dbt should look for different types of files.
|
||||
# The `source-paths` config, for example, states that models in this project can be
|
||||
@ -26,7 +26,7 @@ clean-targets: # directories to be removed by `dbt clean`
|
||||
- "dbt_packages"
|
||||
|
||||
tests:
|
||||
<evm_chain>_models: # replace with the name of the chain
|
||||
scroll_models: # replace with the name of the chain
|
||||
+store_failures: true # all tests
|
||||
fsc_evm:
|
||||
+store_failures: true
|
||||
@ -41,7 +41,7 @@ on-run-end:
|
||||
dispatch:
|
||||
- macro_namespace: dbt
|
||||
search_order:
|
||||
- <evm_chain>-models
|
||||
- scroll-models
|
||||
- dbt_snowflake_query_tags
|
||||
- dbt
|
||||
|
||||
@ -53,7 +53,7 @@ query-comment:
|
||||
# Full documentation: https://docs.getdbt.com/docs/configuring-models
|
||||
|
||||
models:
|
||||
<evm_chain>_models: # replace with the name of the chain
|
||||
scroll_models: # replace with the name of the chain
|
||||
+copy_grants: true
|
||||
+persist_docs:
|
||||
relation: true
|
||||
@ -70,16 +70,32 @@ models:
|
||||
+on_schema_change: "append_new_columns"
|
||||
main_package:
|
||||
+enabled: false # disable main_package by default, enabled other packages as needed
|
||||
admin:
|
||||
+enabled: true
|
||||
core:
|
||||
+enabled: true # enable subpackages, as needed
|
||||
github_actions:
|
||||
+enabled: true
|
||||
labels:
|
||||
+enabled: true
|
||||
observability:
|
||||
+enabled: true
|
||||
prices:
|
||||
+enabled: true
|
||||
utils:
|
||||
+enabled: true
|
||||
decoder_package:
|
||||
+enabled: false
|
||||
abis:
|
||||
+enabled: true
|
||||
decoded_logs:
|
||||
+enabled: true
|
||||
curated_package:
|
||||
+enabled: false
|
||||
stats:
|
||||
+enabled: true
|
||||
scores_package:
|
||||
+enabled: true
|
||||
|
||||
vars:
|
||||
"dbt_date:time_zone": GMT
|
||||
@ -100,19 +116,19 @@ vars:
|
||||
config:
|
||||
# The keys correspond to dbt profiles and are case sensitive
|
||||
dev:
|
||||
API_INTEGRATION:
|
||||
EXTERNAL_FUNCTION_URI:
|
||||
API_INTEGRATION: AWS_SCROLL_API_STG_V2
|
||||
EXTERNAL_FUNCTION_URI: hx9cb3x9ck.execute-api.us-east-1.amazonaws.com/stg/
|
||||
ROLES:
|
||||
- AWS_LAMBDA_<EVM_CHAIN>_API # replace with the name of the chain
|
||||
- AWS_LAMBDA_SCROLL_API # replace with the name of the chain
|
||||
- INTERNAL_DEV
|
||||
|
||||
prod:
|
||||
API_INTEGRATION:
|
||||
EXTERNAL_FUNCTION_URI:
|
||||
API_INTEGRATION: AWS_SCROLL_API_PROD_V2
|
||||
EXTERNAL_FUNCTION_URI: lni3zgyk91.execute-api.us-east-1.amazonaws.com/prod/
|
||||
ROLES:
|
||||
- AWS_LAMBDA_<EVM_CHAIN>_API # replace with the name of the chain
|
||||
- AWS_LAMBDA_SCROLL_API # replace with the name of the chain
|
||||
- INTERNAL_DEV
|
||||
- DBT_CLOUD_<EVM_CHAIN> # replace with the name of the chain
|
||||
- DBT_CLOUD_SCROLL # replace with the name of the chain
|
||||
|
||||
#### STREAMLINE 2.0 END ####
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{% docs __overview__ %}
|
||||
|
||||
# Welcome to the Flipside Crypto <evm_chain> Models Documentation!
|
||||
# Welcome to the Flipside Crypto scroll Models Documentation!
|
||||
|
||||
## **What does this documentation cover?**
|
||||
The documentation included here details the design of the Core tables and views available via [Flipside Crypto.](https://flipsidecrypto.xyz/) For more information on how these models are built, please see [the github repository.](https://github.com/FlipsideCrypto/<evm_chain>-models)
|
||||
The documentation included here details the design of the Scroll tables and views available via [Flipside Crypto.](https://flipsidecrypto.xyz/) For more information on how these models are built, please see [the github repository.](https://github.com/FlipsideCrypto/scroll-models)
|
||||
|
||||
## **How do I use these docs?**
|
||||
The easiest way to navigate this documentation is to use the Quick Links below. These links will take you to the documentation for each table, which contains a description, a list of the columns, and other helpful information.
|
||||
@ -16,22 +16,32 @@ There is more information on how to use dbt docs in the last section of this doc
|
||||
|
||||
**Click on the links below to jump to the documentation for each schema.**
|
||||
|
||||
### Core Tables (<evm_chain>.core)
|
||||
### Core Tables (scroll.core)
|
||||
|
||||
**Dimension Tables:**
|
||||
- [dim_labels](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.core__dim_labels)
|
||||
- [dim_labels](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__dim_labels)
|
||||
- [dim_contracts](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__dim_contracts)
|
||||
- [dim_contract_abis](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__dim_contract_abis)
|
||||
|
||||
**Fact Tables:**
|
||||
- [fact_blocks](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.core__fact_blocks)
|
||||
- [fact_event_logs](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.core__fact_event_logs)
|
||||
- [fact_transactions](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.core__fact_transactions)
|
||||
- [fact_traces](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.core__fact_traces)
|
||||
- [fact_blocks](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__fact_blocks)
|
||||
- [fact_event_logs](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__fact_event_logs)
|
||||
- [fact_transactions](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__fact_transactions)
|
||||
- [fact_traces](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__fact_traces)
|
||||
|
||||
### Price Tables (<evm_chain>.price)
|
||||
- [dim_asset_metadata](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.price__dim_asset_metadata)
|
||||
- [fact_prices_ohlc_hourly](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.price__fact_prices_ohlc_hourly)
|
||||
- [ez_asset_metadata](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.price__ez_asset_metadata)
|
||||
- [ez_prices_hourly](https://flipsidecrypto.github.io/<evm_chain>-models/#!/model/model.fsc_evm.price__ez_prices_hourly)
|
||||
**Convenience Tables:**
|
||||
- [ez_decoded_event_logs](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__ez_decoded_event_logs)
|
||||
- [ez_native_transfers](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__ez_native_transfers)
|
||||
- [ez_token_transfers](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.core__ez_token_transfers)
|
||||
|
||||
### Price Tables (scroll.price)
|
||||
- [dim_asset_metadata](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.price__dim_asset_metadata)
|
||||
- [fact_prices_ohlc_hourly](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.price__fact_prices_ohlc_hourly)
|
||||
- [ez_asset_metadata](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.price__ez_asset_metadata)
|
||||
- [ez_prices_hourly](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.price__ez_prices_hourly)
|
||||
|
||||
### NFT Tables (scroll.nft)
|
||||
- [ez_nft_transfers](https://flipsidecrypto.github.io/mantle-models/#!/model/model.fsc_evm.nft__ez_nft_transfers)
|
||||
|
||||
## **Helpful User-Defined Functions (UDFs)**
|
||||
|
||||
@ -75,7 +85,7 @@ Note that you can also right-click on models to interactively filter and explore
|
||||
- [Flipside](https://flipsidecrypto.xyz/)
|
||||
- [Data Studio](https://flipsidecrypto.xyz/studio)
|
||||
- [Tutorials](https://docs.flipsidecrypto.com/our-data/tutorials)
|
||||
- [Github](https://github.com/FlipsideCrypto/<evm_chain>-models)
|
||||
- [Github](https://github.com/FlipsideCrypto/scroll-models)
|
||||
- [What is dbt?](https://docs.getdbt.com/docs/introduction)
|
||||
|
||||
{% enddocs %}
|
||||
@ -8,7 +8,8 @@ sources:
|
||||
- name: workflows
|
||||
- name: bronze_streamline
|
||||
database: streamline
|
||||
schema: "{{ target.database }}"
|
||||
schema: |
|
||||
{{ target.database.upper() | replace('_DEV', '') ~ '_DEV' if var("STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES", False) else target.database.upper() | replace('_DEV', '') }}
|
||||
tables:
|
||||
- name: blocks
|
||||
- name: transactions
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
packages:
|
||||
- git: https://github.com/FlipsideCrypto/fsc-evm.git
|
||||
revision: <insert-version>
|
||||
revision: "update/misc-macro-changes"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<evm_chain>:
|
||||
scroll:
|
||||
target: prod
|
||||
outputs:
|
||||
dev:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user