From 7d4fb479d132f1e00068c44caf7102f0c78c5088 Mon Sep 17 00:00:00 2001 From: Peter <49856481+peterrliem@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:48:24 +0700 Subject: [PATCH 1/3] Create tokens_ronin_base_transfers.sql --- .../ronin/tokens_ronin_base_transfers.sql | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_base_transfers.sql diff --git a/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_base_transfers.sql b/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_base_transfers.sql new file mode 100644 index 00000000000..7acfee538e3 --- /dev/null +++ b/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_base_transfers.sql @@ -0,0 +1,20 @@ +{{config( + schema = 'tokens_ronin', + alias = 'base_transfers', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], + unique_key = ['block_date','unique_key'], +) +}} + +{{transfers_base( + blockchain='ronin', + traces = source('ronin','traces'), + transactions = source('ronin','transactions'), + erc20_transfers = source('erc20_ronin','evt_transfer'), + native_contract_address = null +) +}} From 2f763fedaccaadc9b0f019f9ad5db8f9cb9f38fe Mon Sep 17 00:00:00 2001 From: Peter <49856481+peterrliem@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:52:10 +0700 Subject: [PATCH 2/3] Create Ronin Transfers --- .../ronin/tokens_ronin_transfers.sql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql diff --git a/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql b/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql new file mode 100644 index 00000000000..67ac0647273 --- /dev/null +++ b/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql @@ -0,0 +1,26 @@ +{{config( + schema = 'tokens_ronin', + alias = 'transfers', + partition_by = ['block_month'], + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['block_date','unique_key'], + incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_date')], + post_hook='{{ expose_spells(\'["ronin"]\', + "sector", + "tokens", + \'["aalan3", "jeff-dude"]\') }}' +) +}} + +{{ + transfers_enrich( + base_transfers = ref('tokens_ronin_base_transfers') + , tokens_erc20_model = source('tokens', 'erc20') + , prices_model = source('prices', 'usd') + , evms_info_model = source('evms','info') + , transfers_start_date = '2021-01-24' + , blockchain = 'ronin' + ) +}} From d9d982a3dbb77f6cced61b46fca4960956c0a9f3 Mon Sep 17 00:00:00 2001 From: Peter <49856481+peterrliem@users.noreply.github.com> Date: Tue, 12 Nov 2024 00:11:07 +0700 Subject: [PATCH 3/3] Added authorship --- .../transfers_and_balances/ronin/tokens_ronin_transfers.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql b/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql index 67ac0647273..55a7b18657c 100644 --- a/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql +++ b/dbt_subprojects/tokens/models/transfers_and_balances/ronin/tokens_ronin_transfers.sql @@ -10,7 +10,7 @@ post_hook='{{ expose_spells(\'["ronin"]\', "sector", "tokens", - \'["aalan3", "jeff-dude"]\') }}' + \'["aalan3", "jeff-dude", "peterrliem"]\') }}' ) }}