datasets

datasets

當使用者需要查詢或驗證 Goldsky 區塊鏈資料集名稱、鏈前綴(chain prefixes)、資料集類型或版本時,使用此技能。觸發時機包含諸如「X 的資料集名稱是什麼?」、「Goldsky 對於 Y 鏈使用什麼前綴?」、「Z 應該使用什麼版本?」或「Solana/Stellar/Arbitrum 等有哪些可用資料集?」。亦可用於特定鏈的資料集問題(例如 polygon 對比 matic 前綴、stellarnet 餘額資料集、solana 代幣轉帳資料集名稱),以及回答「是否有針對 X 的資料集?」——其中 X 是一個領域而非單一鏈,例如已解碼日誌(decoded logs)、代幣轉帳與餘額、用於流通供給量的鑄造/銷毀事件、DEX 或預測市場活動 (Polymarket),或錢包歷史與對帳背後的原始區塊、交易與追蹤紀錄。除非核心問題是尋找正確的資料集名稱或鏈前綴,否則請勿為 CLI 指令、管道設定或一般 Goldsky 架構問題觸發此技能。Wallet Feeds API 查詢請使用 /feeds。

12星標
1分支
更新於 2026/10/2
SKILL.md
唯讀
名稱
datasets
描述

當使用者需要查詢或驗證 Goldsky 區塊鏈資料集名稱、鏈前綴(chain prefixes)、資料集類型或版本時,使用此技能。觸發時機包含諸如「X 的資料集名稱是什麼?」、「Goldsky 對於 Y 鏈使用什麼前綴?」、「Z 應該使用什麼版本?」或「Solana/Stellar/Arbitrum 等有哪些可用資料集?」。亦可用於特定鏈的資料集問題(例如 polygon 對比 matic 前綴、stellarnet 餘額資料集、solana 代幣轉帳資料集名稱),以及回答「是否有針對 X 的資料集?」——其中 X 是一個領域而非單一鏈,例如已解碼日誌(decoded logs)、代幣轉帳與餘額、用於流通供給量的鑄造/銷毀事件、DEX 或預測市場活動 (Polymarket),或錢包歷史與對帳背後的原始區塊、交易與追蹤紀錄。除非核心問題是尋找正確的資料集名稱或鏈前綴,否則請勿為 CLI 指令、管道設定或一般 Goldsky 架構問題觸發此技能。Wallet Feeds API 查詢請使用 /feeds。

Goldsky 資料集參考指南 (Goldsky Dataset Reference)

Turbo 管道中可用區塊鏈資料集的參考表。

對於快速的資料集問題(例如:「Solana 轉帳要用哪個資料集?」),請直接回答:確認鏈前綴(參見下方「熱門鏈前綴」)、確認資料集類型(參見「常見資料集」),並傳回如下的 YAML 程式碼片段:

sources:
  my_source:
    type: dataset
    dataset_name: <chain>.<dataset>
    version: 1.0.0
    start_at: earliest

小技巧: 可以使用 goldsky dataset get <chain>.<dataset> --outputFormat json 驗證資料集是否存在——這會傳回確切的 slug、版本、結構 schema 以及 isTurboOnly(false = 可用於 Turbo 與 Mirror;true = 僅限 Turbo)。若要瀏覽或搜尋:請使用 goldsky dataset list --output json(可選填 --group <chain>;該清單為精簡索引,會省略 isTurboOnly——若需該欄位請使用 dataset get)。goldsky turbo validate file.yaml 用於驗證整個 Turbo 管道設定——它不是資料集存在性檢查(此為 Turbo 專用,需要 turbo 二進位檔)。

⚠️ 未帶任何標籤的純 goldsky dataset list 是一個互動式選擇器,僅適用於真實終端機——在 agent/CI/管線輸出環境中,它不會產生任何輸出。請務必傳入 --output json(或 --group)。如果使用的舊版 CLI 不支援這些標籤,請退回使用公開的唯讀端點:curl -s https://api.goldsky.com/api/public/datasets/v1。


資料集參考檔案

鏈前綴與鏈 ID 資訊位於 data/ 資料夾中。

檔案 內容
chain-prefixes.json 所有鏈前綴、鏈 ID 與常見錯誤

資料位置: data/(相對於此技能的目錄)

資料集版本未在此技能中固定。 版本號會隨資料集修訂而變動,因此請透過 goldsky dataset get <name> --outputFormat json 確認確切版本,而非直接信任靜態清單。下方的資料集類型與 schema 表格為穩定參考;請將其中的任何版本號視為驗證起點,而非絕對事實。


