Skip to main content

Overview

Goldsky provides curated NEAR Protocol datasets covering blocks, transactions, receipts, and execution outcomes. NEAR data is pulled from chunks across all shards and flattened into per-row datasets for indexing.
Turbo only: NEAR datasets are exclusively available on Turbo. They are not supported in Mirror v1 pipelines.

Available datasets

DatasetMainnetDescription
near.blocksv1.0.0Block-level data from the NEAR blockchain
near.receiptsv1.1.0Receipts created during execution of transactions
near.transactionsv1.1.0Transactions pulled from chunks as found on the NEAR blockchain
near.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,
        block_hash,
        executor_id,
        status,
        gas_burnt,
        tokens_burnt,
        logs
      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
The id field on execution outcomes is either the receipt ID or the transaction hash, depending on whether the outcome was produced by a receipt or the top-level transaction.

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.