Skip to main content
DatasetMainnetDescription
blocksv1.0.0Block-level data from the NEAR blockchain
receiptsv1.1.0Receipts created during execution of transactions
transactionsv1.1.0Transactions pulled from chunks as found on the NEAR blockchain
execution_outcomesv1.1.0Execution outcomes generated from both transaction and receipt executions

Quick start

The fastest way to explore NEAR data is using a blackhole sink with goldsky turbo inspect:
name: demo-near-receipts-blackhole
resource_size: s

sources:
  near_receipts:
    type: dataset
    dataset_name: near.receipts
    version: 1.1.0
    start_at: latest

sinks:
  dev_sink:
    type: blackhole
    from: near_receipts
goldsky turbo apply demo.yaml
goldsky turbo inspect demo-near-receipts-blackhole

Guide: Track failed execution outcomes

Build a debugging dashboard by filtering execution outcomes to only capture failures:
name: near-execution-outcomes-failures
resource_size: s

sources:
  execution_outcomes:
    type: dataset
    dataset_name: near.execution_outcomes
    version: 1.1.0
    start_at: latest

transforms:
  failed_executions:
    type: sql
    primary_key: id
    sql: |
      SELECT
        id,
        executor_id,
        receiver_id,
        status,
        gas_burnt,
        tokens_burnt,
        transaction_hash,
        signer_id
      FROM execution_outcomes
      WHERE status <> 'SUCCESS'

sinks:
  postgres_output:
    type: postgres
    from: failed_executions
    schema: public
    table: failed_execution_outcomes
    secret_name: MY_POSTGRES_SECRET
    primary_key: id

Guide: Monitor transactions for a specific account

Track all transactions involving a particular NEAR account:
name: near-account-transactions
resource_size: s

sources:
  near_transactions:
    type: dataset
    dataset_name: near.transactions
    version: 1.1.0
    start_at: latest

transforms:
  account_transactions:
    type: sql
    primary_key: id
    sql: |
      SELECT *
      FROM near_transactions
      WHERE receiver_id = 'epic.poolv1.near'
        OR signer_id = 'epic.poolv1.near'

sinks:
  postgres_output:
    type: postgres
    from: account_transactions
    schema: public
    table: near_account_transactions
    secret_name: MY_POSTGRES_SECRET
    primary_key: id

Performance tips

NEAR produces high volumes of receipts and execution outcomes. Apply filters as early as possible to reduce data volume:
transforms:
  filtered:
    type: sql
    sql: SELECT * FROM near_receipts WHERE receiver_id = 'wrap.near'
NEAR mainnet has high throughput. For historical backfills, consider medium or large resource sizes:
resource_size: m  # or l for large historical backfills
When building and testing pipelines, use start_at: latest to avoid processing large amounts of historical data:
start_at: latest  # Only process new data
For any questions or feedback, reach out at support@goldsky.com.