Skip to content

Commit

Permalink
add oneoff option to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
DZGoldman committed Dec 13, 2023
1 parent f8f5a8e commit fcf9fcf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src-ts/cli/childToParentRedeemer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ const options = yargs(process.argv.slice(2))
childToParentRewardRouterAddr: { type: "string", demandOption: true },
blockLag: { type: "number", demandOption: false, default: 5 },
childChainStartBlock: { type: "number", demandOption: false, default: 0 },
oneOff: {
type: "boolean",
demandOption: false,
default: false,
description:
"Runs continuously if false, runs once and terminates if true",
},
})
.parseSync() as {
parentRPCUrl: string;
childRPCUrl: string;
childToParentRewardRouterAddr: string;
blockLag: number;
childChainStartBlock: number;
oneOff: boolean;
};

(async () => {
Expand All @@ -41,5 +49,5 @@ const options = yargs(process.argv.slice(2))
options.blockLag,
options.childChainStartBlock
);
await redeemer.run();
await redeemer.run(options.oneOff);
})();

0 comments on commit fcf9fcf

Please sign in to comment.