UNPKG

@vechain/vebetterdao-contracts

Version:

Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.

41 lines (40 loc) 1.54 kB
import fs from "fs"; import FormData from "form-data"; /** * Reads files from a directory and returns an array of `File` objects. * * @param dirPath - The path to the directory to read. * @returns A promise that resolves to an array of `File` objects. * * @throws An error if the directory does not exist. */ declare function readFilesFromDirectory(dirPath: string): Promise<File[]>; declare function formData(path: string): FormData; declare function getFolderName(folderPath: string): string; declare function copyImages(srcFolder: string, destFolder: string): string; declare function zipFolder(sourceDir: string, outPath: fs.PathLike): Promise<void>; /** * Save the deployed contracts addresses to a file. * @param contracts - The deployed contracts * @param libraries - The deployed libraries */ declare function saveContractsToFile(contracts: Record<string, string>, libraries: { B3TRGovernor: Record<string, string>; }): Promise<void>; /** * Save new libraries deployed to a file * @param contracts - The deployed contracts * @param libraries - The deployed libraries */ declare function saveLibrariesToFile(libraries: { B3TRGovernor?: Record<string, string>; } | { VeBetterPassport?: Record<string, string>; } | { X2EarnApps?: Record<string, string>; } | { XAllocationVoting?: Record<string, string>; } | { NavigatorRegistry?: Record<string, string>; }): Promise<void>; export { readFilesFromDirectory, formData, getFolderName, zipFolder, copyImages, saveContractsToFile, saveLibrariesToFile, };