MCPcopy Create free account
hub / github.com/across-protocol/relayer / askYesNoQuestion

Function askYesNoQuestion

scripts/utils.ts:31–40  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

29}
30
31export async function askYesNoQuestion(query: string): Promise<boolean> {
32 const ans = (await askQuestion(`${query} (y/n) `)) as string;
33 if (ans.toLowerCase() === "y") {
34 return true;
35 }
36 if (ans.toLowerCase() === "n") {
37 return false;
38 }
39 return askYesNoQuestion(query);
40}
41
42/**
43 * Resolves an ERC20 type from a chain ID, and symbol or address.

Callers 10

runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
runFunction · 0.90

Calls 1

askQuestionFunction · 0.85

Tested by

no test coverage detected