add signer (#891)
Some checks failed
docs_update / run_dbt_jobs (push) Has been cancelled
docs_update / notify-failure (push) Has been cancelled
dbt_run_streamline_solscan_token_list / run_dbt_jobs (push) Has been cancelled
dbt_run_streamline_solscan_token_list / notify-failure (push) Has been cancelled
dbt_test_scheduled_weekly / run_dbt_jobs (push) Has been cancelled
dbt_test_scheduled_weekly / notify-failure (push) Has been cancelled
dbt_test_scheduled / run_dbt_jobs (push) Has been cancelled
dbt_run_idls_history / run_dbt_jobs (push) Has been cancelled
dbt_run_streamline_validator_vote_program_accounts_snapshot / run_dbt_jobs (push) Has been cancelled
dbt_run_streamline_validator_vote_accounts_snapshot / run_dbt_jobs (push) Has been cancelled
dbt_run_streamline_validator_metadata_snapshot / run_dbt_jobs (push) Has been cancelled
dbt_run_streamline_validators_list_snapshot / run_dbt_jobs (push) Has been cancelled
dbt_run_scheduled_daily / run_dbt_jobs (push) Has been cancelled
dbt_run_macro_get_compressed_nft / run_dbt_jobs (push) Has been cancelled
dbt_run_helius_metadata / run_dbt_jobs (push) Has been cancelled
dbt_test_intraday / run_dbt_jobs (push) Has been cancelled
dbt_run_dev_refresh / run_dbt_jobs (push) Has been cancelled
dbt_run_macro_get_block_production / run_dbt_jobs (push) Has been cancelled
dbt_test_scheduled_hourly / run_dbt_jobs (push) Has been cancelled
dbt_run_batch_backfill / run_dbt_jobs (push) Has been cancelled
dbt_test_scheduled / notify-failure (push) Has been cancelled
dbt_run_idls_history / notify-failure (push) Has been cancelled
dbt_run_streamline_validator_vote_program_accounts_snapshot / notify-failure (push) Has been cancelled
dbt_run_streamline_validator_vote_accounts_snapshot / notify-failure (push) Has been cancelled
dbt_run_streamline_validator_metadata_snapshot / notify-failure (push) Has been cancelled
dbt_run_streamline_validators_list_snapshot / notify-failure (push) Has been cancelled
dbt_run_scheduled_daily / notify-failure (push) Has been cancelled
dbt_run_macro_get_compressed_nft / notify-failure (push) Has been cancelled
dbt_run_helius_metadata / notify-failure (push) Has been cancelled
dbt_test_intraday / notify-failure (push) Has been cancelled
dbt_run_macro_get_block_production / notify-failure (push) Has been cancelled
dbt_test_scheduled_hourly / notify-failure (push) Has been cancelled
dbt_run_full_observability / run_dbt_jobs (push) Has been cancelled
dbt_run_full_observability / notify-failure (push) Has been cancelled

This commit is contained in:
tarikceric 2025-11-18 20:54:09 +01:00 committed by GitHub
parent 226615c4e6
commit ec4ff66c24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 1 deletions

View File

@ -26,6 +26,7 @@ WITH liquid_staking_actions AS (
tx_id,
index,
inner_index,
signer,
action_type,
provider_address,
deposit_amount,
@ -59,6 +60,7 @@ SELECT
a.tx_id,
a.index,
a.inner_index,
a.signer,
a.action_type,
a.provider_address,
a.deposit_amount,

View File

@ -40,6 +40,11 @@ models:
description: "{{ doc('inner_index') }}"
tests:
- dbt_expectations.expect_column_to_exist
- name: SIGNER
description: "{{ doc('signer') }}"
tests:
- dbt_expectations.expect_column_to_exist
- not_null: *recent_date_filter
- name: ACTION_TYPE
description: "{{ doc('action') }}"
tests:

View File

@ -13,7 +13,16 @@
{% set base_query %}
CREATE OR REPLACE TEMPORARY TABLE silver.marinade_liquid_staking_actions__intermediate_tmp AS
SELECT
*
block_id,
block_timestamp,
tx_id,
index,
inner_index,
signers[0]::STRING AS signer,
program_id,
decoded_instruction,
event_type,
_inserted_timestamp
FROM
{{ ref('silver__decoded_instructions_combined') }}
WHERE
@ -100,6 +109,7 @@ deposits AS (
a.tx_id,
a.index,
a.inner_index,
a.signer,
a.event_type AS action_type,
CASE
WHEN a.event_type = 'deposit' THEN silver.udf_get_account_pubkey_by_name('transferFrom', decoded_instruction:accounts)
@ -134,6 +144,7 @@ order_unstakes AS (
tx_id,
index,
inner_index,
signer,
event_type AS action_type,
silver.udf_get_account_pubkey_by_name('burnMsolAuthority', decoded_instruction:accounts) AS provider_address,
(decoded_instruction:args:msolAmount::int) * pow(10, -9) AS msol_burned,
@ -151,6 +162,7 @@ claims AS (
a.tx_id,
a.index,
a.inner_index,
a.signer,
a.event_type AS action_type,
silver.udf_get_account_pubkey_by_name('transferSolTo', a.decoded_instruction:accounts) AS provider_address,
b.amount AS claim_amount,
@ -175,6 +187,7 @@ SELECT
tx_id,
index,
inner_index,
signer,
action_type,
provider_address,
deposit_amount,
@ -196,6 +209,7 @@ SELECT
tx_id,
index,
inner_index,
signer,
action_type,
provider_address,
NULL AS deposit_amount,
@ -217,6 +231,7 @@ SELECT
tx_id,
index,
inner_index,
signer,
action_type,
provider_address,
NULL AS deposit_amount,