diff --git a/README.md b/README.md index 129bc6f..57f0966 100644 --- a/README.md +++ b/README.md @@ -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 `` 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 ``, 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 diff --git a/dbt_project.yml b/dbt_project.yml index 22a53ed..f2eb23d 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -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: "_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: "" # 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: - _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: - - -models + - scroll-models - dbt_snowflake_query_tags - dbt @@ -53,7 +53,7 @@ query-comment: # Full documentation: https://docs.getdbt.com/docs/configuring-models models: - _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__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__API # replace with the name of the chain + - AWS_LAMBDA_SCROLL_API # replace with the name of the chain - INTERNAL_DEV - - DBT_CLOUD_ # replace with the name of the chain + - DBT_CLOUD_SCROLL # replace with the name of the chain #### STREAMLINE 2.0 END #### diff --git a/models/__overview__.md b/models/__overview__.md index b2b78ec..1d76e56 100644 --- a/models/__overview__.md +++ b/models/__overview__.md @@ -1,9 +1,9 @@ {% docs __overview__ %} -# Welcome to the Flipside Crypto 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/-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 (.core) +### Core Tables (scroll.core) **Dimension Tables:** -- [dim_labels](https://flipsidecrypto.github.io/-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/-models/#!/model/model.fsc_evm.core__fact_blocks) -- [fact_event_logs](https://flipsidecrypto.github.io/-models/#!/model/model.fsc_evm.core__fact_event_logs) -- [fact_transactions](https://flipsidecrypto.github.io/-models/#!/model/model.fsc_evm.core__fact_transactions) -- [fact_traces](https://flipsidecrypto.github.io/-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 (.price) -- [dim_asset_metadata](https://flipsidecrypto.github.io/-models/#!/model/model.fsc_evm.price__dim_asset_metadata) -- [fact_prices_ohlc_hourly](https://flipsidecrypto.github.io/-models/#!/model/model.fsc_evm.price__fact_prices_ohlc_hourly) -- [ez_asset_metadata](https://flipsidecrypto.github.io/-models/#!/model/model.fsc_evm.price__ez_asset_metadata) -- [ez_prices_hourly](https://flipsidecrypto.github.io/-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/-models) +- [Github](https://github.com/FlipsideCrypto/scroll-models) - [What is dbt?](https://docs.getdbt.com/docs/introduction) {% enddocs %} \ No newline at end of file diff --git a/models/sources.yml b/models/sources.yml index 1b7ec4f..28a3a30 100644 --- a/models/sources.yml +++ b/models/sources.yml @@ -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 diff --git a/packages.yml b/packages.yml index 3563446..42ae788 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,3 @@ packages: - git: https://github.com/FlipsideCrypto/fsc-evm.git - revision: + revision: "update/misc-macro-changes" diff --git a/profiles.yml b/profiles.yml index 229f691..457db4b 100644 --- a/profiles.yml +++ b/profiles.yml @@ -1,4 +1,4 @@ -: +scroll: target: prod outputs: dev: