diff --git a/src/deployer/Linker.ts b/src/deployer/Linker.ts index bd9955d..664a830 100644 --- a/src/deployer/Linker.ts +++ b/src/deployer/Linker.ts @@ -10,7 +10,7 @@ import { catchError } from "../utils"; import { ArtifactExtended, Link, NeededLibrary } from "../types/deployer"; -import { Reporter } from "../tools/reporter/Reporter"; +import { Reporter } from "../tools/reporters/Reporter"; import { ArtifactProcessor } from "../tools/storage/ArtifactProcessor"; import { TransactionProcessor } from "../tools/storage/TransactionProcessor"; diff --git a/src/deployer/MinimalContract.ts b/src/deployer/MinimalContract.ts index 33c6df2..30a9524 100644 --- a/src/deployer/MinimalContract.ts +++ b/src/deployer/MinimalContract.ts @@ -13,7 +13,7 @@ import { MigrateConfig } from "../types/migrations"; import { Verifier } from "../verifier/Verifier"; -import { Reporter } from "../tools/reporter/Reporter"; +import { Reporter } from "../tools/reporters/Reporter"; import { ArtifactProcessor } from "../tools/storage/ArtifactProcessor"; import { TransactionProcessor } from "../tools/storage/TransactionProcessor"; diff --git a/src/deployer/adapters/EthersInjectHelper.ts b/src/deployer/adapters/EthersInjectHelper.ts index 161dee2..fffc516 100644 --- a/src/deployer/adapters/EthersInjectHelper.ts +++ b/src/deployer/adapters/EthersInjectHelper.ts @@ -15,7 +15,7 @@ import { fillParameters, getMethodString } from "../../utils"; import { MigrateConfig } from "../../types/migrations"; import { OverridesAndLibs } from "../../types/deployer"; -import { Reporter } from "../../tools/reporter/Reporter"; +import { Reporter } from "../../tools/reporters/Reporter"; import { TransactionProcessor } from "../../tools/storage/TransactionProcessor"; export class EthersInjectHelper { diff --git a/src/deployer/adapters/TruffleAdapter.ts b/src/deployer/adapters/TruffleAdapter.ts index de23a7a..fc1fe98 100644 --- a/src/deployer/adapters/TruffleAdapter.ts +++ b/src/deployer/adapters/TruffleAdapter.ts @@ -14,8 +14,8 @@ import { KeyTransactionFields } from "../../types/tools"; import { EthersFactory, Instance, TruffleFactory } from "../../types/adapter"; import { BaseTruffleMethod, OverridesAndLibs, TruffleTransactionResponse } from "../../types/deployer"; -import { Reporter } from "../../tools/reporter/Reporter"; -import { TruffleReporter } from "../../tools/reporter/adapters/TruffleReporter"; +import { Reporter } from "../../tools/reporters/Reporter"; +import { TruffleReporter } from "../../tools/reporters/TruffleReporter"; import { ArtifactProcessor } from "../../tools/storage/ArtifactProcessor"; import { TransactionProcessor } from "../../tools/storage/TransactionProcessor"; diff --git a/src/index.ts b/src/index.ts index 21ed813..75de117 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ import { mergeConfigs, migrateConfigExtender } from "./config"; import { TASK_MIGRATE } from "./constants"; import { Migrator } from "./migrator/Migrator"; -import { Reporter } from "./tools/reporter/Reporter"; +import { Reporter } from "./tools/reporters/Reporter"; import { ArtifactProcessor } from "./tools/storage/ArtifactProcessor"; import { DefaultStorage } from "./tools/storage/MigrateStorage"; diff --git a/src/migrator/Migrator.ts b/src/migrator/Migrator.ts index a455fda..0f4b254 100644 --- a/src/migrator/Migrator.ts +++ b/src/migrator/Migrator.ts @@ -15,7 +15,7 @@ import { MigrateConfig, VerifyStrategy } from "../types/migrations"; import { Deployer } from "../deployer/Deployer"; import { Verifier } from "../verifier/Verifier"; -import { Reporter } from "../tools/reporter/Reporter"; +import { Reporter } from "../tools/reporters/Reporter"; import { VerificationProcessor } from "../tools/storage/VerificationProcessor"; export class Migrator { diff --git a/src/tools/reporter/Reporter.ts b/src/tools/reporters/Reporter.ts similarity index 98% rename from src/tools/reporter/Reporter.ts rename to src/tools/reporters/Reporter.ts index e8cd7ad..c1c16bd 100644 --- a/src/tools/reporter/Reporter.ts +++ b/src/tools/reporters/Reporter.ts @@ -196,15 +196,11 @@ export class Reporter { } private static _toEther(value: bigint): string { - return BigNumber(value.toString()) - .div(10 ** 18) - .toFixed(); + return new BigNumber(value.toString()).div(10 ** 18).toFixed(); } private static _toGWei(value: bigint): string { - return BigNumber(value.toString()) - .div(10 ** 9) - .toFixed(); + return new BigNumber(value.toString()).div(10 ** 9).toFixed(); } private static _reportMigrationFiles(files: string[]) { diff --git a/src/tools/reporter/adapters/TruffleReporter.ts b/src/tools/reporters/TruffleReporter.ts similarity index 76% rename from src/tools/reporter/adapters/TruffleReporter.ts rename to src/tools/reporters/TruffleReporter.ts index 538ad08..46253f3 100644 --- a/src/tools/reporter/adapters/TruffleReporter.ts +++ b/src/tools/reporters/TruffleReporter.ts @@ -1,6 +1,6 @@ -import { Reporter } from "../Reporter"; +import { Reporter } from "./Reporter"; -import { TruffleTransactionResponse } from "../../../types/deployer"; +import { TruffleTransactionResponse } from "../../types/deployer"; export class TruffleReporter { public static async reportTransaction(tx: TruffleTransactionResponse | string, instanceName: string) { diff --git a/src/verifier/Verifier.ts b/src/verifier/Verifier.ts index e7c1908..158345b 100644 --- a/src/verifier/Verifier.ts +++ b/src/verifier/Verifier.ts @@ -9,7 +9,7 @@ import { Args } from "../types/deployer"; import { VerifierArgs } from "../types/verifier"; import { MigrateConfig, VerifyStrategy } from "../types/migrations"; -import { Reporter } from "../tools/reporter/Reporter"; +import { Reporter } from "../tools/reporters/Reporter"; import { VerificationProcessor } from "../tools/storage/VerificationProcessor"; export class Verifier {