File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import Web3 from "web3";
15
15
import { CHAINS } from "@pythnetwork/xc-admin-common" ;
16
16
import * as fs from "fs" ;
17
17
18
- const { getDefaultConfig } = require ( "./contractManagerConfig" ) ;
18
+ const { getDefaultConfig } = require ( "../../target_chains/ethereum/contracts/scripts /contractManagerConfig" ) ;
19
19
20
20
const parser = yargs ( hideBin ( process . argv ) )
21
21
. usage (
@@ -46,7 +46,14 @@ const parser = yargs(hideBin(process.argv))
46
46
} ) ;
47
47
48
48
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
+
50
57
if ( fs . existsSync ( path ) ) {
51
58
return JSON . parse ( fs . readFileSync ( path ) . toString ( ) ) ;
52
59
}
You can’t perform that action at this time.
0 commit comments