From bfdc103e85d787daf1e35eb304722731b186622b Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 6 Aug 2024 13:02:45 +0200 Subject: [PATCH] chore: debug log hardhat ledger communication errors --- packages/hardhat-plugin/src/index.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/hardhat-plugin/src/index.ts b/packages/hardhat-plugin/src/index.ts index 44afb8f82..988441091 100644 --- a/packages/hardhat-plugin/src/index.ts +++ b/packages/hardhat-plugin/src/index.ts @@ -5,6 +5,7 @@ import { IgnitionError, StatusResult, } from "@nomicfoundation/ignition-core"; +import debug from "debug"; import { ensureDir, pathExists, @@ -33,6 +34,8 @@ const ignitionScope = scope( "Deploy your smart contracts using Hardhat Ignition" ); +const log = debug("hardhat:ignition"); + extendConfig((config, userConfig) => { /* setup path configs */ const userPathsConfig = userConfig.paths ?? {}; @@ -297,7 +300,9 @@ ignitionScope "confirmation_failure", ledgerConfirmationFailure ); - } catch {} + } catch (error) { + log(error); + } const result = await deploy({ config: hre.config.ignition, @@ -344,7 +349,9 @@ ignitionScope "confirmation_failure", ledgerConfirmationFailure ); - } catch {} + } catch (error) { + log(error); + } if (result.type === "SUCCESSFUL_DEPLOYMENT" && verify) { console.log("");