@dojima-wallet/contract-deployer
Version:
Contracts deployer package for evm and non-evm chains
19 lines (16 loc) • 515 B
text/typescript
import {writeFileSync, readFileSync} from 'fs';
export function readFile(filePath: string): string | undefined {
try {
return readFileSync(filePath).toString();
} catch (error) {
console.error(`Error reading file ${filePath}:`, error);
return undefined;
}
}
export function writeFile(filePath: string, content: string): void {
try {
writeFileSync(filePath, content);
} catch (error) {
console.error(`Error writing to file ${filePath}:`, error);
}
}