File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import fs from "fs" ;
22
3- const DEPLOYMENT_FILE_PATH = "/Users/goktug/Desktop/deneme/autonom/contracts/deployments/local/l2.json" ;
3+ const DEPLOYMENT_FILE_PATH = process . env . DEPLOYMENT_FILE_PATH ;
44const OUTPUT_FILE = "./src/utils/autonom/output/l2.js" ;
55
66// helper function to safely extract nested values
77function getSafeValue ( obj , keys , defaultValue = "MISSING_ADDRESS" ) {
88 return keys . reduce ( ( acc , key ) => ( acc && acc [ key ] ? acc [ key ] : defaultValue ) , obj ) ;
99}
1010
11+ if ( ! DEPLOYMENT_FILE_PATH ) {
12+ console . error ( "Deployment file path is required. Set the DEPLOYMENT_FILE_PATH environment variable." ) ;
13+ process . exit ( 1 ) ;
14+ }
15+
1116try {
1217 if ( ! fs . existsSync ( DEPLOYMENT_FILE_PATH ) ) {
1318 throw new Error ( `Deployment file not found at ${ DEPLOYMENT_FILE_PATH } ` ) ;
You can’t perform that action at this time.
0 commit comments