Repository: NomicFoundation/hardhat-ignition
Pull request #561 (2023-10-16 20:27:34)

[WIP] Review error messages (PR 1)
In this PR I went through all the error messages, changing some of them so that they were easier to understand.

I also made sure that every mention of "Hardhat Ignition" has the "Hardhat".

WIP: There are many tests to adapt.


Patch:
diff --git a/examples/complete/ignition/modules/CompleteModule.js b/examples/complete/ignition/modules/CompleteModule.js
index 5e5e6022..ef8bef31 100644
--- a/examples/complete/ignition/modules/CompleteModule.js
+++ b/examples/complete/ignition/modules/CompleteModule.js
@@ -23,8 +23,8 @@ module.exports = buildModule("CompleteModule", (m) => {
   });
   const duplicateWithLib = m.contractAt(
     "ContractWithLibrary",
-    withLibArtifact,
     withLib,
+    withLibArtifact,
     { id: "ContractWithLibrary2" }
   );
 
diff --git a/packages/core/src/deploy.ts b/packages/core/src/deploy.ts
index 90860a90..d8aa3d73 100644
--- a/packages/core/src/deploy.ts
+++ b/packages/core/src/deploy.ts
@@ -117,7 +117,6 @@ export async function deploy<
 
   const deployer = new Deployer(
     resolvedConfig,
-    deploymentDir,
     executionStrategy,
     jsonRpcClient,
     artifactResolver,
diff --git a/packages/core/src/errors-list.ts b/packages/core/src/errors-list.ts
index 70d45902..5246ad7b 100644
--- a/packages/core/src/errors-list.ts
+++ b/packages/core/src/errors-list.ts
@@ -31,7 +31,7 @@ export const ERROR_RANGES: {
   INTERNAL: {
     min: 100,
     max: 199,
-    title: "Internal Ignition errors",
+    title: "Internal Hardhat Ignition errors",
   },
   MODULE: {
     min: 200,
@@ -80,11 +80,13 @@ export const ERRORS = {
   GENERAL: {
     ASSERTION_ERROR: {
       number: 1,
-      message: "Internal Ignition invariant was violated: %description%",
+      message:
+        "Internal Hardhat Ignition invariant was violated: %description%",
     },
     UNSUPPORTED_DECODE: {
       number: 2,
-      message: "Ignition can't decode ethers.js value of type %type%: %value%",
+      message:
+        "Hardhat Ignition can't decode ethers.js value of type %type%: %value%",
     },
   },
   INTERNAL: {
@@ -111,11 +113,11 @@ export const ERRORS = {
     INVALID_MODULE_ID_CHARACTERS: {
       number: 201,
       message:
-        'The moduleId "%moduleId%" contains banned characters, ids can only contain alphanumerics or underscores',
+        'The moduleId "%moduleId%" is invalid. Module ids can only have alphanumerics and underscore, and they must start with an alphanumeric.',
     },
     INVALID_MODULE_DEFINITION_FUNCTION: {
       number: 202,
-      message: "Module definition function must be a function",
+      message: "Module definition function must be a function.",
     },
     ASYNC_MODULE_DEFINITION_FUNCTION: {
       number: 203,
@@ -138,14 +140,10 @@ export const ERRORS = {
     },
   },
   EXECUTION: {
-    FUTURE_NOT_FOUND: {
-      number: 400,
-      message: "Could not locate future id from batching",
-    },
     DROPPED_TRANSACTION: {
       number: 401,
       message:
-        "Error while executing %futureId%: all the transactions of its network interaction %networkInteractionId% were dropped. Please try rerunning Ignition.",
+        "Error while executing %futureId%: all the transactions of its network interaction %networkInteractionId% were dropped. Please try rerunning Hardhat Ignition.",
     },
     INVALID_JSON_RPC_RESPONSE: {
       number: 402,
@@ -154,12 +152,12 @@ export const ERRORS = {
     WAITING_FOR_CONFIRMATIONS: {
       number: 403,
       message:
-        "You have sent transactions from %sender%. Please wait until they get %requiredConfirmations% confirmations before running Ignition again.",
+        "You have sent transactions from %sender% and they interfere with Hardhat Ignition. Please wait until they get %requiredConfirmations% confirmations before running Hardhat Ignition again.",
     },
     WAITING_FOR_NONCE: {
       number: 404,
       message:
-        "You have sent transactions from %sender% with nonce %nonce%. Please wait until they get %requiredConfirmations% confirmations before running Ignition again.",
+        "You have sent transactions from %sender% with nonce %nonce% and it interferes with Hardhat Ignition. Please wait until they get %requiredConfirmations% confirmations before running Hardhat Ignition again.",
     },
     INVALID_NONCE: {
       number: 405,
@@ -181,18 +179,19 @@ export const ERRORS = {
     },
     NO_STATE_FOR_FUTURE: {
       number: 601,
-      message: "Cannot wipe %futureId% as no state recorded against it",
+      message:
+        "Cannot wipe %futureId% as it has no previous execution recorded",
     },
     DEPENDENT_FUTURES: {
       number: 602,
-      message: `Cannot wipe %futureId% as there are dependent futures that have already started: %dependents%`,
+      message: `Cannot wipe %futureId% as there are dependent futures that have previous executions recorded. Consider wiping these first: %dependents%`,
     },
   },
   VALIDATION: {
     INVALID_DEFAULT_SENDER: {
       number: 700,
       message:
-        "Default sender %defaultSender% is not part of the provided accounts",
+        "Default sender %defaultSender% is not part of the configured accounts.",
     },
     MISSING_EMITTER: {
       number: 701,
@@ -216,12 +215,12 @@ export const ERRORS = {
     INVALID_STATIC_CALL: {
       number: 705,
       message:
-        "Function %functionName% in contract %contractName% is not 'pure' or 'view' and cannot be statically called",
+        "Function %functionName% in contract %contractName% is not 'pure' or 'view' and should not be statically called",
     },
     INDEXED_EVENT_ARG: {
       number: 706,
       message:
-        "Indexed argument %argument% of event %eventName% of contract %contractName% is not stored in the receipt, but its hash is, so you can't read it.",
+        "Indexed argument %argument% of event %eventName% of contract %contractName% is not stored in the receipt (its hash is stored instead), so you can't read it.",
     },
     INVALID_OVERLOAD_NAME: {
       number: 707,
diff --git a/packages/core/src/internal/deployer.ts b/packages/core/src/internal/deployer.ts
index 5c128ffa..f44f00c1 100644
--- a/packages/core/src/internal/deployer.ts
+++ b/packages/core/src/internal/deployer.ts
@@ -47,7 +47,6 @@ import { findStatus } from "./views/find-status";
 export class Deployer {
   constructor(
     private readonly _config: DeployConfig,
-    private readonly _deploymentDir: string | undefined,
     private readonly _executionStrategy: ExecutionStrategy,
     private readonly _jsonRpcClient: JsonRpcClient,
     private readonly _artifactResolver: ArtifactResolver,
@@ -75,8 +74,7 @@ export class Deployer {
     defaultSender: string
   ): Promise<DeploymentResult> {
     let deploymentState = await this._getOrInitializeDeploymentState(
-      ignitionModule.id,
-      this._deploymentDir
+      ignitionModule.id
     );
 
     const contracts =
@@ -219,14 +217,13 @@ export class Deployer {
   }
 
   private async _getOrInitializeDeploymentState(
-    moduleId: string,
-    deploymentDir: string | undefined
+    moduleId: string
   ): Promise<DeploymentState> {
     const chainId = await this._jsonRpcClient.getChainId();
     const deploymentState = await loadDeploymentState(this._deploymentLoader);
 
     if (deploymentState === undefined) {
-      this._emitDeploymentStartEvent(moduleId, deploymentDir);
+      this._emitDeploymentStartEvent(moduleId);
 
       return initializeDeploymentState(chainId, this._deploymentLoader);
     }
@@ -239,10 +236,7 @@ export class Deployer {
     return deploymentState;
   }
 
-  private _emitDeploymentStartEvent(
-    moduleId: string,
-    deploymentDir: string | undefined
-  ): void {
+  private _emitDeploymentStartEvent(moduleId: string): void {
     if (this._executionEventListener === undefined) {
       return;
     }
@@ -250,7 +244,6 @@ export class Deployer {
     this._executionEventListener.deploymentStart({
       type: ExecutionEventType.DEPLOYMENT_START,
       moduleName: moduleId,
-      deploymentDir: deploymentDir ?? undefined,
     });
   }
 
diff --git a/packages/core/src/internal/execution/execution-engine.ts b/packages/core/src/internal/execution/execution-engine.ts
index a14d5f36..d176bdb2 100644
--- a/packages/core/src/internal/execution/execution-engine.ts
+++ b/packages/core/src/internal/execution/execution-engine.ts
@@ -1,5 +1,3 @@
-import { IgnitionError } from "../../errors";
-import { ERRORS } from "../../errors-list";
 import { ArtifactResolver } from "../../types/artifact";
 import { DeploymentParameters } from "../../types/deploy";
 import {
@@ -12,6 +10,7 @@ import {
   IgnitionModuleResult,
 } from "../../types/module";
 import { DeploymentLoader } from "../deployment-loader/types";
+import { assertIgnitionInvariant } from "../utils/assertions";
 import { getFuturesFromModule } from "../utils/get-futures-from-module";
 import { getPendingNonceAndSender } from "../views/execution-state/get-pending-nonce-and-sender";
 import { hasExecutionSucceeded } from "../views/has-execution-succeeded";
@@ -238,9 +237,10 @@ export class ExecutionEngine {
   private _lookupFuture(futures: Future[], futureId: string): Future {
     const future = futures.find((f) => f.id === futureId);
 
-    if (future === undefined) {
-      throw new IgnitionError(ERRORS.EXECUTION.FUTURE_NOT_FOUND);
-    }
+    assertIgnitionInvariant(
+      future !== undefined,
+      `Future ${futureId} not found`
+    );
 
     return future;
   }
diff --git a/packages/core/src/internal/module-builder.ts b/packages/core/src/internal/module-builder.ts
index 01207508..9262543f 100644
--- a/packages/core/src/internal/module-builder.ts
+++ b/packages/core/src/internal/module-builder.ts
@@ -18,24 +18,24 @@ import {
   AccountRuntimeValue,
   AddressResolvableFuture,
   ArgumentType,
-  CallableContractFuture,
   ContractAtFuture,
-  ContractCallFuture,
   ContractDeploymentFuture,
+  LibraryDeploymentFuture,
+  CallableContractFuture,
   ContractFuture,
   FutureType,
   IgnitionModule,
   IgnitionModuleResult,
-  LibraryDeploymentFuture,
   ModuleParameterRuntimeValue,
   ModuleParameterType,
   ModuleParameters,
   NamedArtifactContractAtFuture,
+  ContractCallFuture,
   NamedArtifactContractDeploymentFuture,
   NamedArtifactLibraryDeploymentFuture,
+  StaticCallFuture,
   ReadEventArgumentFuture,
   SendDataFuture,
-  StaticCallFuture,
 } from "../types/module";
 import {
   CallOptions,
@@ -610,25 +610,20 @@ class IgnitionModuleBuilderImplementation<
   ): NamedArtifactContractAtFuture<ContractNameT>;
   public contractAt(
     contractName: string,
-    artifact: Artifact,
     address:
       | string
       | AddressResolvableFuture
       | ModuleParameterRuntimeValue<string>,
+    artifact: Artifact,
     options?: ContractAtOptions
   ): ContractAtFuture;
   public contractAt<ContractNameT extends string>(
     contractName: ContractNameT,
-    addressOrArtifact:
-      | string
-      | AddressResolvableFuture
-      | ModuleParameterRuntimeValue<string>
-      | Artifact,
-    optionsOrAddress?:
-      | ContractAtOptions
+    address:
       | string
       | AddressResolvableFuture
       | ModuleParameterRuntimeValue<string>,
+    artifactOrOptions?: Artifact | ContractAtOptions,
     options?: ContractAtOptions
   ) {
     if (typeof contractName !== "string") {
@@ -638,32 +633,19 @@ class IgnitionModuleBuilderImplementation<
       );
     }
 
-    if (isArtifactType(addressOrArtifact)) {
-      if (
-        !(
-          typeof optionsOrAddress === "string" ||
-          isFuture(optionsOrAddress) ||
-          isModuleParameterRuntimeValue(optionsOrAddress)
-        )
-      ) {
-        this._throwErrorWithStackTrace(
-          `Invalid parameter "address" provided to contractAt "${contractName}" in module "${this._module.id}"`,
-          this.contractAt
-        );
-      }
-
+    if (isArtifactType(artifactOrOptions)) {
       return this._contractAtFromArtifact(
         contractName,
-        addressOrArtifact,
-        optionsOrAddress,
+        address,
+        artifactOrOptions,
         options
       );
     }
 
     return this._namedArtifactContractAt(
       contractName,
-      addressOrArtifact,
-      optionsOrAddress as ContractAtOptions
+      address,
+      artifactOrOptions
     );
   }
 
@@ -710,11 +692,11 @@ class IgnitionModuleBuilderImplementation<
 
   private _contractAtFromArtifact(
     contractName: string,
-    artifact: Artifact,
     address:
       | string
       | AddressResolvableFuture
       | ModuleParameterRuntimeValue<string>,
+    artifact: Artifact,
     options: ContractAtOptions = {}
   ): ContractAtFuture {
     const futureId = toDeploymentFutureId(
@@ -921,7 +903,7 @@ class IgnitionModuleBuilderImplementation<
     }
 
     this._throwErrorWithStackTrace(
-      `The id "${id}" contains banned characters, ids can only contain alphanumerics or underscores`,
+      `The id "${id}" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character.`,
       func
     );
   }
@@ -930,12 +912,13 @@ class IgnitionModuleBuilderImplementation<
     contractName: string,
     func: (...[]: any[]) => any
   ) {
+    // TODO: This doesn't support FQNs
     if (isValidSolidityIdentifier(contractName)) {
       return;
     }
 
     this._throwErrorWithStackTrace(
-      `The contract "${contractName}" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs`,
+      `The contract name "${contractName}" is invalid, make sure you use a valid identifier.`,
       func
     );
   }
@@ -949,7 +932,7 @@ class IgnitionModuleBuilderImplementation<
     }
 
     this._throwErrorWithStackTrace(
-      `The event "${eventName}" contains banned characters, event names can only contain alphanumerics, underscores or dollar signs`,
+      `The event name "${eventName}" is invalid, make sure you use a valid identifier.`,
       func
     );
   }
@@ -963,7 +946,7 @@ class IgnitionModuleBuilderImplementation<
     }
 
     this._throwErrorWithStackTrace(
-      `The function name "${functionName}" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs`,
+      `The function name "${functionName}" is invalid, make sure you use a valid identifier.`,
       func
     );
   }
@@ -983,7 +966,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueContractId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.contract("MyContract", [], { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.contract(..., { id: "MyUniqueId"})\``,
       this.contract
     );
   }
@@ -991,7 +974,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueArtifactContractId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.contract("MyContract", artifact, [], { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.contract(..., { id: "MyUniqueId"})\``,
       this.contract
     );
   }
@@ -999,7 +982,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueLibraryId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.library("MyLibrary", { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.library(..., { id: "MyUniqueId"})\``,
       this.library
     );
   }
@@ -1007,7 +990,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueArtifactLibraryId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.library("MyLibrary", artifact, { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.library(..., { id: "MyUniqueId"})\``,
       this.library
     );
   }
@@ -1015,7 +998,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueCallId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.call(myContract, "myFunction", [], { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.call(..., { id: "MyUniqueId"})\``,
       this.call
     );
   }
@@ -1023,7 +1006,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueStaticCallId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.staticCall(myContract, "myFunction", [], { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.staticCall(..., { id: "MyUniqueId"})\``,
       this.staticCall
     );
   }
@@ -1031,7 +1014,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueContractAtId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.contractAt("MyContract", "0x123...", artifact, { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.contractAt(..., { id: "MyUniqueId"})\``,
       this.contractAt
     );
   }
@@ -1039,7 +1022,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueContractAtFromArtifactId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.contractAt("MyContract", "0x123...", { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.contractAt(..., { id: "MyUniqueId"})\``,
       this.contractAt
     );
   }
@@ -1047,7 +1030,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueReadEventArgumentId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.readEventArgument(myContract, "MyEvent", "eventArg", { id: "MyId"})\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. You can fix this by providing a unique id in as an option, like this \`m.readEventArgument(..., { id: "MyUniqueId"})\``,
       this.readEventArgument
     );
   }
@@ -1055,7 +1038,7 @@ class IgnitionModuleBuilderImplementation<
   private _assertUniqueSendId(futureId: string) {
     return this._assertUniqueFutureId(
       futureId,
-      `Duplicated id ${futureId} found in module ${this._module.id}, ensure the id passed is unique \`m.send("MyId", "0xabcd")\``,
+      `Duplicated id ${futureId} found in module ${this._module.id}. Make sure the id passed as first argument to \`m.send\` is unique.`,
       this.send
     );
   }
@@ -1067,7 +1050,7 @@ class IgnitionModuleBuilderImplementation<
     for (const [libraryName, libraryFuture] of Object.entries(libraries)) {
       if (!isContractFuture(libraryFuture)) {
         this._throwErrorWithStackTrace(
-          `Given library '${libraryName}' is not a valid Future`,
+          `The value you provided for the library '${libraryName}' is not a valid Future or it doesn't represent a contract`,
           func
         );
       }
@@ -1090,7 +1073,7 @@ class IgnitionModuleBuilderImplementation<
       typeof value !== "bigint"
     ) {
       this._throwErrorWithStackTrace(
-        `Given value option '${value}' is not a \`bigint\``,
+        `Invalid option "value" received. It should be a bigint, a module parameter, or a value obtained from an event or static call.`,
         func
       );
     }
@@ -1106,7 +1089,7 @@ class IgnitionModuleBuilderImplementation<
       from !== undefined
     ) {
       this._throwErrorWithStackTrace(
-        `Invalid type for given option "from": ${typeof from}`,
+        `Invalid type for option "from": ${typeof from}`,
         func
       );
     }
@@ -1151,7 +1134,7 @@ class IgnitionModuleBuilderImplementation<
     }
 
     this._throwErrorWithStackTrace(
-      `The argument "${nameOrIndex}" contains banned characters, argument names can only contain alphanumerics, underscores or dollar signs`,
+      `The argument "${nameOrIndex}" is expected to have a valid name, but it's invalid.`,
       func
     );
   }
diff --git a/packages/core/src/types/execution-events.ts b/packages/core/src/types/execution-events.ts
index ecc19467..91d478de 100644
--- a/packages/core/src/types/execution-events.ts
+++ b/packages/core/src/types/execution-events.ts
@@ -75,7 +75,6 @@ export enum ExecutionEventType {
 export interface DeploymentStartEvent {
   type: ExecutionEventType.DEPLOYMENT_START;
   moduleName: string;
-  deploymentDir: string | undefined;
 }
 
 /**
diff --git a/packages/core/src/types/module-builder.ts b/packages/core/src/types/module-builder.ts
index 5555459a..be415301 100644
--- a/packages/core/src/types/module-builder.ts
+++ b/packages/core/src/types/module-builder.ts
@@ -185,11 +185,11 @@ export interface IgnitionModuleBuilder {
 
   contractAt(
     contractName: string,
-    artifact: Artifact,
     address:
       | string
       | AddressResolvableFuture
       | ModuleParameterRuntimeValue<string>,
+    artifact: Artifact,
     options?: ContractAtOptions
   ): ContractAtFuture;
 
diff --git a/packages/hardhat-plugin/src/ui/helpers/calculate-deploying-module-panel.ts b/packages/hardhat-plugin/src/ui/helpers/calculate-deploying-module-panel.ts
index 5066120a..694e98f8 100644
--- a/packages/hardhat-plugin/src/ui/helpers/calculate-deploying-module-panel.ts
+++ b/packages/hardhat-plugin/src/ui/helpers/calculate-deploying-module-panel.ts
@@ -3,7 +3,8 @@ import chalk from "chalk";
 import { UiState } from "../types";
 
 export function calculateDeployingModulePanel(state: UiState): string {
-  return `Hardhat Ignition 🚀
+  return `
+Hardhat Ignition 🚀
 
 ${chalk.bold(`Deploying [ ${state.moduleName ?? "unknown"} ]`)}
 `;
diff --git a/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-complete-display.ts b/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-complete-display.ts
index 0e2cbd1b..31cc9905 100644
--- a/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-complete-display.ts
+++ b/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-complete-display.ts
@@ -38,7 +38,8 @@ function _displaySuccessfulDeployment(
   result: SuccessfulDeploymentResult,
   { moduleName }: { moduleName: string }
 ): string {
-  let text = `[ ${moduleName} ] successfully deployed 🚀
+  let text = `
+[ ${moduleName} ] successfully deployed 🚀
 
 ${chalk.bold("Deployed Addresses")}
 
@@ -61,7 +62,8 @@ function _displayValidationErrors(
   result: ValidationErrorDeploymentResult,
   { moduleName }: { moduleName: string }
 ): string {
-  let text = `[ ${moduleName} ] validation failed ⛔
+  let text = `
+[ ${moduleName} ] validation failed ⛔
 
 The module contains futures that would fail to execute:
 
@@ -86,7 +88,8 @@ function _displayReconciliationErrors(
   result: ReconciliationErrorDeploymentResult,
   { moduleName }: { moduleName: string }
 ): string {
-  let text = `[ ${moduleName} ] reconciliation failed ⛔
+  let text = `
+[ ${moduleName} ] reconciliation failed ⛔
 
 The module contains changes to executed futures:
 
@@ -111,7 +114,7 @@ function _displayPreviousRunErrors(
   result: PreviousRunErrorDeploymentResult,
   { moduleName }: { moduleName: string }
 ): string {
-  let text = `[ ${moduleName} ] deployment cancelled ⛔\n\n`;
+  let text = `\n[ ${moduleName} ] deployment cancelled ⛔\n\n`;
 
   text += `These futures failed or timed out on a previous run:\n`;
 
@@ -130,7 +133,7 @@ function _displayExecutionErrors(
 ) {
   const sections: string[] = [];
 
-  let text = `[ ${moduleName} ] failed ⛔\n\n`;
+  let text = `\n[ ${moduleName} ] failed ⛔\n\n`;
 
   if (result.timedOut.length > 0) {
     let timedOutSection = `Transactions remain unconfirmed after fee bump:\n`;
diff --git a/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-status-display.ts b/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-status-display.ts
index 637a8006..843f4e97 100644
--- a/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-status-display.ts
+++ b/packages/hardhat-plugin/src/ui/helpers/calculate-deployment-status-display.ts
@@ -21,7 +21,7 @@ export function calculateDeploymentStatusDisplay(
 }
 
 function _calculateSuccess(deploymentId: string, statusResult: StatusResult) {
-  let successText = `[ ${deploymentId} ] successfully deployed 🚀\n\n`;
+  let successText = `\n[ ${deploymentId} ] successfully deployed 🚀\n\n`;
 
   if (Object.values(statusResult.contracts).length === 0) {
     successText += chalk.italic("No contracts were deployed");
@@ -40,7 +40,7 @@ function _calculateStartedButUnfinished(
   deploymentId: string,
   statusResult: StatusResult
 ) {
-  let startedText = `[ ${deploymentId} ] has futures that have started but not finished ⛔\n\n`;
+  let startedText = `\n[ ${deploymentId} ] has futures that have started but not finished ⛔\n\n`;
 
   startedText += Object.values(statusResult.started)
     .map((futureId) => ` - ${futureId}`)
@@ -50,7 +50,7 @@ function _calculateStartedButUnfinished(
 }
 
 function _calculateFailed(deploymentId: string, statusResult: StatusResult) {
-  let failedExecutionText = `[ ${deploymentId} ] failed ⛔\n`;
+  let failedExecutionText = `\n[ ${deploymentId} ] failed ⛔\n`;
 
   const sections: string[] = [];
 
diff --git a/packages/hardhat-plugin/src/ui/helpers/calculate-starting-message.ts b/packages/hardhat-plugin/src/ui/helpers/calculate-starting-message.ts
deleted file mode 100644
index a199fe6f..00000000
--- a/packages/hardhat-plugin/src/ui/helpers/calculate-starting-message.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import chalk from "chalk";
-
-/**
- * Display the temporary starting message. Note this does not print a newline.
- *
- * @param state - the UI state
- */
-export function calculateStartingMessage({
-  moduleName,
-  deploymentDir,
-}: {
-  moduleName: string | null;
-  deploymentDir: string | undefined | null;
-}): string {
-  const warningMessage = chalk.yellow(
-    chalk.bold(
-      `You are running Hardhat Ignition against an in-process instance of Hardhat Network.
-This will execute the deployment, but the results will be lost.
-You can use --network <network-name> to deploy to a different network.`
-    )
-  );
-
-  const startingMessage = `Hardhat Ignition starting for [ ${
-    moduleName ?? "unknown"
-  } ]...`;
-
-  return deploymentDir === undefined
-    ? `${warningMessage}\n\n${startingMessage}`
-    : startingMessage;
-}
diff --git a/packages/hardhat-plugin/src/ui/helpers/display-starting-message.ts b/packages/hardhat-plugin/src/ui/helpers/display-starting-message.ts
new file mode 100644
index 00000000..58e8b434
--- /dev/null
+++ b/packages/hardhat-plugin/src/ui/helpers/display-starting-message.ts
@@ -0,0 +1,12 @@
+import { UiState } from "../types";
+
+/**
+ * Display the temporary starting message. Note this does not print a newline.
+ *
+ * @param state - the UI state
+ */
+export function displayStartingMessage(state: UiState) {
+  process.stdout.write(
+    `Hardhat Ignition starting for [ ${state.moduleName ?? "unknown"} ]...`
+  );
+}
diff --git a/packages/hardhat-plugin/src/ui/pretty-event-handler.ts b/packages/hardhat-plugin/src/ui/pretty-event-handler.ts
index 72e9c5c3..c74fbbb7 100644
--- a/packages/hardhat-plugin/src/ui/pretty-event-handler.ts
+++ b/packages/hardhat-plugin/src/ui/pretty-event-handler.ts
@@ -36,7 +36,7 @@ import {
 import { calculateBatchDisplay } from "./helpers/calculate-batch-display";
 import { calculateDeployingModulePanel } from "./helpers/calculate-deploying-module-panel";
 import { calculateDeploymentCompleteDisplay } from "./helpers/calculate-deployment-complete-display";
-import { calculateStartingMessage } from "./helpers/calculate-starting-message";
+import { displayStartingMessage } from "./helpers/display-starting-message";
 import {
   UiBatches,
   UiFuture,
@@ -54,7 +54,6 @@ export class PrettyEventHandler implements ExecutionEventListener {
     status: UiStateDeploymentStatus.UNSTARTED,
     chainId: null,
     moduleName: null,
-    deploymentDir: null,
     batches: [],
     currentBatch: 0,
     result: null,
@@ -76,10 +75,9 @@ export class PrettyEventHandler implements ExecutionEventListener {
       ...this.state,
       status: UiStateDeploymentStatus.DEPLOYING,
       moduleName: event.moduleName,
-      deploymentDir: event.deploymentDir,
     };
 
-    process.stdout.write(calculateStartingMessage(this.state));
+    displayStartingMessage(this.state);
   }
 
   public runStart(event: RunStartEvent): void {
@@ -260,6 +258,7 @@ export class PrettyEventHandler implements ExecutionEventListener {
 
     if (originalStatus !== UiStateDeploymentStatus.UNSTARTED) {
       this._redisplayCurrentBatch();
+      this._clearUpToHeight(1);
     }
 
     console.log(calculateDeploymentCompleteDisplay(event, this.state));
diff --git a/packages/hardhat-plugin/src/ui/types.ts b/packages/hardhat-plugin/src/ui/types.ts
index 0c2e5066..d9e3d007 100644
--- a/packages/hardhat-plugin/src/ui/types.ts
+++ b/packages/hardhat-plugin/src/ui/types.ts
@@ -56,7 +56,6 @@ export interface UiState {
   status: UiStateDeploymentStatus;
   chainId: number | null;
   moduleName: string | null;
-  deploymentDir: string | undefined | null;
   batches: UiBatches;
   currentBatch: number;
   result: DeploymentResult | null;


Test patch:
diff --git a/packages/core/test/call.ts b/packages/core/test/call.ts
index baad0b3b..adbd79bf 100644
--- a/packages/core/test/call.ts
+++ b/packages/core/test/call.ts
@@ -14,8 +14,8 @@ import { FutureType } from "../src/types/module";
 
 import {
   assertInstanceOf,
-  setupMockArtifactResolver,
   assertValidationError,
+  setupMockArtifactResolver,
 } from "./helpers";
 
 describe("call", () => {
@@ -438,7 +438,7 @@ describe("call", () => {
 
               return { another };
             }),
-          /Given value option '42' is not a `bigint`/
+          /IGN702: Module validation failed with reason: Invalid option "value" received. It should be a bigint, a module parameter, or a value obtained from an event or static call./
         );
       });
 
@@ -451,7 +451,7 @@ describe("call", () => {
 
               return { another };
             }),
-          /Invalid type for given option "from": number/
+          /IGN702: Module validation failed with reason: Invalid type for option "from": number/
         );
       });
 
diff --git a/packages/core/test/contract.ts b/packages/core/test/contract.ts
index ebfda63f..a3ddc8bc 100644
--- a/packages/core/test/contract.ts
+++ b/packages/core/test/contract.ts
@@ -481,7 +481,7 @@ describe("contract", () => {
 
               return { another };
             }),
-          /Given value option '42' is not a `bigint`/
+          /IGN702: Module validation failed with reason: Invalid option "value" received. It should be a bigint, a module parameter, or a value obtained from an event or static call./
         );
       });
 
@@ -493,7 +493,7 @@ describe("contract", () => {
 
               return { another };
             }),
-          /Invalid type for given option "from": number/
+          /IGN702: Module validation failed with reason: Invalid type for option "from": number/
         );
       });
 
@@ -510,7 +510,7 @@ describe("contract", () => {
 
               return { another, test };
             }),
-          /Given library 'Call' is not a valid Future/
+          /IGN702: Module validation failed with reason: The value you provided for the library 'Call' is not a valid Future or it doesn't represent a contract/
         );
       });
     });
diff --git a/packages/core/test/contractAtFromArtifact.ts b/packages/core/test/contractAtFromArtifact.ts
index 62ea7af6..20b22a6d 100644
--- a/packages/core/test/contractAtFromArtifact.ts
+++ b/packages/core/test/contractAtFromArtifact.ts
@@ -23,7 +23,7 @@ describe("contractAtFromArtifact", () => {
 
   it("should be able to setup a contract at a given address", () => {
     const moduleWithContractFromArtifact = buildModule("Module1", (m) => {
-      const contract1 = m.contractAt("Contract1", fakeArtifact, "0xtest");
+      const contract1 = m.contractAt("Contract1", "0xtest", fakeArtifact);
 
       return { contract1 };
     });
@@ -53,7 +53,7 @@ describe("contractAtFromArtifact", () => {
   it("should be able to pass an after dependency", () => {
     const moduleWithDependentContracts = buildModule("Module1", (m) => {
       const example = m.contract("Example");
-      const another = m.contractAt("Another", fakeArtifact, "0xtest", {
+      const another = m.contractAt("Another", "0xtest", fakeArtifact, {
         after: [example],
       });
 
@@ -74,7 +74,7 @@ describe("contractAtFromArtifact", () => {
       const example = m.contract("Example");
       const call = m.staticCall(example, "getAddress");
 
-      const another = m.contractAt("Another", fakeArtifact, call);
+      const another = m.contractAt("Another", call, fakeArtifact);
 
       return { example, another };
     });
@@ -96,11 +96,11 @@ describe("contractAtFromArtifact", () => {
       const paramWithDefault = m.getParameter("addressWithDefault", "0x000000");
       const paramWithoutDefault = m.getParameter("addressWithoutDefault");
 
-      const withDefault = m.contractAt("C", fakeArtifact, paramWithDefault);
+      const withDefault = m.contractAt("C", paramWithDefault, fakeArtifact);
       const withoutDefault = m.contractAt(
         "C2",
-        fakeArtifact,
-        paramWithoutDefault
+        paramWithoutDefault,
+        fakeArtifact
       );
 
       return { withDefault, withoutDefault };
@@ -129,14 +129,14 @@ describe("contractAtFromArtifact", () => {
       const moduleWithSameContractTwice = buildModule("Module1", (m) => {
         const sameContract1 = m.contractAt(
           "SameContract",
-          fakeArtifact,
           "0x123",
+          fakeArtifact,
           { id: "first" }
         );
         const sameContract2 = m.contractAt(
           "SameContract",
-          fakeArtifact,
           "0x123",
+          fakeArtifact,
           {
             id: "second",
           }
@@ -162,13 +162,13 @@ describe("contractAtFromArtifact", () => {
           buildModule("Module1", (m) => {
             const sameContract1 = m.contractAt(
               "SameContract",
-              fakeArtifact,
-              "0x123"
+              "0x123",
+              fakeArtifact
             );
             const sameContract2 = m.contractAt(
               "SameContract",
-              fakeArtifact,
-              "0x123"
+              "0x123",
+              fakeArtifact
             );
 
             return { sameContract1, sameContract2 };
@@ -183,16 +183,16 @@ describe("contractAtFromArtifact", () => {
           buildModule("Module1", (m) => {
             const sameContract1 = m.contractAt(
               "SameContract",
-              fakeArtifact,
               "0x123",
+              fakeArtifact,
               {
                 id: "same",
               }
             );
             const sameContract2 = m.contractAt(
               "SameContract",
-              fakeArtifact,
               "0x123",
+              fakeArtifact,
               {
                 id: "same",
               }
@@ -211,11 +211,11 @@ describe("contractAtFromArtifact", () => {
         assert.throws(
           () =>
             buildModule("Module1", (m) => {
-              const another = m.contractAt("Another", fakeArtifact, 42 as any);
+              const another = m.contractAt("Another", 42 as any, fakeArtifact);
 
               return { another };
             }),
-          /Invalid parameter "address" provided to contractAt "Another" in module "Module1"/
+          /Invalid address given/
         );
       });
     });
@@ -223,7 +223,7 @@ describe("contractAtFromArtifact", () => {
     it("should not validate a missing module parameter", async () => {
       const module = buildModule("Module1", (m) => {
         const p = m.getParameter("p");
-        const another = m.contractAt("Another", fakeArtifact, p);
+        const another = m.contractAt("Another", p, fakeArtifact);
 
         return { another };
       });
@@ -248,7 +248,7 @@ describe("contractAtFromArtifact", () => {
     it("should validate a missing module parameter if a default parameter is present", async () => {
       const module = buildModule("Module1", (m) => {
         const p = m.getParameter("p", "0x1234");
-        const another = m.contractAt("Another", fakeArtifact, p);
+        const another = m.contractAt("Another", p, fakeArtifact);
 
         return { another };
       });
@@ -272,7 +272,7 @@ describe("contractAtFromArtifact", () => {
     it("should not validate a module parameter of the wrong type", async () => {
       const module = buildModule("Module1", (m) => {
         const p = m.getParameter("p", 123 as unknown as string);
-        const another = m.contractAt("Another", fakeArtifact, p);
+        const another = m.contractAt("Another", p, fakeArtifact);
 
         return { another };
       });
diff --git a/packages/core/test/contractFromArtifact.ts b/packages/core/test/contractFromArtifact.ts
index 636aa4c2..1ebf42c6 100644
--- a/packages/core/test/contractFromArtifact.ts
+++ b/packages/core/test/contractFromArtifact.ts
@@ -436,7 +436,7 @@ describe("contractFromArtifact", () => {
 
               return { another };
             }),
-          /Given value option '42' is not a `bigint`/
+          /IGN702: Module validation failed with reason: Invalid option "value" received. It should be a bigint, a module parameter, or a value obtained from an event or static call./
         );
       });
 
@@ -450,7 +450,7 @@ describe("contractFromArtifact", () => {
 
               return { another };
             }),
-          /Invalid type for given option "from": number/
+          /IGN702: Module validation failed with reason: Invalid type for option "from": number/
         );
       });
 
@@ -467,7 +467,7 @@ describe("contractFromArtifact", () => {
 
               return { another, test };
             }),
-          /Given library 'Call' is not a valid Future/
+          /IGN702: Module validation failed with reason: The value you provided for the library 'Call' is not a valid Future or it doesn't represent a contract/
         );
       });
 
diff --git a/packages/core/test/execution/nonce-management/get-nonce-sync-messages.ts b/packages/core/test/execution/nonce-management/get-nonce-sync-messages.ts
index 84d3ff58..341af460 100644
--- a/packages/core/test/execution/nonce-management/get-nonce-sync-messages.ts
+++ b/packages/core/test/execution/nonce-management/get-nonce-sync-messages.ts
@@ -118,7 +118,7 @@ describe("execution - getNonceSyncMessages", () => {
             },
           },
         },
-        `IGN403: You have sent transactions from ${exampleAccounts[1]}. Please wait until they get 5 confirmations before running Ignition again.`
+        `IGN403: You have sent transactions from ${exampleAccounts[1]} and they interfere with Hardhat Ignition. Please wait until they get 5 confirmations before running Hardhat Ignition again.`
       );
     });
 
@@ -141,7 +141,7 @@ describe("execution - getNonceSyncMessages", () => {
             },
           },
         },
-        `IGN403: You have sent transactions from ${exampleAccounts[1]}. Please wait until they get 5 confirmations before running Ignition again.`
+        `IGN403: You have sent transactions from ${exampleAccounts[1]} and they interfere with Hardhat Ignition. Please wait until they get 5 confirmations before running Hardhat Ignition again.`
       );
     });
 
@@ -219,7 +219,7 @@ describe("execution - getNonceSyncMessages", () => {
             },
             latestBlockNumber: 3,
           },
-          `IGN403: You have sent transactions from ${exampleAccounts[1]}. Please wait until they get 5 confirmations before running Ignition again.`
+          `IGN403: You have sent transactions from ${exampleAccounts[1]} and they interfere with Hardhat Ignition. Please wait until they get 5 confirmations before running Hardhat Ignition again.`
         );
       });
     });
@@ -431,7 +431,7 @@ describe("execution - getNonceSyncMessages", () => {
               },
               latestBlockNumber,
             },
-            `IGN404: You have sent transactions from ${exampleAccounts[1]} with nonce 16. Please wait until they get 5 confirmations before running Ignition again.`
+            `IGN404: You have sent transactions from ${exampleAccounts[1]} with nonce 16 and it interferes with Hardhat Ignition. Please wait until they get 5 confirmations before running Hardhat Ignition again.`
           );
         });
 
@@ -459,7 +459,7 @@ describe("execution - getNonceSyncMessages", () => {
               },
               latestBlockNumber,
             },
-            `IGN404: You have sent transactions from ${exampleAccounts[1]} with nonce 30. Please wait until they get 5 confirmations before running Ignition again.`
+            `IGN404: You have sent transactions from ${exampleAccounts[1]} with nonce 30 and it interferes with Hardhat Ignition. Please wait until they get 5 confirmations before running Hardhat Ignition again.`
           );
         });
 
@@ -511,7 +511,7 @@ describe("execution - getNonceSyncMessages", () => {
               },
               latestBlockNumber,
             },
-            `IGN404: You have sent transactions from ${exampleAccounts[1]} with nonce 11. Please wait until they get 5 confirmations before running Ignition again.`
+            `IGN404: You have sent transactions from ${exampleAccounts[1]} with nonce 11 and it interferes with Hardhat Ignition. Please wait until they get 5 confirmations before running Hardhat Ignition again.`
           );
         });
 
diff --git a/packages/core/test/ignition-module-serializer.ts b/packages/core/test/ignition-module-serializer.ts
index 6a88e6da..85850bcf 100644
--- a/packages/core/test/ignition-module-serializer.ts
+++ b/packages/core/test/ignition-module-serializer.ts
@@ -165,7 +165,7 @@ describe("stored deployment serializer", () => {
 
     it("should serialize a contractAt", () => {
       const module = buildModule("Module1", (m) => {
-        const contract1 = m.contractAt("Contract1", fakeArtifact, "0x0");
+        const contract1 = m.contractAt("Contract1", "0x0", fakeArtifact);
 
         return { contract1 };
       });
@@ -175,9 +175,9 @@ describe("stored deployment serializer", () => {
 
     it("should serialize a contractAt with a future address", () => {
       const module = buildModule("Module1", (m) => {
-        const contract1 = m.contractAt("Contract1", fakeArtifact, "0x0");
+        const contract1 = m.contractAt("Contract1", "0x0", fakeArtifact);
         const call = m.staticCall(contract1, "getAddress");
-        const contract2 = m.contractAt("Contract2", fakeArtifact, call);
+        const contract2 = m.contractAt("Contract2", call, fakeArtifact);
 
         return { contract1, contract2 };
       });
@@ -187,8 +187,8 @@ describe("stored deployment serializer", () => {
 
     it("should serialize a contractAt with dependency", () => {
       const module = buildModule("Module1", (m) => {
-        const contract1 = m.contractAt("Contract1", fakeArtifact, "0x0");
-        const contract2 = m.contractAt("Contract2", fakeArtifact, "0x0", {
+        const contract1 = m.contractAt("Contract1", "0x0", fakeArtifact);
+        const contract2 = m.contractAt("Contract2", "0x0", fakeArtifact, {
           after: [contract1],
         });
 
diff --git a/packages/core/test/library.ts b/packages/core/test/library.ts
index 519393f2..bc347a79 100644
--- a/packages/core/test/library.ts
+++ b/packages/core/test/library.ts
@@ -215,7 +215,7 @@ describe("library", () => {
 
               return { another };
             }),
-          /Invalid type for given option "from": number/
+          /IGN702: Module validation failed with reason: Invalid type for option "from": number/
         );
       });
 
@@ -232,7 +232,7 @@ describe("library", () => {
 
               return { another, test };
             }),
-          /Given library 'Call' is not a valid Future/
+          /IGN702: Module validation failed with reason: The value you provided for the library 'Call' is not a valid Future or it doesn't represent a contract/
         );
       });
     });
diff --git a/packages/core/test/libraryFromArtifact.ts b/packages/core/test/libraryFromArtifact.ts
index 30db7f4d..1e071064 100644
--- a/packages/core/test/libraryFromArtifact.ts
+++ b/packages/core/test/libraryFromArtifact.ts
@@ -214,7 +214,7 @@ describe("libraryFromArtifact", () => {
 
               return { another };
             }),
-          /Invalid type for given option "from": number/
+          /IGN702: Module validation failed with reason: Invalid type for option "from": number/
         );
       });
 
@@ -231,7 +231,7 @@ describe("libraryFromArtifact", () => {
 
               return { another, test };
             }),
-          /Given library 'Call' is not a valid Future/
+          /IGN702: Module validation failed with reason: The value you provided for the library 'Call' is not a valid Future or it doesn't represent a contract/
         );
       });
     });
diff --git a/packages/core/test/reconciliation/futures/reconcileArtifactContractAt.ts b/packages/core/test/reconciliation/futures/reconcileArtifactContractAt.ts
index 9f65af58..ca8e5bbe 100644
--- a/packages/core/test/reconciliation/futures/reconcileArtifactContractAt.ts
+++ b/packages/core/test/reconciliation/futures/reconcileArtifactContractAt.ts
@@ -69,7 +69,7 @@ describe("Reconciliation - artifact contract at", () => {
 
   it("should reconcile when using an address string", async () => {
     const submoduleDefinition = buildModule("Submodule", (m) => {
-      const contract1 = m.contractAt("Contract1", mockArtifact, exampleAddress);
+      const contract1 = m.contractAt("Contract1", exampleAddress, mockArtifact);
 
       return { contract1 };
     });
@@ -97,7 +97,7 @@ describe("Reconciliation - artifact contract at", () => {
       const example = m.contract("Example");
       const call = m.staticCall(example, "getAddress");
 
-      const another = m.contractAt("Another", mockArtifact, call);
+      const another = m.contractAt("Another", call, mockArtifact);
 
       return { another };
     });
@@ -143,8 +143,8 @@ describe("Reconciliation - artifact contract at", () => {
     const moduleDefinition = buildModule("Module", (m) => {
       const contract1 = m.contractAt(
         "ContractChanged",
-        mockArtifact,
         exampleAddress,
+        mockArtifact,
         {
           id: "Factory",
         }
@@ -179,8 +179,8 @@ describe("Reconciliation - artifact contract at", () => {
     const moduleDefinition = buildModule("Module", (m) => {
       const contract1 = m.contractAt(
         "Contract1",
-        mockArtifact,
         exampleAddress,
+        mockArtifact,
         {
           id: "Factory",
         }
diff --git a/packages/core/test/send.ts b/packages/core/test/send.ts
index 9dc6e13e..8731ac59 100644
--- a/packages/core/test/send.ts
+++ b/packages/core/test/send.ts
@@ -272,7 +272,7 @@ describe("send", () => {
 
               return { another };
             }),
-          /Given value option '42' is not a `bigint`/
+          /IGN702: Module validation failed with reason: Invalid option "value" received. It should be a bigint, a module parameter, or a value obtained from an event or static call./
         );
       });
 
@@ -298,7 +298,7 @@ describe("send", () => {
 
               return { another };
             }),
-          /Invalid type for given option "from": number/
+          /IGN702: Module validation failed with reason: Invalid type for option "from": number/
         );
       });
 
diff --git a/packages/core/test/staticCall.ts b/packages/core/test/staticCall.ts
index 4901a3a1..61944d69 100644
--- a/packages/core/test/staticCall.ts
+++ b/packages/core/test/staticCall.ts
@@ -453,7 +453,7 @@ describe("static call", () => {
 
               return { another };
             }),
-          /Invalid type for given option "from": number/
+          /IGN702: Module validation failed with reason: Invalid type for option "from": number/
         );
       });
 
@@ -699,7 +699,7 @@ describe("static call", () => {
           {},
           []
         ),
-        "Function inc in contract Another is not 'pure' or 'view' and cannot be statically called"
+        "Function inc in contract Another is not 'pure' or 'view' and should not be statically called"
       );
     });
 
diff --git a/packages/core/test/validations/id-rules.ts b/packages/core/test/validations/id-rules.ts
index 0ec38ffe..6af59f3d 100644
--- a/packages/core/test/validations/id-rules.ts
+++ b/packages/core/test/validations/id-rules.ts
@@ -14,7 +14,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The moduleId "MyModule:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN201: The moduleId "MyModule:v2" is invalid. Module ids can only have alphanumerics and underscore, and they must start with an alphanumeric./);
     });
   });
 
@@ -29,7 +29,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The id "MyContract:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyContract:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in contractFromArtifact ids", () => {
@@ -46,7 +46,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The id "MyContractFromArtifact:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyContractFromArtifact:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in library ids", () => {
@@ -58,7 +58,7 @@ describe("id rules", () => {
 
           return { library };
         });
-      }, /The id "MyLibrary:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyLibrary:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in libraryFromArtifact ids", () => {
@@ -74,7 +74,7 @@ describe("id rules", () => {
 
           return { myLibraryFromArtifact };
         });
-      }, /The id "MyLibraryFromArtifact:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyLibraryFromArtifact:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in call ids", () => {
@@ -88,7 +88,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The id "MyCall:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyCall:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in static call ids", () => {
@@ -102,7 +102,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The id "MyStaticCall:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyStaticCall:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in contractAt ids", () => {
@@ -114,7 +114,7 @@ describe("id rules", () => {
 
           return { myContractAt };
         });
-      }, /The id "MyContractAt:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyContractAt:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in contractAtFromArtifact ids", () => {
@@ -122,8 +122,8 @@ describe("id rules", () => {
         buildModule("MyModule", (m) => {
           const myContractAt = m.contractAt(
             "MyContract",
-            fakeArtifact,
             exampleAddress,
+            fakeArtifact,
             {
               id: "MyContractAt:v2",
             }
@@ -131,7 +131,7 @@ describe("id rules", () => {
 
           return { myContractAt };
         });
-      }, /The id "MyContractAt:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyContractAt:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in readEventArgument ids", () => {
@@ -145,7 +145,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The id "MyReadEventArgument:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MyReadEventArgument:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
 
     it("should not allow non-alphanumerics in send id", () => {
@@ -155,7 +155,7 @@ describe("id rules", () => {
 
           return {};
         });
-      }, /The id "MySend:v2" contains banned characters, ids can only contain alphanumerics or underscores/);
+      }, /IGN702: Module validation failed with reason: The id "MySend:v2" is invalid. Ids can only contain alphanumerics or underscores, and they must start with an alphanumeric character./);
     });
   });
 
@@ -167,7 +167,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The contract "MyContract:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The contract name "MyContract:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should not allow non-alphanumerics in contractFromArtifact contract name", () => {
@@ -177,7 +177,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The contract "MyContract:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The contract name "MyContract:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should not allow non-alphanumerics in library contract names", () => {
@@ -187,7 +187,7 @@ describe("id rules", () => {
 
           return { library };
         });
-      }, /The contract "MyLibrary:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The contract name "MyLibrary:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should not allow non-alphanumerics in libraryFromArtifact contract names", () => {
@@ -200,7 +200,7 @@ describe("id rules", () => {
 
           return { myLibraryFromArtifact };
         });
-      }, /The contract "MyLibraryFromArtifact:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The contract name "MyLibraryFromArtifact:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should not allow non-alphanumerics in contractAt contract names", () => {
@@ -210,7 +210,7 @@ describe("id rules", () => {
 
           return { myContractAt };
         });
-      }, /The contract "MyContract:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The contract name "MyContract:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should not allow non-alphanumerics in contractAtFromArtifact contract names", () => {
@@ -218,13 +218,13 @@ describe("id rules", () => {
         buildModule("MyModule", (m) => {
           const myContractAt = m.contractAt(
             "MyContractAt:v2",
-            fakeArtifact,
-            exampleAddress
+            exampleAddress,
+            fakeArtifact
           );
 
           return { myContractAt };
         });
-      }, /The contract "MyContractAt:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The contract name "MyContractAt:v2" is invalid, make sure you use a valid identifier./);
     });
   });
 
@@ -238,7 +238,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The function name "config:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The function name "config:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should not allow non-alphanumerics in static call ids", () => {
@@ -250,7 +250,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The function name "config:v2" contains banned characters, contract names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The function name "config:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should allow ethers style function specification", () => {
@@ -276,7 +276,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The event "MyEvent:v2" contains banned characters, event names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The event name "MyEvent:v2" is invalid, make sure you use a valid identifier./);
     });
 
     it("should allow ethers sytle event specification", () => {
@@ -302,7 +302,7 @@ describe("id rules", () => {
 
           return { myContract };
         });
-      }, /The argument "MyArg:v2" contains banned characters, argument names can only contain alphanumerics, underscores or dollar signs/);
+      }, /IGN702: Module validation failed with reason: The argument "MyArg:v2" is expected to have a valid name, but it's invalid./);
     });
   });
 });
