Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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() %}
Expand Down Expand Up @@ -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 %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) %}
Expand Down
2 changes: 1 addition & 1 deletion macros/global/variables/project_vars/mantle_vars.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
19 changes: 19 additions & 0 deletions macros/global/variables/project_vars/mezo_vars.sql
Original file line number Diff line number Diff line change
@@ -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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -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']
) }}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{{ config(
materialized = 'table',
tags = ['silver','gha_tasks','phase_1']
tags = ['silver','gha_tasks']
) }}

SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{{ config(
materialized = 'view',
tags = ['silver','gha_tasks','phase_1']
tags = ['silver','gha_tasks']
) }}

SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{{ config(
materialized = 'view',
tags = ['silver','gha_tasks','phase_1']
tags = ['silver','gha_tasks']
) }}

SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{{ config(
materialized = 'table',
tags = ['silver','gha_tasks','phase_1']
tags = ['silver','gha_tasks']
) }}

WITH workflows AS (
Expand Down