快速參考

操作 指令 備註
驗證資料集 goldsky dataset get <name> --outputFormat json 首選 — slug、版本、schema、isTurboOnly
搜尋資料集 goldsky dataset list --output json | grep -i name 非互動式
列出所有資料集 goldsky dataset list --output json 純 dataset list 僅限 TTY — 請務必加上 --output json

常見資料集

您的需求 資料集 範例
代幣轉帳 (ERC-20) <chain>.erc20_transfers base.erc20_transfers (v1.2.0)
NFT 轉帳 (ERC-721) <chain>.erc721_transfers ethereum.erc721_transfers (v1.0.0)
交易 (Transactions) <chain>.raw_transactions ethereum.raw_transactions (v1.0.0)
事件日誌 (Event logs) <chain>.raw_logs base.raw_logs (v1.0.0)
Solana 代幣 solana.token_transfers v1.0.0
比特幣交易 bitcoin.raw.transactions v1.0.0
Stellar 轉帳 stellar_mainnet.transfers v1.1.0

重要: 請使用 raw_transactions,不要使用 transactions


熱門鏈前綴

區塊鏈 前綴 備註
Ethereum ethereum
Base base
Polygon matic 不是 polygon
Arbitrum arbitrum
Optimism optimism
BSC bsc
Avalanche avalanche
Solana solana 使用 start_block 而非 start_at
Bitcoin bitcoin.raw 與 EVM 一樣使用 start_at
Stellar stellar_mainnet 與 EVM 一樣使用 start_at
Sui sui 與 EVM 一樣使用 start_at
NEAR near 與 EVM 一樣使用 start_at
Starknet starknet 與 EVM 一樣使用 start_at
Fogo fogo 與 EVM 一樣使用 start_at

完整的鏈 ID 清單請參閱 data/chain-prefixes.json。


常見資料集類型

EVM 相容鏈

資料集類型 說明 應用情境
blocks 包含元資料的區塊標頭 區塊瀏覽器、時間分析
raw_transactions 交易資料 錢包活動、Gas 分析
raw_logs 原始事件日誌 自訂事件篩選
raw_traces 內部交易追蹤 (Traces) MEV 分析、合約互動分析
erc20_transfers 同質化代幣轉帳 代幣追蹤、DeFi 分析
erc721_transfers NFT 轉帳 NFT 市集、所有權追蹤
erc1155_transfers 多代幣轉帳 遊戲、多代幣標準

重要: 請使用 raw_transactions,不要使用 transactions。請使用 raw_logs,不要使用 logs(雖然 logs 在某些鏈上可以作為別名使用)。

沒有可直接消費的 decoded_logs 來源資料集。 若要取得已解碼的合約事件,請將來源設定為 <chain>.raw_logs,並在 SQL 轉換中透過 _gs_log_decode(_gs_fetch_abi(<explorer-url>, <source>), topics, data) 進行解碼。完整模式請參閱 /turbo-transforms。

Solana

資料集類型 說明 應用情境
blocks 包含 Leader 資訊的區塊資料 全鏈分析
transactions 包含餘額變化的交易資料 錢包活動
transactions_with_instructions 交易 + 巢狀指令 多指令分析
instructions 個別指令 特定程式 (Program) 分析
token_transfers SPL 代幣轉帳 代幣追蹤
native_balances SOL 餘額變動 巨鯨 (Whale) 追蹤
token_balances SPL 代幣餘額變動 投資組合追蹤
rewards 驗證者獎勵 質押 (Staking) 分析

Bitcoin

資料集類型 說明 應用情境
bitcoin.raw.blocks 區塊資料(Hash、難度、大小) 網路分析
bitcoin.raw.transactions 交易資料(輸入、輸出、數值) 支付追蹤

Stellar

所有資料集均使用版本 1.1.0:

資料集類型 說明 應用情境
stellar_mainnet.transactions 所有網路交易 帳號監控
stellar_mainnet.transfers 所有轉帳事件 資產追蹤
stellar_mainnet.events 所有事件(合約 + 操作) 合約監控
stellar_mainnet.operations 交易內的內部操作 (Operations) 操作行為追蹤
stellar_mainnet.ledger_entries 帳本狀態變更 狀態分析
stellar_mainnet.ledgers 帳本元資料 網路分析
stellar_mainnet.balances 帳號餘額變動 餘額追蹤

Sui

