Skip to main content
Schema: aptos.core Table: fact_events Type: View

Description

This table contains flattened events from Aptos blockchain transactions, providing a comprehensive view of all events emitted during transaction execution. Events are the primary mechanism for smart contracts to communicate state changes and important occurrences to external observers. Each event represents a discrete occurrence within a transaction, such as token transfers, contract interactions, or state modifications, with a unique index within its parent transaction. This table enables detailed analysis of blockchain activity and smart contract behavior.

Key Use Cases

  • Event-driven analytics and smart contract interaction monitoring
  • Token transfer event analysis and flow tracking
  • DeFi protocol event monitoring and activity analysis
  • Contract interaction pattern recognition and behavior analysis
  • Event-based alerting and real-time monitoring
  • Smart contract debugging and event emission analysis

Important Relationships

  • Provides event context for transaction analysis in core.fact_transactions
  • Links to transfer data in core.fact_transfers and core.ez_transfers for comprehensive flow analysis
  • Supports state change analysis in core.fact_changes with event correlation
  • Enables event-driven analytics across all core models
  • Provides foundation for DeFi and NFT event analysis

Commonly-used Fields

  • tx_hash: Essential for linking events to their parent transactions
  • event_index: Unique identifier for ordering events within a transaction
  • event_type: Critical for categorizing and filtering different types of events
  • event_address: Primary field for identifying the contract that emitted the event
  • event_module and event_resource: Important for understanding the event source
  • event_data: Essential for analyzing the specific event payload and parameters
  • account_address: Key for identifying the account associated with the event
  • block_timestamp: Primary field for time-series analysis of events

Columns

Column NameData TypeDescription
BLOCK_NUMBERNUMBERAlso known as block height. The block number indicates the position of a block in the blockchain, increasing sequentially after the addition of each new block.
Data type: Integer Example:
  • 12345678
  • 98765432
Business Context:
  • Primary identifier for ordering and filtering blockchain data chronologically.
  • Essential for block-level analysis and network growth tracking.
  • Enables correlation of transactions, transfers, and events to specific blocks. | | BLOCK_TIMESTAMP | TIMESTAMP_NTZ | The date and time at which the block was produced on the Aptos blockchain.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Primary field for time-series analysis and temporal filtering of blockchain activity.
  • Essential for trend analysis, volume calculations, and historical comparisons.
  • Enables time-based grouping and aggregation for analytics and reporting. | | VERSION | NUMBER | The version number, also known as the height, represents the sequential position of a transaction in the Aptos blockchain. The first transaction has a version of 0, and each subsequent transaction increments by 1.
Data type: Integer Example:
  • 0 (genesis transaction)
  • 12345678
  • 98765432
Business Context:
  • Unique identifier for ordering transactions chronologically across the entire blockchain.
  • Essential for transaction sequencing and version-based analysis.
  • Enables precise transaction tracking and blockchain state verification. | | TX_HASH | TEXT | Transaction hash is a unique 66-character identifier that is generated when a transaction is executed on the Aptos blockchain.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Primary identifier for linking transaction data across all related tables.
  • Essential for transaction verification and blockchain explorer lookups.
  • Enables correlation of transfers, events, and state changes to specific transactions. | | SUCCESS | BOOLEAN | The boolean value indicating whether the transaction was successfully executed on the Aptos blockchain.
Data type: Boolean Example:
  • true (transaction succeeded)
  • false (transaction failed)
Business Context:
  • Essential for filtering successful transactions and analyzing failure rates.
  • Critical for accurate volume calculations and user experience analysis.
  • Enables debugging and error pattern recognition in transaction analysis. | | TX_TYPE | TEXT | The type of transaction executed on the Aptos blockchain, categorizing transactions by their purpose and origin.
Data type: String Example:
  • user_transaction (regular user-initiated transactions)
  • block_metadata_transaction (system transactions for block metadata)
  • state_checkpoint_transaction (system transactions for state checkpoints)
Business Context:
  • Essential for filtering and categorizing different types of blockchain activity.
  • Critical for separating user activity from system operations in analytics.
  • Enables focused analysis on specific transaction categories and use cases. | | PAYLOAD_FUNCTION | TEXT | The specific function being called within the transaction payload, identifying the smart contract method to be executed.
Data type: String Example:
  • 0x1::coin::transfer
  • 0x1::coin::register
  • 0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::coin::mint
