From ddada389cfabe2e2e84a7d9e034fef01917c4eab Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 20 Sep 2023 17:24:21 +0300 Subject: [PATCH] Simplify Upgrader interface --- src/upgrader.ts | 12 ++++-------- tsconfig.json | 5 +++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/upgrader.ts b/src/upgrader.ts index 3b151e6..45319af 100644 --- a/src/upgrader.ts +++ b/src/upgrader.ts @@ -23,9 +23,6 @@ interface ContractToUpgrade { interface Project { name: string; instance: Instance; -} - -interface Target { version: string; contractNamesToUpgrade: string[] } @@ -49,15 +46,14 @@ export abstract class Upgrader { constructor ( project: Project, - target: Target, submitter: Submitter = new AutoSubmitter() ) { - this.targetVersion = target.version; - if (!target.version.includes("-")) { - this.targetVersion = `${target.version}-stable.0`; + this.targetVersion = project.version; + if (!project.version.includes("-")) { + this.targetVersion = `${project.version}-stable.0`; } this.instance = project.instance; - this.contractNamesToUpgrade = target.contractNamesToUpgrade; + this.contractNamesToUpgrade = project.contractNamesToUpgrade; this.projectName = project.name; this.transactions = []; this.submitter = submitter; diff --git a/tsconfig.json b/tsconfig.json index df8a32e..26eb725 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,10 @@ "extends": "@tsconfig/recommended/tsconfig.json", "compilerOptions": { - "target": "ES2020", - "outDir": "./dist", "declaration": true, + "outDir": "./dist", + "sourceMap": true, + "target": "ES2020" }, "include": ["./src", "./typechain-types"], "exclude": ["node_modules", "dist"],