diff --git a/networks.js b/networks.js index c1379d6e..b1c11a33 100644 --- a/networks.js +++ b/networks.js @@ -12,13 +12,15 @@ const DEFAULT_VERIFICATION_BLOCK_CONFIRMATIONS = 2 const npmCommand = process.env.npm_lifecycle_event const isTestEnvironment = npmCommand == "test" || npmCommand == "test:unit" +const isSimulation = process.argv.length === 3 && process.argv[2] === "functions-simulate-script" ? true : false + // Set EVM private keys (required) const PRIVATE_KEY = process.env.PRIVATE_KEY // TODO @dev - set this to run the accept.js task. const SECOND_PRIVATE_KEY = process.env.SECOND_PRIVATE_KEY -if (!isTestEnvironment && !PRIVATE_KEY) { +if (!isTestEnvironment && !isSimulation && !PRIVATE_KEY) { throw Error("Set the PRIVATE_KEY environment variable with your EVM wallet private key") }