UNPKG

zonder

Version:

Ergonomic multi-chain indexing framework with dual runtime support for Ponder and Envio.

36 lines (35 loc) 1.29 kB
import type { Abi } from 'viem'; import type { ZonderConfig } from '../zonder/types.js'; export interface EnvioConfig { name: string; description?: string; ecosystem?: 'evm'; field_selection?: { transaction_fields?: string[]; block_fields?: string[]; log_fields?: string[]; }; contracts?: Array<{ name: string; abi?: string; handler: string; events: Array<{ event: string; name?: string; }>; }>; networks: Array<{ id: number; start_block: number; contracts: Array<{ name: string; address?: string | string[]; start_block?: number; }>; }>; unordered_multichain_mode?: boolean; event_decoder?: 'viem' | 'hypersync-client'; rollback_on_reorg?: boolean; } export declare function generateEnvioConfig<TChains extends Record<string, any>, TContracts extends Record<string, Abi>>(config: ZonderConfig<TChains, TContracts>, projectName?: string): string; export declare function generateAndWriteEnvioConfig<TChains extends Record<string, any>, TContracts extends Record<string, Abi>>(config: ZonderConfig<TChains, TContracts>, outputPath?: string, projectName?: string, overwrite?: boolean): void;