MCPcopy Index your code
hub / github.com/subquery/subql / saveAbiToFile

Function saveAbiToFile

packages/cli/src/controller/generate-controller.ts:95–102  ·  view source on GitHub ↗
(abi: unknown, addressOrName: string, rootPath: string)

Source from the content-addressed store, hash-verified

93 * @returns The path to the saved ABI file.
94 */
95export async function saveAbiToFile(abi: unknown, addressOrName: string, rootPath: string): Promise<string> {
96 const abiDirPath = path.join(rootPath, DEFAULT_ABI_DIR);
97 const filePath = path.join(abiDirPath, `${addressOrName}.abi.json`);
98
99 await fs.promises.writeFile(filePath, JSON.stringify(abi, null, 2));
100
101 return filePath;
102}
103
104export function prepareUserInput<T>(
105 selectedEvents: Record<string, EventFragment>,

Callers 1

generateAdapterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected