From 6c6f507cacebccf41a6fda3efef68e65806d4226 Mon Sep 17 00:00:00 2001 From: Mason <33527785+masonchain@users.noreply.github.com> Date: Thu, 2 Mar 2023 13:39:27 -0600 Subject: [PATCH] fix: running local node --- contracts/hardhat.config.js | 14 +++++++++----- docker-compose.yml | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/contracts/hardhat.config.js b/contracts/hardhat.config.js index 5cf44d0..2208709 100644 --- a/contracts/hardhat.config.js +++ b/contracts/hardhat.config.js @@ -26,6 +26,11 @@ task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { task("deploy", "Deploys the protocol") .addFlag("verify", "Verify the deployed contracts on Etherscan") .setAction(async (taskArgs, hre) => { + const chainId = await getChainId(); + + // Run a local node if we are on the hardhat network + if (chainId === '1337') hre.run('node'); + // Compiling all of the contracts again just in case await hre.run('compile'); @@ -42,7 +47,6 @@ task("deploy", "Deploys the protocol") badgerSingleton = await badgerSingleton.deployed(); console.log("✅ Organization Implementation Deployed."); - const chainId = await getChainId(); organizationDeployment = { "Chain ID": chainId, "Deployer": deployer.address, @@ -135,10 +139,10 @@ module.exports = { gasPrice: "auto", saveDeployments: false, mining: { - auto: true - // auto: false, - // order: 'fifo', - // interval: 1500, + // auto: true + auto: false, + order: 'fifo', + interval: 200, } }, goerli: { diff --git a/docker-compose.yml b/docker-compose.yml index 5e9664a..ec8335b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: ports: - "8545:8545" restart: unless-stopped - command: npx hardhat run scripts/deploy/deploy.js + command: npx hardhat deploy # This runs a local instance of the Badger API and database # by creating a local Postgres database in the api/ directory. #