From 6e72fad95e0a44dc1537d128f8c994598928a125 Mon Sep 17 00:00:00 2001 From: drethereum <71602799+drethereum@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:40:04 -0600 Subject: [PATCH] remove (#21) --- .../gold/core/core__ez_decoded_event_logs.sql | 30 --------- .../gold/core/core__ez_decoded_event_logs.yml | 65 ------------------- .../core/core__fact_decoded_event_logs.sql | 20 ------ .../core/core__fact_decoded_event_logs.yml | 49 -------------- 4 files changed, 164 deletions(-) delete mode 100644 models/gold/core/core__ez_decoded_event_logs.sql delete mode 100644 models/gold/core/core__ez_decoded_event_logs.yml delete mode 100644 models/gold/core/core__fact_decoded_event_logs.sql delete mode 100644 models/gold/core/core__fact_decoded_event_logs.yml diff --git a/models/gold/core/core__ez_decoded_event_logs.sql b/models/gold/core/core__ez_decoded_event_logs.sql deleted file mode 100644 index 792e1bf..0000000 --- a/models/gold/core/core__ez_decoded_event_logs.sql +++ /dev/null @@ -1,30 +0,0 @@ -{{ config( - materialized = 'view', - persist_docs ={ "relation": true, - "columns": true } -) }} - -SELECT - block_number, - block_timestamp, - tx_hash, - event_index, - contract_address, - token_name AS contract_name, - event_name, - decoded_flat AS decoded_log, - decoded_data AS full_decoded_log, - origin_function_signature, - origin_from_address, - origin_to_address, - topics, - DATA, - event_removed, - tx_status, - decoded_logs_id AS ez_decoded_event_logs_id, - GREATEST(COALESCE(l.inserted_timestamp, '2000-01-01'), COALESCE(C.inserted_timestamp, '2000-01-01')) AS inserted_timestamp, - GREATEST(COALESCE(l.modified_timestamp, '2000-01-01'), COALESCE(C.modified_timestamp, '2000-01-01')) AS modified_timestamp -FROM - {{ ref('silver__decoded_logs') }} - l - LEFT JOIN {{ ref('silver__contracts') }} C USING (contract_address) diff --git a/models/gold/core/core__ez_decoded_event_logs.yml b/models/gold/core/core__ez_decoded_event_logs.yml deleted file mode 100644 index a1b55fe..0000000 --- a/models/gold/core/core__ez_decoded_event_logs.yml +++ /dev/null @@ -1,65 +0,0 @@ -version: 2 -models: - - name: core__ez_decoded_event_logs - description: > - 'For information on how to submit a contract for decoding, as well as how ABIs are sourced, please visit [here](https://science.flipsidecrypto.xyz/abi-requestor/). - This model contains decoded event logs for contracts that we have an ABI for. Please note, this table does not include all event logs, only those that we have an ABI for. - The `decoded_log` column is the easiest place to query decoded data. It is a JSON object, where the keys are the names of the event parameters, and the values are the values of the event parameters. - You can select from this column using the following sample format, `decoded_log:from::string` or more generally, `decoded_log:::datatype`. See below for a full sample query. - The `full_decoded_logs` column contains the same information, as well as additional fields such as the datatype of the decoded data. You may need to laterally flatten this column to query the data. - - Sample query for USDC Transfer events: - - ```sql - select - tx_hash, - block_number, - contract_address, - decoded_log:from::string as from_address, - decoded_log:to::string as to_address, - decoded_log:value::integer as value - from ethereum.core.fact_decoded_event_logs - where contract_address = lower('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48') - and block_number between 16400000 and 16405000 - and event_name = 'Transfer' - limit 50```' - - columns: - - name: BLOCK_NUMBER - description: '{{ doc("blast_block_number") }}' - - name: BLOCK_TIMESTAMP - description: '{{ doc("blast_block_timestamp") }}' - - name: TX_HASH - description: '{{ doc("blast_logs_tx_hash") }}' - - name: EVENT_INDEX - description: '{{ doc("blast_event_index") }}' - - name: CONTRACT_ADDRESS - description: '{{ doc("blast_logs_contract_address") }}' - - name: CONTRACT_NAME - description: 'The name of the contract, if the contract has a name() function.' - - name: EVENT_NAME - description: 'The name of the event, as defined in the contract ABI.' - - name: DECODED_LOG - description: 'The flattened decoded log, where the keys are the names of the event parameters, and the values are the values of the event parameters.' - - name: FULL_DECODED_LOG - description: 'The full decoded log, including the event name, the event parameters, and the data type of the event parameters.' - - name: ORIGIN_FUNCTION_SIGNATURE - description: '{{ doc("blast_tx_origin_sig") }}' - - name: ORIGIN_FROM_ADDRESS - description: '{{ doc("blast_origin_from") }}' - - name: ORIGIN_TO_ADDRESS - description: '{{ doc("blast_origin_to") }}' - - name: TOPICS - description: '{{ doc("blast_topics") }}' - - name: DATA - description: '{{ doc("blast_logs_data") }}' - - name: EVENT_REMOVED - description: '{{ doc("blast_event_removed") }}' - - name: TX_STATUS - description: '{{ doc("blast_tx_status") }}' - - name: EZ_DECODED_EVENT_LOGS_ID - description: '{{ doc("pk") }}' - - name: INSERTED_TIMESTAMP - description: '{{ doc("inserted_timestamp") }}' - - name: MODIFIED_TIMESTAMP - description: '{{ doc("modified_timestamp") }}' \ No newline at end of file diff --git a/models/gold/core/core__fact_decoded_event_logs.sql b/models/gold/core/core__fact_decoded_event_logs.sql deleted file mode 100644 index 7a2a518..0000000 --- a/models/gold/core/core__fact_decoded_event_logs.sql +++ /dev/null @@ -1,20 +0,0 @@ -{{ config( - materialized = 'view', - persist_docs ={ "relation": true, - "columns": true } -) }} - -SELECT - block_number, - block_timestamp, - tx_hash, - event_index, - contract_address, - event_name, - decoded_flat AS decoded_log, - decoded_data AS full_decoded_log, - decoded_logs_id AS fact_decoded_event_logs_id, - inserted_timestamp, - modified_timestamp -FROM - {{ ref('silver__decoded_logs') }} diff --git a/models/gold/core/core__fact_decoded_event_logs.yml b/models/gold/core/core__fact_decoded_event_logs.yml deleted file mode 100644 index dc25608..0000000 --- a/models/gold/core/core__fact_decoded_event_logs.yml +++ /dev/null @@ -1,49 +0,0 @@ -version: 2 -models: - - name: core__fact_decoded_event_logs - description: > - 'For information on how to submit a contract for decoding, as well as how ABIs are sourced, please visit [here](https://science.flipsidecrypto.xyz/abi-requestor/). - This model contains decoded event logs for contracts that we have an ABI for. Please note, this table does not include all event logs, only those that we have an ABI for. - This table will perform better than the `core__ez_decoded_event_logs` table, but does not include as many columns. - The `decoded_log` column is the easiest place to query decoded data. It is a JSON object, where the keys are the names of the event parameters, and the values are the values of the event parameters. - You can select from this column using the following sample format, `decoded_log:from::string` or more generally, `decoded_log:::datatype`. See below for a full sample query. - The `full_decoded_logs` column contains the same information, as well as additional fields such as the datatype of the decoded data. You may need to laterally flatten this column to query the data. - - Sample query for USDC Transfer events: - ```sql - select - tx_hash, - block_number, - contract_address, - decoded_log:from::string as from_address, - decoded_log:to::string as to_address, - decoded_log:value::integer as value - from ethereum.core.fact_decoded_event_logs - where contract_address = lower('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48') - and block_number between 16400000 and 16405000 - and event_name = 'Transfer' - limit 50```' - - columns: - - name: BLOCK_NUMBER - description: '{{ doc("blast_block_number") }}' - - name: BLOCK_TIMESTAMP - description: '{{ doc("blast_block_timestamp") }}' - - name: TX_HASH - description: '{{ doc("blast_logs_tx_hash") }}' - - name: EVENT_INDEX - description: '{{ doc("blast_event_index") }}' - - name: CONTRACT_ADDRESS - description: '{{ doc("blast_logs_contract_address") }}' - - name: EVENT_NAME - description: 'The name of the event, as defined in the contract ABI.' - - name: DECODED_LOG - description: 'The flattened decoded log, where the keys are the names of the event parameters, and the values are the values of the event parameters.' - - name: FULL_DECODED_LOG - description: 'The full decoded log, including the event name, the event parameters, and the data type of the event parameters.' - - name: FACT_DECODED_EVENT_LOGS_ID - description: '{{ doc("pk") }}' - - name: INSERTED_TIMESTAMP - description: '{{ doc("inserted_timestamp") }}' - - name: MODIFIED_TIMESTAMP - description: '{{ doc("modified_timestamp") }}'