diff --git a/packages/core/test/wipe.ts b/packages/core/test/wipe.ts
index f8d04974..85a40343 100644
--- a/packages/core/test/wipe.ts
+++ b/packages/core/test/wipe.ts
@@ -101,7 +101,7 @@ describe("wipe", () => {
     const wiper = new Wiper(deploymentLoader);
     await assert.isRejected(
       wiper.wipe("Module1:Nonexistant"),
-      "Cannot wipe Module1:Nonexistant as no state recorded against it"
+      "IGN601: Cannot wipe Module1:Nonexistant as it has no previous execution recorded"
     );
   });
 
@@ -134,7 +134,7 @@ describe("wipe", () => {
 
     await assert.isRejected(
       wiper.wipe(contract1Id),
-      `Cannot wipe ${contract1Id} as there are dependent futures that have already started: ${contract2Id}`
+      `IGN602: Cannot wipe ${contract1Id} as there are dependent futures that have previous executions recorded. Consider wiping these first: ${contract2Id}`
     );
   });
 });
diff --git a/packages/hardhat-plugin/test/events.ts b/packages/hardhat-plugin/test/events.ts
index e20f6132..c61ff3ef 100644
--- a/packages/hardhat-plugin/test/events.ts
+++ b/packages/hardhat-plugin/test/events.ts
@@ -48,7 +48,7 @@ describe("events", () => {
         "fooAddress"
       );
 
-      const foo = m.contractAt("Foo", artifact, newAddress);
+      const foo = m.contractAt("Foo", newAddress, artifact);
 
       return { fooFactory, foo };
     });
