Skip to main content
Schema: near.core Table: fact_receipts Type: View

Description

This table contains all receipt execution outcomes on the NEAR Protocol blockchain, capturing the results of transaction processing including gas consumption, execution status, logs, and cross-contract communication details. Receipts represent the execution units in NEAR’s sharding architecture and contain the actual state changes, function calls, and event emissions that occur during transaction processing. This table provides the foundation for understanding smart contract execution, cross-shard communication, and the complete transaction lifecycle from submission to final state changes.

Key Use Cases

  • Smart contract execution analysis and performance monitoring
  • Cross-contract call tracking and dependency analysis
  • Gas consumption analysis and optimization studies
  • Execution failure investigation and error pattern analysis
  • Cross-shard transaction flow analysis and sharding efficiency
  • Event log analysis and contract interaction patterns
  • State change tracking and account balance analysis

Important Relationships

  • Links to core.fact_transactions through tx_hash for transaction context
  • Connects to core.fact_blocks through block_id for temporal context
  • Provides execution context for core.fact_logs and core.fact_token_transfers
  • Supports core.ez_actions for detailed action-level analysis
  • Enables analysis in defi.ez_dex_swaps and defi.ez_bridge_activity through receipt outcomes
  • Powers stats.ez_core_metrics_hourly for aggregated execution metrics

Commonly-used Fields

  • receipt_id: Essential for unique receipt identification and execution tracking
  • block_timestamp: Primary field for time-series analysis and trend detection
  • receiver_id and predecessor_id: Critical for cross-contract call analysis and flow tracking
  • gas_burnt: Important for gas consumption analysis and cost optimization
  • receipt_succeeded: Essential for success rate analysis and failure investigation
  • logs: Critical for event analysis and contract interaction patterns
  • outcome: Important for detailed execution analysis and state change tracking

Columns

Column NameData TypeDescription
BLOCK_TIMESTAMPTIMESTAMP_NTZThe date and time at which the block began.
BLOCK_IDNUMBERThe height of the chain this block corresponds with.
TX_HASHTEXTUnique identifier (hash) of this transaction.
RECEIPT_IDTEXTThe identifying hash for a receipt.
RECEIPT_OUTCOME_IDARRAYUnique identifier(s) (array) of the remaining receipt outcomes for this transaction. This list will not include the record’s own receipt id, but will list the subsequent receipts within the transaction.
RECEIVER_IDTEXTAccount reacting to the receipt from predecessor_id, can be relay, a contract, or a user of a relay, etc. This field identifies the account that is processing the receipt and executing the associated action. In most cases, this is a smart contract that is being called, but it can also be a user account in relay transactions or the system account for certain operations. This differs from tx_receiver and is specific to the receipt being processed.
PREDECESSOR_IDTEXTAccount that called the relevant receipt (often the same as tx_signer, but can be system as well). This field identifies the account that directly invoked the receipt being processed. In simple transactions, this is typically the same as the transaction signer. However, in cross-contract calls or system operations, this may be a different account or the system account. This is crucial for understanding the call chain and access control in NEAR’s execution model.
ACTIONSVARIANTThe actions executed during the receipt or transaction processing.
OUTCOMEVARIANTThe outcome of the transaction, action, or receipt that was executed in the shard.
GAS_BURNTNUMBERGas burned for the receipt action. This field represents the amount of computational resources consumed specifically for the receipt being processed. Gas burning is the mechanism by which NEAR charges for computational work, and this field tracks the exact amount burned for this particular receipt action. In raw number format with 16 decimal places, to adjust divide by POW(10,16) or multiply by 1e-16.
STATUS_VALUEVARIANTStatus information (object) for this transaction.
LOGSARRAYLogs (array) for this receipt.
PROOFARRAYProof (array) for this transaction.
METADATAVARIANTMetadata (object) for this transaction. May be null, especially for Near Social Widgets.
RECEIPT_SUCCEEDEDBOOLEAN
FACT_RECEIPTS_IDTEXTA unique identifier for the record.
INSERTED_TIMESTAMPTIMESTAMP_NTZThe timestamp at which the record was initially created and inserted into this table.
MODIFIED_TIMESTAMPTIMESTAMP_NTZThe timestamp at which this record was last modified by an internal process.