update log general columns

This commit is contained in:
mattromano 2025-07-07 17:21:45 -07:00
parent 32cc60bd8d
commit f836b5c1b2
21 changed files with 112 additions and 51 deletions

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -13,7 +13,7 @@ models:
- name: CONTRACT_ADDRESS
description: '{{ doc("ez_dex_swaps_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: AMOUNT_IN
description: '{{ doc("ez_dex_swaps_amount_in") }}'
- name: AMOUNT_OUT
@ -45,7 +45,7 @@ models:
- name: PROTOCOL_VERSION
description: '{{ doc("ez_dex_swaps_protocol_version") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -17,11 +17,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: STAKER
description: '{{ doc("ez_liquid_staking_staker") }}'
- name: PLATFORM

View File

@ -17,11 +17,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: STAKER
description: '{{ doc("ez_liquid_staking_staker") }}'
- name: PLATFORM

View File

@ -11,7 +11,7 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: EVENT_TYPE
description: '{{ doc("ez_nft_sales_event_type") }}'
- name: PLATFORM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,9 +11,9 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: EDGE_EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: USER_EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: EDGE_DIGEST
description: '{{ doc("vertex_digest") }}'
- name: USER_DIGEST

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -11,11 +11,11 @@ models:
- name: TX_HASH
description: '{{ doc("general_tx_hash") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: ORIGIN_FUNCTION_SIGNATURE
description: '{{ doc("general_origin_function_signature") }}'
- name: ORIGIN_FROM_ADDRESS

View File

@ -13,9 +13,9 @@ models:
- name: TX_POSITION
description: '{{ doc("general_tx_position") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: TOPICS
description: '{{ doc("fact_event_logs_topics") }}'
- name: TOPIC_0
@ -39,7 +39,7 @@ models:
- name: TX_SUCCEEDED
description: '{{ doc("general_tx_succeeded") }}'
- name: EVENT_NAME
description: '{{ doc("ez_decoded_event_logs_event_name") }}'
description: '{{ doc("general_event_name") }}'
- name: FULL_DECODED_LOG
description: '{{ doc("ez_decoded_event_logs_full_decoded_log") }}'
- name: DECODED_LOG

View File

@ -335,4 +335,65 @@ Boolean indicator of transaction success.
- TRUE: Transaction executed successfully
- FALSE: Transaction failed/reverted
{% enddocs %}
{% docs general_event_index %}
Zero-based sequential position of the event within a transaction's execution.
**Key Facts**:
- Starts at 0 for first event
- Increments across all contracts in transaction
- Preserves execution order
- Essential for deterministic event ordering
**Usage Example**:
```sql
-- Trace event execution flow
SELECT
event_index,
contract_address,
topic_0,
SUBSTRING(data, 1, 10) AS data_preview
FROM <blockchain_name>.core.fact_event_logs
WHERE tx_hash = '0xabc...'
ORDER BY event_index;
```
{% enddocs %}
{% docs general_contract_address %}
Smart contract address that emitted this event or received the transaction.
**Key Points**:
- Always the immediate event emitter for logs
- May differ from transaction to_address
- Lowercase normalized format
- Never NULL for valid events
{% enddocs %}
{% docs general_event_name %}
The event name as defined in the contract's ABI.
**Format**: PascalCase event identifier
**Examples**:
- `Transfer` - Token transfers
- `Swap` - DEX trades
- `OwnershipTransferred` - Admin changes
- `Approval` - Token approvals
**Usage Pattern**:
```sql
-- Find all event types for a contract
SELECT DISTINCT event_name, COUNT(*) as occurrences
FROM ez_decoded_event_logs
WHERE contract_address = LOWER('0x...')
GROUP BY 1
ORDER BY 2 DESC;
```
{% enddocs %}

View File

@ -13,7 +13,7 @@ models:
- name: TX_POSITION
description: '{{ doc("general_tx_position") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: FROM_ADDRESS
description: '{{ doc("ez_token_transfers_from_address") }}'
- name: TO_ADDRESS

View File

@ -13,9 +13,9 @@ models:
- name: TX_POSITION
description: '{{ doc("general_tx_position") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: CONTRACT_ADDRESS
description: '{{ doc("fact_event_logs_contract_address") }}'
description: '{{ doc("general_contract_address") }}'
- name: TOPICS
description: '{{ doc("fact_event_logs_topics") }}'
- name: TOPIC_0

View File

@ -13,7 +13,7 @@ models:
- name: TX_POSITION
description: '{{ doc("general_tx_position") }}'
- name: EVENT_INDEX
description: '{{ doc("fact_event_logs_event_index") }}'
description: '{{ doc("general_event_index") }}'
- name: INTRA_EVENT_INDEX
description: '{{ doc("ez_nft_transfers_intra_event_index") }}'
- name: TOKEN_TRANSFER_TYPE