Business Context:
  • Essential for categorizing transactions by function type and smart contract interaction.
  • Critical for DeFi protocol analysis and function call pattern recognition.
  • Enables transaction filtering and specific function usage analytics. | | EVENT_INDEX | NUMBER | Unique identifier for an event within a transaction, representing the sequential order of events emitted during transaction execution.
Data type: Integer Example:
  • 0 (first event in transaction)
  • 1 (second event in transaction)
  • 5 (sixth event in transaction)
Business Context:
  • Essential for determining the chronological order of events within a transaction.
  • Critical for event correlation and transaction flow analysis.
  • Enables precise event sequencing and debugging of complex transactions. | | EVENT_TYPE | TEXT | The full three-part descriptive type of an event, consisting of the event_address, event_module, and event_resource identifiers.
Data type: String Example:
  • 0x1::coin::DepositEvent
  • 0x1::coin::WithdrawEvent
  • 0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::coin::DepositEvent
Business Context:
  • Essential for categorizing and filtering events by their type and source.
  • Critical for DeFi protocol analysis and event-driven analytics.
  • Enables pattern recognition and event correlation across different contracts. | | EVENT_ADDRESS | TEXT | The first segment of the event type, representing the account address that emitted the event.
Data type: String Example:
  • 0x1
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Essential for identifying the source account that emitted the event.
  • Critical for event source analysis and account event tracking.
  • Enables event source analytics and account-based event correlation. | | EVENT_MODULE | TEXT | The second segment of the event type, representing the module that emitted the event.
Data type: String Example:
  • coin
  • staking
  • governance
Business Context:
  • Essential for identifying the module that emitted the event.
  • Critical for module-based event analysis and protocol tracking.
  • Enables module-specific analytics and protocol event correlation. | | EVENT_RESOURCE | TEXT | The third segment of the event type, representing the specific resource or event name.
Data type: String Example:
  • DepositEvent
  • WithdrawEvent
  • TransferEvent
Business Context:
  • Essential for identifying the specific event type and resource.
  • Critical for event categorization and specific event analysis.
  • Enables resource-specific analytics and event type correlation. | | EVENT_DATA | VARIANT | The data object within this event, containing the specific information and parameters of the event.
Data type: String (JSON) Example:
  • {"amount":"1000000","account":"0x123..."}
  • {"token_id":"123","owner":"0x456..."}
Business Context:
  • Essential for understanding the specific data and parameters in events.
  • Critical for event analysis and event parameter tracking.
  • Enables detailed event analytics and parameter-based reporting. | | ACCOUNT_ADDRESS | TEXT | The top-level account address associated with this event, representing the primary account involved in the event.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Essential for identifying the primary account involved in events.
  • Critical for account-based event analysis and activity tracking.
  • Enables account-centric analytics and event correlation. | | CREATION_NUMBER | NUMBER | Creation number corresponding to the event stream originating from the given account, representing the order of events emitted by that account.
Data type: Integer Example:
  • 0 (first event from account)
  • 5 (6th event from account)
  • 25 (26th event from account)
Business Context:
  • Essential for event ordering and account event stream analysis.
  • Critical for event correlation and account activity tracking.
  • Enables event-based analytics and account behavior analysis. | | SEQUENCE_NUMBER | NUMBER | The sequence number for an account indicates the number of transactions that have been submitted and committed on-chain from that account, incremented with each executed or aborted transaction.
Data type: Integer Example:
  • 0 (first transaction from account)
  • 10 (11th transaction from account)
  • 100 (101st transaction from account)
Business Context:
  • Essential for transaction ordering and account activity tracking.
  • Critical for preventing replay attacks and ensuring transaction uniqueness.
  • Enables account-based analytics and transaction sequence analysis. | | FACT_EVENTS_ID | TEXT | The unique primary key identifier for each row in the table, ensuring data integrity and uniqueness.
Data type: String Example:
  • 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Business Context:
  • Essential for data integrity and unique row identification.
  • Critical for join operations and data relationship management.
  • Enables precise data retrieval and referential integrity maintenance. | | INSERTED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the row was inserted into the table, representing when the data was first recorded.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Essential for data lineage tracking and insertion timing analysis.
  • Critical for understanding data freshness and processing delays.
  • Enables data quality analysis and processing performance monitoring. | | MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | The UTC timestamp when the row was last modified, representing when the data was most recently updated.
Data type: Timestamp Example:
  • 2024-01-15 14:30:25.123456
Business Context:
  • Essential for data freshness analysis and update tracking.
  • Critical for understanding data modification patterns and change frequency.
  • Enables data quality monitoring and update performance analysis. |