From d39fdac362fcec1aed99e080a95bfd3fb6082cda Mon Sep 17 00:00:00 2001 From: Simon Chow Date: Tue, 20 Feb 2024 12:37:03 -0500 Subject: [PATCH 1/2] Change refundable_fee to resource_fee --- models/docs/sources/history_transactions.md | 2 +- models/marts/enriched_history_operations.sql | 4 ++-- models/marts/enriched_history_operations.yml | 4 ++-- models/sources/src_history_transactions.yml | 4 ++-- models/staging/stg_history_transactions.sql | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/models/docs/sources/history_transactions.md b/models/docs/sources/history_transactions.md index 62d37e7..292a2f9 100644 --- a/models/docs/sources/history_transactions.md +++ b/models/docs/sources/history_transactions.md @@ -171,7 +171,7 @@ A base-64 encoded XDR blob of the tx meta A base-64 encoded XDR blob of the tx fee meta {% enddocs %} -{% docs refundable_fee %} +{% docs resource_fee %} Part of the transaction fee that is refundable for soroban transactions {% enddocs %} diff --git a/models/marts/enriched_history_operations.sql b/models/marts/enriched_history_operations.sql index bbf7e48..36dee84 100644 --- a/models/marts/enriched_history_operations.sql +++ b/models/marts/enriched_history_operations.sql @@ -68,7 +68,7 @@ with , batch_id , batch_run_date , batch_insert_ts - , refundable_fee + , resource_fee , soroban_resources_instructions , soroban_resources_read_bytes , soroban_resources_write_bytes @@ -351,7 +351,7 @@ with , hist_trans.min_account_sequence_age , hist_trans.min_account_sequence_ledger_gap , hist_trans.extra_signers - , hist_trans.refundable_fee + , hist_trans.resource_fee , hist_trans.soroban_resources_instructions , hist_trans.soroban_resources_read_bytes , hist_trans.soroban_resources_write_bytes diff --git a/models/marts/enriched_history_operations.yml b/models/marts/enriched_history_operations.yml index df3b083..8f7b9af 100644 --- a/models/marts/enriched_history_operations.yml +++ b/models/marts/enriched_history_operations.yml @@ -619,8 +619,8 @@ models: - name: contract_code_hash description: '{{ doc("contract_code_hash") }}' - - name: refundable_fee - description: '{{ doc("refundable_fee") }}' + - name: resource_fee + description: '{{ doc("resource_fee") }}' - name: soroban_resources_instructions description: '{{ doc("soroban_resources_instructions") }}' diff --git a/models/sources/src_history_transactions.yml b/models/sources/src_history_transactions.yml index af2e13a..e8fca82 100644 --- a/models/sources/src_history_transactions.yml +++ b/models/sources/src_history_transactions.yml @@ -197,8 +197,8 @@ sources: config: where: batch_run_date > current_datetime - interval 2 day - - name: refundable_fee - description: '{{ doc("refundable_fee") }}' + - name: resource_fee + description: '{{ doc("resource_fee") }}' - name: soroban_resources_instructions description: '{{ doc("soroban_resources_instructions") }}' diff --git a/models/staging/stg_history_transactions.sql b/models/staging/stg_history_transactions.sql index 3d40fdf..546523d 100644 --- a/models/staging/stg_history_transactions.sql +++ b/models/staging/stg_history_transactions.sql @@ -38,7 +38,7 @@ with , tx_result , tx_meta , tx_fee_meta - , refundable_fee + , resource_fee , soroban_resources_instructions , soroban_resources_read_bytes , soroban_resources_write_bytes From ea1d0e2525844c3c154c79124c2d975b5fe1814b Mon Sep 17 00:00:00 2001 From: Simon Chow Date: Tue, 20 Feb 2024 12:44:51 -0500 Subject: [PATCH 2/2] Add in parameters_decoded --- models/marts/enriched_history_operations.sql | 2 ++ models/staging/stg_history_operations.sql | 1 + 2 files changed, 3 insertions(+) diff --git a/models/marts/enriched_history_operations.sql b/models/marts/enriched_history_operations.sql index 36dee84..ddefa85 100644 --- a/models/marts/enriched_history_operations.sql +++ b/models/marts/enriched_history_operations.sql @@ -194,6 +194,7 @@ with , batch_insert_ts , asset_balance_changes , parameters + , parameters_decoded , `function` , address , soroban_operation_type @@ -322,6 +323,7 @@ with , hist_ops.reserve_b_withdraw_amount , hist_ops.asset_balance_changes , hist_ops.parameters + , hist_ops.parameters_decoded , hist_ops.function , hist_ops.address , hist_ops.soroban_operation_type diff --git a/models/staging/stg_history_operations.sql b/models/staging/stg_history_operations.sql index 3773c4f..a0397c6 100644 --- a/models/staging/stg_history_operations.sql +++ b/models/staging/stg_history_operations.sql @@ -119,6 +119,7 @@ with , details.shares , details.asset_balance_changes , details.parameters + , details.parameters_decoded , details.function , details.address , details.type as soroban_operation_type