Skip to content

Commit 38c1350

Browse files
committed
moved batch deploy receiver to contract_manager
1 parent 46184e0 commit 38c1350

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

target_chains/ethereum/contracts/scripts/batchDeployReceivers.ts renamed to contract_manager/scripts/batchDeployReceivers.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Web3 from "web3";
1515
import { CHAINS } from "@pythnetwork/xc-admin-common";
1616
import * as fs from "fs";
1717

18-
const { getDefaultConfig } = require("./contractManagerConfig");
18+
const { getDefaultConfig } = require("../../target_chains/ethereum/contracts/scripts/contractManagerConfig");
1919

2020
const parser = yargs(hideBin(process.argv))
2121
.usage(
@@ -46,7 +46,14 @@ const parser = yargs(hideBin(process.argv))
4646
});
4747

4848
async function memoize(key: string, fn: () => Promise<any>) {
49-
const path = `./cache/${key}.json`;
49+
const cacheDir = './cache';
50+
const path = `${cacheDir}/${key}.json`;
51+
52+
// Ensure cache directory exists
53+
if (!fs.existsSync(cacheDir)) {
54+
fs.mkdirSync(cacheDir, { recursive: true });
55+
}
56+
5057
if (fs.existsSync(path)) {
5158
return JSON.parse(fs.readFileSync(path).toString());
5259
}

0 commit comments

Comments
 (0)