diff --git a/macros/global/variables/dynamic_gold_models/call_sample_rpc_node.sql b/macros/global/variables/dynamic_gold_models/call_sample_rpc_node.sql index ce437e673..d821dc296 100644 --- a/macros/global/variables/dynamic_gold_models/call_sample_rpc_node.sql +++ b/macros/global/variables/dynamic_gold_models/call_sample_rpc_node.sql @@ -5,7 +5,8 @@ random_block_sample_size=none, vault_path_override=none, node_url_override=none, - exclude_traces=true + exclude_traces=true, + sample_blocks_override=none ) %} {% set vars = return_vars() %} @@ -41,6 +42,9 @@ CALL {{ target_db }}.admin.sample_rpc_node( {% if exclude_traces is not none %}, EXCLUDE_TRACES => {{ exclude_traces }} {% endif %} + {% if sample_blocks_override is not none %}, + SAMPLE_BLOCKS_OVERRIDE => ARRAY_CONSTRUCT({{ sample_blocks_override | join(", ") }}) + {% endif %} ) {% endset %} diff --git a/macros/global/variables/dynamic_gold_models/create_sample_rpc_node_sp.sql b/macros/global/variables/dynamic_gold_models/create_sample_rpc_node_sp.sql index f52ba2721..c1af97ec7 100644 --- a/macros/global/variables/dynamic_gold_models/create_sample_rpc_node_sp.sql +++ b/macros/global/variables/dynamic_gold_models/create_sample_rpc_node_sp.sql @@ -36,7 +36,8 @@ RANDOM_BLOCK_SAMPLE_SIZE NUMBER DEFAULT 50, VAULT_PATH_OVERRIDE STRING DEFAULT NULL, NODE_URL_OVERRIDE STRING DEFAULT NULL, - EXCLUDE_TRACES BOOLEAN DEFAULT TRUE + EXCLUDE_TRACES BOOLEAN DEFAULT TRUE, + SAMPLE_BLOCKS_OVERRIDE ARRAY DEFAULT NULL ) RETURNS VARIANT LANGUAGE SQL @@ -98,6 +99,10 @@ SELECT block_num as random_num FROM recent_blocks UNION ALL SELECT block_num as random_num FROM random_blocks + UNION ALL + SELECT value::number as random_num + FROM TABLE(FLATTEN(input => :SAMPLE_BLOCKS_OVERRIDE)) + WHERE :SAMPLE_BLOCKS_OVERRIDE IS NOT NULL ), block_range as ( SELECT array_agg(random_num) as block_range FROM random_numbers @@ -345,9 +350,9 @@ {% do run_query(sp_compatibility_check_sql) %} {% set permissions_sql %} grant usage on schema admin to internal_dev; - grant usage on procedure admin.sample_rpc_node(string, string, string, number, string, string, boolean) to role internal_dev; + grant usage on procedure admin.sample_rpc_node(string, string, string, number, string, string, boolean, array) to role internal_dev; grant usage on schema admin to dbt_cloud_fsc_evm; - grant usage on procedure admin.sample_rpc_node(string, string, string, number, string, string, boolean) to role dbt_cloud_fsc_evm; + grant usage on procedure admin.sample_rpc_node(string, string, string, number, string, string, boolean, array) to role dbt_cloud_fsc_evm; {% endset %} {% do run_query(permissions_sql) %} diff --git a/macros/global/variables/project_vars/mantle_vars.sql b/macros/global/variables/project_vars/mantle_vars.sql index 610016d63..84392c9fc 100644 --- a/macros/global/variables/project_vars/mantle_vars.sql +++ b/macros/global/variables/project_vars/mantle_vars.sql @@ -2,7 +2,7 @@ {% set vars = { 'GLOBAL_PROJECT_NAME': 'mantle', 'GLOBAL_NODE_PROVIDER': 'quicknode', - 'GLOBAL_NODE_VAULT_PATH': 'Vault/prod/mantle/quicknode/mainnet', + 'GLOBAL_NODE_VAULT_PATH': 'Vault/prod/evm/quicknode/mantle/mainnet', 'GLOBAL_WRAPPED_NATIVE_ASSET_ADDRESS': '0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8', 'MAIN_SL_BLOCKS_PER_HOUR': 1800, 'MAIN_PRICES_NATIVE_SYMBOLS': ['ETH', 'MNT'], diff --git a/macros/global/variables/project_vars/mezo_vars.sql b/macros/global/variables/project_vars/mezo_vars.sql new file mode 100644 index 000000000..f919e444a --- /dev/null +++ b/macros/global/variables/project_vars/mezo_vars.sql @@ -0,0 +1,19 @@ +{% macro mezo_vars() %} + {% set vars = { + 'GLOBAL_PROJECT_NAME': 'mezo', + 'GLOBAL_NODE_PROVIDER': 'imperator', + 'GLOBAL_NODE_URL': '{URL}', + 'GLOBAL_NODE_VAULT_PATH': 'Vault/prod/evm/imperator/mezo/mainnet', + 'MAIN_SL_BLOCKS_PER_HOUR': 1000, + 'MAIN_CORE_RECEIPTS_BY_HASH_ENABLED': true, + 'MAIN_PRICES_NATIVE_SYMBOLS': 'BTC', + 'MAIN_PRICES_NATIVE_BLOCKCHAINS': 'bitcoin', + 'MAIN_PRICES_PROVIDER_PLATFORMS': 'Mezo', + 'DECODER_SILVER_CONTRACT_ABIS_EXPLORER_NAME': 'MezoExplorer', + 'DECODER_SL_CONTRACT_ABIS_EXPLORER_URL': 'https://api.explorer.mezo.org/api/v2/smart-contracts/', + 'MAIN_GHA_STREAMLINE_CHAINHEAD_CRON': '22,52 * * * *', + 'MAIN_GHA_SCHEDULED_SCORES_CRON': '5 5 * * *' + } %} + + {{ return(vars) }} +{% endmacro %} diff --git a/models/main_package/core/streamline/history/streamline__receipts_by_hash_history.sql b/models/main_package/core/streamline/history/streamline__receipts_by_hash_history.sql index 0622367d9..c3bb966f4 100644 --- a/models/main_package/core/streamline/history/streamline__receipts_by_hash_history.sql +++ b/models/main_package/core/streamline/history/streamline__receipts_by_hash_history.sql @@ -7,7 +7,7 @@ {# Set up dbt configuration #} {{ config ( materialized = "view", - tags = ['streamline','core','history','receipts_by_hash','phase_1'] + tags = ['streamline','core','history','receipts_by_hash'] ) }} diff --git a/models/main_package/core/streamline/realtime/streamline__receipts_by_hash_realtime.sql b/models/main_package/core/streamline/realtime/streamline__receipts_by_hash_realtime.sql index 71ca5f29b..51641caec 100644 --- a/models/main_package/core/streamline/realtime/streamline__receipts_by_hash_realtime.sql +++ b/models/main_package/core/streamline/realtime/streamline__receipts_by_hash_realtime.sql @@ -7,7 +7,7 @@ {# Set up dbt configuration #} {{ config ( materialized = "view", - tags = ['streamline','core','realtime','receipts_by_hash','phase_1'] + tags = ['streamline','core','realtime','receipts_by_hash'] ) }} {# Main query starts here #} diff --git a/models/main_package/github_actions/github_actions__relevant_workflows.sql b/models/main_package/github_actions/github_actions__relevant_workflows.sql index 90cd9af57..821d22d13 100644 --- a/models/main_package/github_actions/github_actions__relevant_workflows.sql +++ b/models/main_package/github_actions/github_actions__relevant_workflows.sql @@ -6,7 +6,7 @@ {{ config( materialized = 'table', - tags = ['silver','gha_tasks','phase_1'] + tags = ['silver','gha_tasks'] ) }} SELECT diff --git a/models/main_package/github_actions/github_actions__task_current.sql b/models/main_package/github_actions/github_actions__task_current.sql index af8c54c83..b2824f170 100644 --- a/models/main_package/github_actions/github_actions__task_current.sql +++ b/models/main_package/github_actions/github_actions__task_current.sql @@ -3,7 +3,7 @@ {{ config( materialized = 'view', - tags = ['silver','gha_tasks','phase_1'] + tags = ['silver','gha_tasks'] ) }} SELECT diff --git a/models/main_package/github_actions/github_actions__task_history.sql b/models/main_package/github_actions/github_actions__task_history.sql index 3a80a1140..70033953c 100644 --- a/models/main_package/github_actions/github_actions__task_history.sql +++ b/models/main_package/github_actions/github_actions__task_history.sql @@ -3,7 +3,7 @@ {{ config( materialized = 'view', - tags = ['silver','gha_tasks','phase_1'] + tags = ['silver','gha_tasks'] ) }} SELECT diff --git a/models/main_package/github_actions/github_actions__workflow_schedule.sql b/models/main_package/github_actions/github_actions__workflow_schedule.sql index 6b6492cb0..a97e137dc 100644 --- a/models/main_package/github_actions/github_actions__workflow_schedule.sql +++ b/models/main_package/github_actions/github_actions__workflow_schedule.sql @@ -6,7 +6,7 @@ {{ config( materialized = 'table', - tags = ['silver','gha_tasks','phase_1'] + tags = ['silver','gha_tasks'] ) }} WITH workflows AS (