mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-23 19:49:06 +00:00
a846917f1d
* Add export-watcher CLI generation * Export snapshot block and add import-watcher CLI gen * Update codegen docs with export and import commands * Use different function to get latest checkpoint in export CLI * Update generated watcher docs with import state instructions * Push IPLDBlocks to IPFS * Change ts type for data column to Buffer * Add checkpoint hook * Push CLI checkpoint to IPFS * Fix latest IPLDBlock query to filter out irrelevant blocks * Add CLI to inspect a CID * Decode data before exporting * Encode data in JSON for getState GQL API * Use go-ipfs and export cbor-encoded buffer * Remove empty post-block methods from existing watchers * Call hooks and checkpoint job complete handlers in fill * Remove subscription to hooks queue from existing watchers
26 lines
723 B
TypeScript
26 lines
723 B
TypeScript
//
|
|
// Copyright 2021 Vulcanize, Inc.
|
|
//
|
|
|
|
export const MAX_REORG_DEPTH = 16;
|
|
|
|
export const QUEUE_BLOCK_PROCESSING = 'block-processing';
|
|
export const QUEUE_EVENT_PROCESSING = 'event-processing';
|
|
export const QUEUE_CHAIN_PRUNING = 'chain-pruning';
|
|
export const QUEUE_BLOCK_CHECKPOINT = 'block-checkpoint';
|
|
export const QUEUE_HOOKS = 'hooks';
|
|
export const QUEUE_IPFS = 'ipfs';
|
|
|
|
export const JOB_KIND_INDEX = 'index';
|
|
export const JOB_KIND_PRUNE = 'prune';
|
|
|
|
export const JOB_KIND_EVENTS = 'events';
|
|
export const JOB_KIND_CONTRACT = 'contract';
|
|
|
|
export const DEFAULT_CONFIG_PATH = 'environments/local.toml';
|
|
|
|
export const UNKNOWN_EVENT_NAME = '__unknown__';
|
|
|
|
export const KIND_ACTIVE = 'active';
|
|
export const KIND_LAZY = 'lazy';
|