diff --git a/packages/hardhat-plugin/test/execution/deploy-contract-at-from-artifact.ts b/packages/hardhat-plugin/test/execution/deploy-contract-at-from-artifact.ts
index fb934be7..5e81e72c 100644
--- a/packages/hardhat-plugin/test/execution/deploy-contract-at-from-artifact.ts
+++ b/packages/hardhat-plugin/test/execution/deploy-contract-at-from-artifact.ts
@@ -38,7 +38,7 @@ describe.skip("execution - deploy contractAt from artifact", function () {
     const fooArtifact = await this.hre.artifacts.readArtifact("Foo");
 
     const contractAtModuleDefinition = buildModule("FooModule", (m) => {
-      const atFoo = m.contractAt("AtFoo", fooArtifact, fooAddress);
+      const atFoo = m.contractAt("AtFoo", fooAddress, fooArtifact);
 
       return { atFoo };
     });
diff --git a/packages/hardhat-plugin/test/existing-contract.ts b/packages/hardhat-plugin/test/existing-contract.ts
index 53e549cf..890762fe 100644
--- a/packages/hardhat-plugin/test/existing-contract.ts
+++ b/packages/hardhat-plugin/test/existing-contract.ts
@@ -31,11 +31,11 @@ describe("existing contract", () => {
       await firstResult.usesContract.getAddress();
 
     const secondModuleDefinition = buildModule("SecondModule", (m) => {
-      const bar = m.contractAt("Bar", barArtifact, barAddress);
+      const bar = m.contractAt("Bar", barAddress, barArtifact);
       const usesContract = m.contractAt(
         "UsesContract",
-        usesContractArtifact,
-        usesContractAddress
+        usesContractAddress,
+        usesContractArtifact
       );
 
       m.call(usesContract, "setAddress", [bar]);
diff --git a/packages/hardhat-plugin/test/static-calls.ts b/packages/hardhat-plugin/test/static-calls.ts
index 891522b6..8c34694a 100644
--- a/packages/hardhat-plugin/test/static-calls.ts
+++ b/packages/hardhat-plugin/test/static-calls.ts
@@ -44,7 +44,7 @@ describe("static calls", () => {
         after: [createCall],
       });
 
-      const foo = m.contractAt("Foo", artifact, newAddress);
+      const foo = m.contractAt("Foo", newAddress, artifact);
 
       return { fooFactory, foo };
     });
@@ -167,7 +167,7 @@ describe("static calls", () => {
         after: [createCall],
       });
 
-      const foo = m.contractAt("Foo", artifact, nonAddress);
+      const foo = m.contractAt("Foo", nonAddress, artifact);
 
       return { fooFactory, foo };
     });
diff --git a/packages/hardhat-plugin/test/ui/helpers/calculate-batch-display.ts b/packages/hardhat-plugin/test/ui/helpers/calculate-batch-display.ts
index 289bc40d..55f8f1e7 100644
--- a/packages/hardhat-plugin/test/ui/helpers/calculate-batch-display.ts
+++ b/packages/hardhat-plugin/test/ui/helpers/calculate-batch-display.ts
@@ -12,7 +12,6 @@ const exampleState: UiState = {
   status: UiStateDeploymentStatus.DEPLOYING,
   chainId: 31337,
   moduleName: "ExampleModule",
-  deploymentDir: "/users/example",
   batches: [],
   currentBatch: 1,
   result: null,
diff --git a/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-complete-display.ts b/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-complete-display.ts
index b87cd6ea..bff11fad 100644
--- a/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-complete-display.ts
+++ b/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-complete-display.ts
@@ -19,6 +19,7 @@ describe("ui - calculate deployment complete display", () => {
   describe("successful deployment", () => {
     it("should render a sucessful deployment", () => {
       const expectedText = testFormat(`
+
         [ MyModule ] successfully deployed 🚀
 
         ${chalk.bold("Deployed Addresses")}
@@ -54,6 +55,7 @@ describe("ui - calculate deployment complete display", () => {
 
     it("should render a sucessful deployment with no contracts", () => {
       const expectedText = testFormat(`
+
         [ MyModule ] successfully deployed 🚀
 
         ${chalk.bold("Deployed Addresses")}
@@ -79,6 +81,7 @@ describe("ui - calculate deployment complete display", () => {
   describe("validation failures", () => {
     it("should render multiple validation errors on multiple futures", () => {
       const expectedText = testFormat(`
+
         [ MyModule ] validation failed ⛔
 
         The module contains futures that would fail to execute:
@@ -119,6 +122,7 @@ describe("ui - calculate deployment complete display", () => {
   describe("reconciliation errors", () => {
     it("should render a multiple reconciliation errors on multiple futures", () => {
       const expectedText = testFormat(`
+
         [ MyModule ] reconciliation failed ⛔
 
         The module contains changes to executed futures:
@@ -159,6 +163,7 @@ describe("ui - calculate deployment complete display", () => {
   describe("previous run errors", () => {
     it("should render a multiple previous run errors on multiple futures", () => {
       const expectedText = testFormat(`
+
         [ MyModule ] deployment cancelled ⛔
 
         These futures failed or timed out on a previous run:
@@ -191,6 +196,7 @@ describe("ui - calculate deployment complete display", () => {
   describe("execution errors", () => {
     it("should render an execution failure with multiple of each problem type", () => {
       const expectedText = testFormat(`
+
         [ MyModule ] failed ⛔
 
         Transactions remain unconfirmed after fee bump:
diff --git a/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts b/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts
index 6fbcf177..c6d750e1 100644
--- a/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts
+++ b/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts
@@ -20,6 +20,7 @@ describe("ui - calculate deployment status display", () => {
   describe("successful deployment", () => {
     it("should render a sucessful deployment", () => {
       const expectedText = testFormat(`
+
         [ deployment-01 ] successfully deployed 🚀
 
         ${chalk.bold("Deployed Addresses")}
@@ -54,6 +55,7 @@ describe("ui - calculate deployment status display", () => {
 
     it("should render a sucessful deployment with no deploys", () => {
       const expectedText = testFormat(`
+
         [ deployment-01 ] successfully deployed 🚀
 
         ${chalk.italic("No contracts were deployed")}`);
@@ -76,6 +78,7 @@ describe("ui - calculate deployment status display", () => {
   describe("failed deployment", () => {
     it("should render an execution failure with multiple of each problem type", () => {
       const expectedText = testFormat(`
+
         [ deployment-01 ] failed ⛔
 
         Transactions remain unconfirmed after fee bump:
@@ -151,6 +154,7 @@ describe("ui - calculate deployment status display", () => {
   describe("deployment with started but unfinished futures (e.g. simulation errors)", () => {
     it("should render a sucessful deployment", () => {
       const expectedText = testFormat(`
+
         [ deployment-01 ] has futures that have started but not finished ⛔
 
          - MyModule#Token
diff --git a/packages/hardhat-plugin/test/ui/helpers/calculate-starting-message.ts b/packages/hardhat-plugin/test/ui/helpers/calculate-starting-message.ts
deleted file mode 100644
index 1eb12ba1..00000000
--- a/packages/hardhat-plugin/test/ui/helpers/calculate-starting-message.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { assert } from "chai";
-import chalk from "chalk";
-
-import { calculateStartingMessage } from "../../../src/ui/helpers/calculate-starting-message";
-
-describe("ui - calculate starting message display", () => {
-  it("should display the starting message", () => {
-    const expectedText = `Hardhat Ignition starting for [ MyModule ]...`;
-
-    const actualText = calculateStartingMessage({
-      moduleName: "MyModule",
-      deploymentDir: "/users/example",
-    });
-
-    assert.equal(actualText, expectedText);
-  });
-
-  it("should display the warning for an ephemeral network", () => {
-    const warningMessage = `You are running Hardhat Ignition against an in-process instance of Hardhat Network.
-This will execute the deployment, but the results will be lost.
-You can use --network <network-name> to deploy to a different network.`;
-
-    const expectedText = `${chalk.yellow(
-      chalk.bold(warningMessage)
-    )}\n\nHardhat Ignition starting for [ MyModule ]...`;
-
-    const actualText = calculateStartingMessage({
-      moduleName: "MyModule",
-      deploymentDir: undefined,
-    });
-
-    assert.equal(actualText, expectedText);
-  });
-});
diff --git a/packages/ui/test/to-mermaid.ts b/packages/ui/test/to-mermaid.ts
index d22a828e..62c0fc2e 100644
--- a/packages/ui/test/to-mermaid.ts
+++ b/packages/ui/test/to-mermaid.ts
@@ -205,8 +205,8 @@ describe("to-mermaid", () => {
       });
       const duplicateWithLib = m.contractAt(
         "ContractWithLibrary",
-        withLibArtifact,
         withLib,
+        withLibArtifact,
         { id: "ContractWithLibrary2" }
       );