From 20a95fecdb2d39e91b995d053d2124b5ac08ee15 Mon Sep 17 00:00:00 2001 From: g6s Date: Thu, 19 Dec 2024 00:29:13 -0600 Subject: [PATCH] fix path format --- .env.example | 2 +- scripts/configure_bfp.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 89eaa40..a31ebb0 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ PRIVATE_KEY= - +ENVIROMENT=test CREATE3_FACTORY_ADDRESS=0x93FEC2C00BfE902F733B57c5a6CeeD7CD1384AE1 # Public CREATE3 factory address # Mainnet RPCs diff --git a/scripts/configure_bfp.js b/scripts/configure_bfp.js index ee3e20d..d8ccc7c 100644 --- a/scripts/configure_bfp.js +++ b/scripts/configure_bfp.js @@ -23,8 +23,11 @@ async function main() { /** * Setup Contracts from Json file */ - const environment = process.env.ENVIRONMENT || "staging"; - const data = await fs.readFile(`./deployments/${network}.${environment}.json`, 'utf-8'); + const deploymentPath = process.env.ENVIRONMENT != 'prod' ? + `./deployments/${network}.${environment}.json` : + `./deployments/${network}.json`; + + const data = await fs.readFile(deploymentPath, 'utf-8'); const contracts = JSON.parse(data); /** * Setup Registry