packages/cli/templates/static/shared/.claude/skills/indexing-transactions/SKILL.md
Use when needing transaction-level data in handlers. Configure field_selection to include transaction fields on events, and access via event.transaction. No native transaction handler — access through event handlers.
npx skillsauth add enviodev/hyperindex indexing-transactionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
HyperIndex does not have a native transaction handler (onTransaction). Transaction data is accessed through event handlers via field_selection in config.yaml.
By default, event.transaction is empty. Select needed fields explicitly:
contracts:
- name: MyContract
events:
- event: Transfer(indexed address from, indexed address to, uint256 value)
field_selection:
transaction_fields:
- hash
- from
- to
- gasUsed
- value
Or globally for all events:
field_selection:
transaction_fields:
- hash
- from
- to
Contract.Transfer.handler(async ({ event, context }) => {
const txHash = event.transaction.hash;
const txFrom = event.transaction.from;
const gasUsed = event.transaction.gasUsed;
});
transactionIndex, hash, from, to, gas, gasPrice, maxPriorityFeePerGas, maxFeePerGas, cumulativeGasUsed, effectiveGasPrice, gasUsed, input, nonce, value, v, r, s, contractAddress, logsBloom, root, status, yParity, chainId, maxFeePerBlobGas, blobVersionedHashes, type, l1Fee, l1GasPrice, l1GasUsed, l1FeeScalar, gasUsedForL1
Block fields are also configurable via block_fields. Default: number, timestamp, hash.
Additional: parentHash, nonce, sha3Uncles, logsBloom, transactionsRoot, stateRoot, receiptsRoot, miner, difficulty, totalDifficulty, extraData, size, gasLimit, gasUsed, uncles, baseFeePerGas, blobGasUsed, excessBlobGas, parentBeaconBlockRoot, withdrawalsRoot, l1BlockNumber
Full reference: https://docs.envio.dev/docs/HyperIndex-LLM/hyperindex-complete
development
Write and run tests for HyperIndex indexers using Vitest and createTestIndexer(). Covers test setup, processing block ranges, asserting entity changes with toMatchInlineSnapshot, and TDD workflow. Use when writing tests, debugging handler output, or verifying indexer behavior.
data-ai
Migrate a TheGraph subgraph to Envio HyperIndex using TDD. Covers schema conversion (remove @entity, Bytes->String, @derivedFrom), handler translation (save->set, store.get->context.get, templates->contractRegister), and verification against subgraph data.
data-ai
Use when indexing all instances of a contract across all addresses (e.g., all ERC-20 transfers on a chain). Config setup (no address), wildcard handler option, and event.srcAddress.
tools
Use when needing call trace data from transactions. HyperSync supports trace queries at the data layer. No handler-level trace API currently — access traces via HyperSync client directly.