資料集類型 說明 應用情境
sui.checkpoints 檢查點 (Checkpoint) 資料 全鏈分析
sui.transactions 交易資料 活動監控
sui.events Move 合約事件 dApp 事件追蹤
sui.packages 已部署的 Move 套件 (Packages) 套件探索
sui.epochs 包含驗證者的 Epoch 資料 質押/驗證者分析

NEAR

資料集類型 說明 應用情境
near.receipts 執行收據 (Receipts) 合約互動追蹤
near.transactions 已簽署的交易 活動監控
near.execution_outcomes 執行結果 成功/失敗分析

Starknet

資料集類型 說明 應用情境
starknet.blocks 區塊資料 全鏈分析
starknet.transactions 交易資料 活動監控
starknet.events 合約事件 dApp 事件追蹤
starknet.messages L1↔L2 訊息 跨鏈橋監控

Fogo

資料集類型 說明 應用情境
fogo.transactions_with_instructions 包含指令的交易 完整活動追蹤
fogo.rewards 驗證者獎勵 質押分析
fogo.blocks 區塊資料 全鏈分析

資料集 Schema

來源: docs.goldsky.com。請勿使用未在此處列出的欄位名稱——若要檢視未知的 schema,請執行 goldsky dataset get <chain>.<dataset> --outputFormat json。

Solana

solana.transactions
欄位 類型 備註
id string
index integer 區塊內的交易位置
block_slot integer Slot 編號
block_hash string
block_timestamp timestamp
signature string 交易簽章
recent_block_hash string
fee integer 單位為 lamports
status integer 1 = 成功
err string | null 若失敗則顯示錯誤訊息
accounts string[] 所有參與的帳號
balance_changes object[] 單位為 lamports 的 {account, before, after}
log_messages string[] 程式執行日誌
compute_units_consumed integer

Solana 交易上沒有 from_address 或 to_address — 請改用 accounts 陣列。

solana.transactions_with_instructions

包含 solana.transactions 的所有欄位加上:

欄位 類型 備註
pre_token_balances object[] 交易前的代幣餘額
post_token_balances object[] 交易後的代幣餘額
instructions object[] 詳見下方

指令物件欄位: id, index, parent_index, block_slot, block_timestamp, block_hash, tx_signature, tx_fee, tx_index, program_id, data (base58), accounts (string[]), instruction_type

solana.instructions
欄位 類型 備註
id string
block_slot integer
block_hash string
block_timestamp timestamp
tx_signature string 交易簽章
index integer 交易內的位置
parent_index integer | null 用於內部指令
accounts string[] 指令涉及的帳號
data string base58 編碼
program string 程式名稱/標籤
program_id string 執行的程式地址
instruction_type string 解碼後的指令類型
params object 解碼後的指令參數
parsed object 解析後的 Payload
solana.token_transfers
欄位 類型 備註
id string
token_mint_address string Mint 地址
from_token_account string 來源代幣帳號
to_token_account string 目的代幣帳號
amount number 原始數量
decimals integer 代幣小數位數
block_slot integer
block_timestamp timestamp
signature string 交易簽章
solana.native_balances
欄位 類型 備註
id string
block_slot integer Slot 編號
block_hash string
block_timestamp timestamp
tx_index integer 區塊內的交易位置
signature string 交易簽章
account string 帳號 Pubkey
amount_before integer lamports
amount_after integer lamports
_gs_op string Goldsky 內部操作類型
solana.blocks
欄位 類型 備註
id string
slot integer
parent_slot integer
hash string
timestamp timestamp
height integer
previous_block_hash string
transaction_count integer
leader string 驗證者 Pubkey
leader_reward integer lamports
skipped boolean
solana.rewards
欄位 類型 備註
id string
block_slot integer
block_hash string
block_timestamp timestamp
pub_key string 驗證者 Pubkey
lamports integer 獎勵金額
post_balance integer 獎勵後的餘額
reward_type string
commission integer
solana.token_balances

Schema 尚未完全文件化 — 請勿猜測欄位名稱。請使用 goldsky dataset get solana.token_balances --outputFormat json 進行檢視。


EVM 相容鏈

<chain>.raw_logs / <chain>.logs
欄位 類型 備註
id string
block_number integer
block_hash string
transaction_hash string
transaction_index integer
log_index integer
address string 合約地址(小寫)
data string 十六進位編碼的事件資料
topics string 以逗號分隔的十六進位 Topic Hash
block_timestamp integer Unix 時間戳記

topics 是以逗號分隔的字串,而非陣列。Topic 0 是事件簽章 Hash。

