Skip to content

Commit

Permalink
refactor: normalize file path
Browse files Browse the repository at this point in the history
  • Loading branch information
ylmin committed Sep 20, 2023
1 parent e2bfc0e commit ff74614
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions etc/system-contracts/scripts/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import { getRevertSelector, getTransactionUtils } from './constants';
import * as hre from 'hardhat';
import { ethers } from 'ethers';
import { renderFile } from 'template-file';
import { join } from "path";

function path(...args: string[]): string {
return join(__dirname,...args)
}

const OUTPUT_DIR = 'bootloader/build';

Expand Down Expand Up @@ -113,11 +118,11 @@ async function main() {
if(!existsSync(OUTPUT_DIR)) {
mkdirSync(OUTPUT_DIR);
}

writeFileSync(`${OUTPUT_DIR}/proved_block.yul`, provedBlockBootloader);
writeFileSync(`${OUTPUT_DIR}/playground_block.yul`, playgroundBlockBootloader);
writeFileSync(`${OUTPUT_DIR}/gas_test.yul`, gasTestBootloader);
writeFileSync(`${OUTPUT_DIR}/fee_estimate.yul`, feeEstimationBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/proved_block.yul`) , provedBlockBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/playground_block.yul`), playgroundBlockBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/gas_test.yul`), gasTestBootloader);
writeFileSync(path(`../${OUTPUT_DIR}/fee_estimate.yul`), feeEstimationBootloader);

console.log('Preprocessing done!');
}
Expand Down

0 comments on commit ff74614

Please sign in to comment.