mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-02-04 16:54:16 +00:00
* Use watch-contract CLI from cli package in codegen * Use reset CLIs from cli package in codegen * Use create checkpoint CLI from cli package in codegen * Use inspect-cid CLI from cli package in codegen * Use import state CLI from cli package in codegen * Use export-state and verify-checkpoint CLI from cli package in codegen * Use server CLI from cli package in codegen * Use job-runner CLI from cli package in codegen * Use index-block CLI from cli package in codegen * Use fill CLI from cli package in codegen * Minor codegen fixes * Update watcher instructions to run job-runner before server
33 lines
745 B
Handlebars
33 lines
745 B
Handlebars
//
|
|
// Copyright 2022 Vulcanize, Inc.
|
|
//
|
|
|
|
import { CreateCheckpointCmd } from '@cerc-io/cli';
|
|
|
|
import { Database } from '../../database';
|
|
import { Indexer } from '../../indexer';
|
|
|
|
export const command = 'create';
|
|
|
|
export const desc = 'Create checkpoint';
|
|
|
|
export const builder = {
|
|
address: {
|
|
type: 'string',
|
|
require: true,
|
|
demandOption: true,
|
|
describe: 'Contract address to create the checkpoint for.'
|
|
},
|
|
blockHash: {
|
|
type: 'string',
|
|
describe: 'Blockhash at which to create the checkpoint.'
|
|
}
|
|
};
|
|
|
|
export const handler = async (argv: any): Promise<void> => {
|
|
const createCheckpointCmd = new CreateCheckpointCmd();
|
|
await createCheckpointCmd.init(argv, Database, Indexer);
|
|
|
|
await createCheckpointCmd.exec();
|
|
};
|