<chain>.raw_transactions
欄位 類型 備註
id string
hash string
nonce integer
block_hash string
block_number integer
transaction_index integer
from_address string
to_address string
value decimal 以 wei 為單位的 ETH 數值
gas decimal
gas_price decimal
input string 十六進位 Calldata
transaction_type integer
block_timestamp integer Unix 時間戳記
receipt_gas_used decimal
receipt_contract_address string | null 若為建立合約交易時提供
receipt_status integer 1 = 成功
receipt_effective_gas_price decimal

L2 區塊鏈額外包含:receipt_l1_fee, receipt_l1_gas_used, receipt_l1_gas_price, receipt_l1_fee_scalar

<chain>.blocks
欄位 類型 備註
id string
number integer 區塊號碼
hash string
parent_hash string
miner string
gas_limit integer
gas_used integer
timestamp integer Unix 時間戳記
transaction_count integer
base_fee_per_gas integer
difficulty double
<chain>.erc20_transfers
欄位 類型 備註
id string
sender string 發送者地址
recipient string 接收者地址
amount decimal 代幣數量
address string 代幣合約地址
block_number integer
block_timestamp integer Unix 時間戳記
block_hash string
transaction_hash string
transaction_index integer
log_index integer
<chain>.erc721_transfers
欄位 類型 備註
id string
from_address string
to_address string
token_id decimal
address string NFT 合約地址
block_number integer
block_timestamp integer Unix 時間戳記
block_hash string
transaction_hash string
transaction_index integer
log_index integer

資料集名稱格式

所有資料集均遵循以下格式:<chain_prefix>.<dataset_type>

範例:

  • ethereum.erc20_transfers - Ethereum 主網上的 ERC-20 轉帳
  • base.logs - Base 上的所有事件日誌
  • matic.blocks - Polygon 上的區塊資料
  • solana.token_transfers - Solana 上的 SPL 代幣轉帳

尋找資料集版本

資料集帶有版本控制。若要尋找可用的版本:

goldsky dataset get base.erc20_transfers --outputFormat json

常見版本:

  • 1.0.0 - 初始版本
  • 1.2.0 - 增強型 Schema(常見於 ERC-20 轉帳)

如有疑慮,請使用 goldsky dataset get <name> --outputFormat json 所顯示的最新版本。


常見探索情境與模式

「我想追蹤 Base 上的 USDC 轉帳」

  1. 資料集:base.erc20_transfers
  2. 在管道轉換 (transform) 中依據合約地址進行過濾:
transforms:
  usdc_only:
    type: sql
    primary_key: id
    sql: |
      SELECT * FROM source_name
      WHERE address = lower('0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913')

「我想取得 Ethereum 上的所有 NFT 活動」

資料集:ethereum.erc721_transfers

「我想監控特定的智慧合約」

  1. 來源 (Source):<chain>.raw_logs,並在來源過濾器中過濾該合約地址
  2. 若要解碼事件:新增一個 SQL transform,呼叫 _gs_log_decode(_gs_fetch_abi(<explorer-url>, <source>), topics, data) AS decoded,接著在下游透過 WHERE decoded.event_signature = '<EventName>(<types>)' 進行過濾。切勿將 topic0 的 Hash 放入來源過濾器中。

「我需要跨鏈資料」

在管道中使用多個來源 (Sources):

sources:
  eth_transfers:
    type: dataset
    dataset_name: ethereum.erc20_transfers
    version: 1.0.0
    start_at: latest
  base_transfers:
    type: dataset
    dataset_name: base.erc20_transfers
    version: 1.2.0
    start_at: latest

疑難排解

找不到資料集 (Dataset not found)

Error: Source 'my_source' references unknown dataset 'invalid.dataset'

修復方法:

  1. 檢查鏈前綴是否正確(例如應使用 matic 而非 polygon)
  2. 檢查資料集類型是否存在(例如應使用 erc20_transfers 而非 erc20)
  3. 執行 goldsky dataset list --output json 查看所有可用選項

未列出特定區塊鏈

如果在上表中找不到某條鏈:

goldsky dataset list --output json | grep -i "<chain_name>"

某些鏈使用的是較不明顯的前綴(例如 Polygon 使用 matic)。

版本不符合 (Version mismatch)

Error: Version '2.0.0' not found for dataset 'base.erc20_transfers'

修復方法: 檢查可用的版本:

goldsky dataset get base.erc20_transfers --outputFormat json

請使用輸出結果中存在的版本。


相關資源

  • /turbo-builder — 使用這些資料集建置管道的互動式導引精靈