kleros/foresight/indexer-multichain

Claude Code and agent skill by kleros/foresight

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when deploying an indexer across multiple chains. Entity ID namespacing to avoid collisions, chain-specific configuration patterns, and the context.chain runtime API.

Install

npx vskill@latest install kleros/foresight/indexer-multichain

SKILL.md

Multichain Indexing

Entity ID Namespacing

Always prefix entity IDs with chainId to avoid collisions across chains:

ts
const id = `${event.chainId}-${event.params.tokenId}`;
context.Token.set({ id, ...tokenData });

Never hardcode chainId = 1 — always use event.chainId.

Chain-specific singleton IDs (e.g., Bundle): ${event.chainId}-1

Chain-Specific Logic

ts
Contract.Event.handler(async ({ event, context }) => {
const chainId = context.chain.id;
const config = {
1: { wrappedNative: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" },
137: { wrappedNative: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270" },
}[chainId];
// context.chain.isRealtime is true once ALL chains have caught up to head
if (context.chain.isRealtime) {
// Realtime-only logic
}
});

Config

Global contract definitions + chain-specific addresses:

yaml
contracts:
- name: ERC20
events:
- event: Transfer(indexed address from, indexed address to, uint256 value)
chains:
- id: 1
contracts:
- name: ERC20
address:
- 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
- id: 137
contracts:
- name: ERC20
address:
- 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174
If something is unclear, use the envio-docs skill to search and read the latest documentation.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kleros/foresight/indexer-multichain/badge)](https://verified-skill.com/skills/kleros/foresight/indexer-multichain)

Something wrong with this skill or its page? Tell us.